unable to perform calculations using r data.table package

后端 未结 2 1347
南方客
南方客 2021-01-12 01:22

I have a huge data frame, last 30 rows are below:

libary(data.table)

dput(p)

structure(list(DATE = structure(c(1367516015,          


        
2条回答
  •  滥情空心
    2021-01-12 02:13

    I did this:

    sapply(p, class)
    

    and noticed that one of my columns was integer. Then I did this:

    x<-x[,RELATIVE_PERCENT:=ifelse(ENT_PCT>100, ((USED_CORES/ENT)*100), as.numeric(USR_SYS_CPU_PCT)), by= c("DATE", "LPAR")]
    

    and it is money

提交回复
热议问题