sfn_replacement_methods | R Documentation |
Methods to replace the data and metadata from the sfn_data class slots
## S4 replacement method for signature 'sfn_data' get_sapf_data(object) <- value ## S4 replacement method for signature 'sfn_data' get_env_data(object) <- value ## S4 replacement method for signature 'sfn_data' get_sapf_flags(object) <- value ## S4 replacement method for signature 'sfn_data' get_env_flags(object) <- value ## S4 replacement method for signature 'sfn_data' get_timestamp(object) <- value ## S4 replacement method for signature 'sfn_data' get_solar_timestamp(object) <- value ## S4 replacement method for signature 'sfn_data' get_si_code(object) <- value ## S4 replacement method for signature 'sfn_data' get_site_md(object) <- value ## S4 replacement method for signature 'sfn_data' get_stand_md(object) <- value ## S4 replacement method for signature 'sfn_data' get_species_md(object) <- value ## S4 replacement method for signature 'sfn_data' get_plant_md(object) <- value ## S4 replacement method for signature 'sfn_data' get_env_md(object) <- value
object |
sfn_data containing the slot to replace |
value |
object with the data to replace sfn_data slot with |
The replacement object must be a valid object for that slot:
For get_sapf_data
, get_env_data
, get_sapf_flags
and
get_env_flags
a data.frame or tibble without the TIMESTAMP
variable
For get_*_md
a data.frame or tibble
For get_timestamp
and get_solar_timestamp
a POSIXct
vector of length == nrow(sapf/env_data)
For get_si_code
a character vector
Validity is automatically checked before modifying the sfn_data object, and an error is raised if not valid
# preparation data('ARG_TRE', package = 'sapfluxnetr') sapf_data <- get_sapf_data(ARG_TRE, solar = TRUE) # modifying the slot data sapf_data[1:10, 2] <- NA # replacement. Remember, the sfn_data slot does not contain a TIMESTAMP # variable, it must be removed get_sapf_data(ARG_TRE) <- sapf_data[,-1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.