[R] Package diveMove readTDR problem

Ben Bolker bbolker at gmail.com
Wed Apr 6 16:18:17 CEST 2011


mwege <mwege <at> zoology.up.ac.za> writes:

> I am trying to read my TDR data into R using the readTDR function for the
> diveMove package.
> 
> > seal <- readTDR("file location and name here", dateCol=1, depthCol=3,
> > speed=FALSE, subsamp=1, concurrentCols=4:5)
> 
> But I keep getting the following error:
> > Error: all(!is.na(time)) is not TRUE
> 
> All my columns to have values in them (there are no empty records)
> 
> The manual and vignette of the package diveMove doesnt give a proper
> description of how to read data into R. It only describes how to access the
> data in the system file that comes with the package.
> What am I doing wrong?


  It's hard to answer this without a reproducible example, and it's
generally harder to get answers about less-used/more specialized
packages.  I'm going to guess that at least some of your dates are
not in the same format as specified (from the manual page: 
default is "%d/%m/%Y %H:%M:%S" --
you can change this with the 'dtformat' argument).

  You shouldn't need to specify arguments to the function that
are the same as the defaults: I would expect that

seal <- readTDR("file location and name here", 
    subsamp=1, concurrentCols=4:5)

would work equally well (or poorly ...)

"%d/%m/%Y %H:%M:%S"



More information about the R-help mailing list