Description Usage Arguments Value Author(s) See Also Examples
EcoNumData
objects are data frames with metadata that are saved in a
specific way in both local and remote EcoNumData repositories. They are basic
building blocks for a simplified, file-based LIMS (Laboratory Information
Management System) as it is using at UMONS EcoNum.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | new_econum_data(
x,
metadata = list(project = "", sample = "", sample_date =
get_opt_econum("def_sample_date"), author = "", date = Sys.time(), comment = NULL,
topic = NULL),
class = NULL
)
## S3 method for class 'EcoNumData'
print(x, ...)
## S3 method for class 'EcoNumData'
summary(object, ...)
## S3 method for class 'summary.EcoNumData'
print(x, ...)
validate(object, ...)
## S3 method for class 'EcoNumData'
validate(object, file = NULL, ...)
repos_save(object, envir = .GlobalEnv, local = TRUE, remote = TRUE, ...)
## S3 method for class 'EcoNumData'
repos_save(object, envir = .GlobalEnv, local = TRUE, remote = TRUE, ...)
repos_load(file, backup_existing = FALSE, ...)
|
x |
Some data. |
metadata |
A list of various metadata, with, as a minimum: 'project', 'sample', 'sample_date' and 'author'. |
class |
The (optional) class of the EcoNumData object to create (it will
subclass both |
... |
Further arguments to pass to the function. |
object |
Any object, but for |
file |
The file path to where the object is stored in either the local or the remote repository. |
envir |
An environment where to assign the |
local |
Logical ( |
remote |
Logical ( |
backup_existing |
Logical ( |
For new_econum_data()
, the object that is just created. It is a
data.frame
with a 'metadata' attribute, as a minimum, and it inherits from
both EcoNumData
and data.frame
.
For validate()
, the object is returned possibly corrected by using a series
of validation rules (and warnings are usually issued if something is
changed).
For repos_save()
, a vector of three named character strings, with 'object'
being the name of the object containing the item in the global workspace,
'local_file' being the path to the .RData
file in the local repository (or
NA
if it was not saved there) and 'remote_file' being the path to the
.Rdata
file as saved in the remote repository (or NA
if it was not saved
there). This is returned invisibly.
For repos_load()
, the name of the object that is reloaded is returned
invisibly.
Philippe Grosjean Philippe.Grosjean@umons.ac.be
options_econum()
, time_to_fingerprint()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# Save some generic EcoNumData
res <- repos_save(new_ecomum_data(data.frame(x = 1, y = 2)), remote = FALSE)
# The data is in .GlobalEnv
EcoNumData
summary(EcoNumData)
# Can be erased and reloaded from the repository later on
rm(EcoNumData)
get(repos_load(res["local_file"]))
# Delete the object from memory
rm(EcoNumData)
# ... and from the disk
unlink(res["local_file"])
# If the project subdirectory is empty, remove it
local_dir <- dirname(res["local_file"])
if (length(dir(local_dir)) == 0) unlink(local_dir, recursive = TRUE)
rm(local_dir)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.