:warning: ARCHIVED :warning: Essential tools and utility functions to facilitate the data processing pipeline, data cleaning and data analysing of clinical data from CC-HIC
When called from a different package it fails in Windows but it works in Linux. However, if the input to the function is saved and then used independently then it fails in Linux too. Maybe I've done something wrong saving the data to use it later... but this is what I've done from https://github.com/ropensci/cleanEHR/blob/master/R/utilities.R#L144:
Run the code that passes times in, some of them of type "POSIXct" "POSIXct", whereas others as "numeric". And all seems all right. If then I open these files the input an run:
where the first element sometimes is a "POSIXct" where others is a "numeric"vector with values like:
1494576000
the numeric ones fail (as I would expect) because it doesn't know the "origin".
Error in as.POSIXct.numeric(input, "GMT", format="%Y-%m-%dT%H:%M:%S") : 'origin' must be supplied
So could it be that the origin is somehow set somewhere and R picks it up? I've tried to name a variable origin and run it again and unless I explicitly use it in the function arguments it doesn't change the behaviour.
When called from a different package it fails in Windows but it works in Linux. However, if the input to the function is saved and then used independently then it fails in Linux too. Maybe I've done something wrong saving the data to use it later... but this is what I've done from https://github.com/ropensci/cleanEHR/blob/master/R/utilities.R#L144:
and then on https://github.com/ropensci/cleanEHR/blob/master/R/utilities.R#L150:
Run the code that passes times in, some of them of type
"POSIXct" "POSIXct"
, whereas others as"numeric"
. And all seems all right. If then I open these files the input an run:where the first element sometimes is a
"POSIXct"
where others is a"numeric"
vector
with values like:1494576000
the numeric ones fail (as I would expect) because it doesn't know the"origin"
.So could it be that the
origin
is somehow set somewhere and R picks it up? I've tried to name a variableorigin
and run it again and unless I explicitly use it in the function arguments it doesn't change the behaviour.I've also try making
origin
as global using:and with `assign(..., envir=.GlobalEnv), both got the same results.