obm_put | R Documentation |
This function allows put data into an OpenBioMaps server.
obm_put( scope = NULL, form_header = NULL, data_file = NULL, media_file = NULL, form_id = "", form_data = "", soft_error = "", token = OBM$token, pds_url = OBM$pds_url, data_table = OBM$project )
scope |
currently put_data supported |
form_header |
database column names vector, if missing default is the full list from the form |
data_file |
a csv file with header row |
media_file |
a media file to attach |
form_id |
the form's id |
form_data |
JSON array of data |
soft_error |
JSON array of 'Yes' strings (or translations of it) to skip soft error messages |
token |
OBM$token |
pds_url |
OBM$pds_url |
data_table |
OBM$project |
using own list of columns obm_get('get_form_list') form <- obm_get('get_form_data',57) columns <- unlist(form[,'column']) t <- obm_put('put_data',columns[1:3],form_id=57,data_file='~/teszt2.csv') using default columns list: t <- obm_put(scope='put_data',form_id=57,csv_file='~/teszt2.csv') JSON upload data <- matrix(c(c("Tringa totanus",'egyed',"AWBO",'10','POINT(47.1 21.3)'),c("Tringa flavipes",'egyed',"BYWO",'2','POINT(47.3 21.4)')),ncol=5,nrow=2,byrow=T) #colnames(data)<-c("species","nume","place","no","geom") t <- obm_put(scope='put_data',form_id=57,form_data=as.data.frame(data),form_header=c('faj','szamossag','hely','egyedszam')) with attached file data <- matrix(c(c("Tringa totanus",'egyed',"AWBO",'10','szamok.odt'),c("Tringa flavipes",'egyed',"BYWO",'2','a.pdf')),ncol=5,nrow=2,byrow=T) #colnames(data)<-c("species","nume","place","no",'Attach') t <- obm_put(scope='put_data',form_id=57,form_data=as.data.frame(data),form_header=c('faj','szamossag','hely','egyedszam','obm_files_id'),media_file=c('~/szamok.odt','~/a.pdf'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.