Skip to content
Prev 655 / 7420 Next

include Time in as.ltraj()

Struve, Juliane wrote:
Juliane,

In general, you can learn about any error message by inspecting code that
generated it.  To view the code for any function, submit the function name
(no trailing parentheses) from the command prompt.  

In this specific case:
If you inspect the code for as.ltraj, you will find the following
expressions:

    rr <- any(unlist(lapply(res, function(x) (length(unique(x$date)) != 
        length(x$date)))))
    if (rr) 
        stop("non unique dates for a given burst")

'as.ltraj' compares the length of 'date' to the length of a vector
containing only unique values in date and returns an error message when they
are unequal (i.e., when 'date' contains duplicates).

Glen Sargeant