[R-pkg-devel] Debian: example file is no longer read correctly

Blume Christine christine.blume at sbg.ac.at
Wed Dec 20 11:11:30 CET 2017

Dear all,

I guess I need your help again. With debian my package (nparACT) gives an error message that seems to be related to loading the data:

 Warning in is.na(data$activity) :
     is.na() applied to non-(list or vector) of type 'NULL'
    Error in 1:a : argument of length 0

Although I have set up a virtual machine to test the package using the R devel version with Linux (Debian), it gives me a hard time to find out what is wrong since I do not manage to install packages using the devel version...

Does anyone know what has changed so this text file is not read in any longer? The code for reading in the text file is:

data <- read.table(paste(path,name, sep="/"), header = F)
    if (is.data.frame(data)==F){
      data = as.data.frame(data)
    if(ncol(data) == 2){
      data[,1] <- as.POSIXct(data[,1])
      data[,2] <- as.numeric(as.character(data[,2]))
      names(data)[1] <- "time"
      names(data)[2] <- "activity"
    if(ncol(data) == 3){
      names(data)[1] <- "date"
      names(data)[2] <- "time"
      names(data)[3] <- "activity"
      data$date <- NULL
      data$time <- as.POSIXct(data$time, format="%H:%M:%S")
      data$activity <- as.numeric(as.character(data$activity))

Or can someone tell me how to install the package using R devel on Linux?

Thanks a lot!

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list