Quantcast
Channel: In xtfrm.data.frame(x) : cannot xtfrm data frames warning when sorting data frame - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by DavideChicco.it for In xtfrm.data.frame(x) : cannot xtfrm data...

Rather than writing [dateCol] you need to write [,dateCol] to specify that dateCol is the name of a column.These pieces of code work to me:df <- df[order(df[,dateCol]),]df <-...

View Article



Answer by G. Grothendieck for In xtfrm.data.frame(x) : cannot xtfrm data...

Here are some alternatives. All use fmt defined in (1).1) Base R The date format is ambiguous but choose one of the fmt values below. Then pick ou8t the desired column, convert it to Date class, find...

View Article

In xtfrm.data.frame(x) : cannot xtfrm data frames warning when sorting data...

I have tried two methods to sort a data frame by column values:dateCol = "DATE"df <- data.frame( DATE = c("01-10-2020","01-04-2020","01-06-2020","01-02-2020"), VAL = c(3,7,4,5))# Method 1df <-...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images