Posts by Felipe • 81 points
3 posts
-
2
votes3
answers192
viewsQ: Calculate average distance travelled with single tapply
I have my database from the package hflights of the R, which shows a number of flights in the US. I need to calculate the average distance travelled (Distance) for each day of the week (variable…
-
3
votes1
answer196
viewsQ: Automatically check quantitative variables in R
I have a database here and I need to automatically check which quantitative variables are. My advisor says I need to use sapply and the function is.numeric and create a code that returns a vector of…
-
2
votes1
answer2526
viewsQ: Convert qualitative numeric variables into factors in R
I have the following code already READY, which my advisor passed to me fatores=c("Year","Month","DayofWeek","DayofMonth") dadosFatores=apply(dados[,fatores],2,XXXX) dados[,XXXX]=dadosFatores In…