R Animated

library(magick)library(ggplot2)library(dplyr)library(tidyr) create a directory to which the images will be written dir_out <- file.path(tempdir(), “tx-sales”)dir.create(dir_out, recursive = TRUE) prepare data tx_sales <- txhousing %>%group_by(year,month) %>%summarise(sales = sum(sales, na.rm = TRUE)) %>%ungroup() %>%mutate(month = factor(month, labels = month.name)) %>%complete(month,year) get a sorted list of unique years in the TX housing dataset years <- tx_sales %>%pull(year) %>%unique(.)“R Animated” yazısının devamını oku

My R Codes

Vector oluşturma a<-c(1,2,3,4,5,6,7)b<-c(4,3,4,4,6,7,8)c<-c(“a”,”b”,”c”,”ç”,”d”,”e”,”f”)d<-c(“male”,”female”,”female”,”female”,”female”,”male”,”female”)e<-c(“white”,”white”,”red”,”red”,”blue”,”blue”,”blue”) vector’lerden dataframe oluşturma df<-data.frame(a,b,c,d,e) dataframe özellikleri str(df) ggplot grafiği ggplot(df, aes(x=a, y=b)) + geom_point() The most basic barplot you can do: barplot(height=df$b, names=df$c, col=”#69b3a2″) The most basic barplot you can do: barplot(height=df$b, names=df$c, col=”#69b3a2″, horiz=T , las=1) ggplot(df, aes(x=b, y=c)) + geom_bar(stat = “identity”) + coord_flip() https://sparkbyexamples.com/r-programming/ filter library(dplyr) filter(df, c==’ç’) df_filtered“My R Codes” yazısının devamını oku