R plug-in

57 views
Skip to first unread message

Guido Saborio

unread,
May 31, 2021, 11:48:33 PM5/31/21
to SMART Community Forum
Hello everyone,

I am exploring the uso of R scripts into SMART. I am familiar with R, not advanced, but cannot figure out how  to read the results of the query in order to make my R script works.

My understanding is that you can use R scripts into SMART to do more complex analysis, base on the results of queries. When running R script associated to a specific query, I realize the result of the query is stored as a temp csv file into the filestore, R script needs to read the data from that temp file? 

Any assistant would be much appreciated,

Best

Guido
--
M.Sc. Guido Saborío R. 
Biólogo

   

Alexander Wyatt

unread,
Jun 11, 2021, 12:41:12 AM6/11/21
to Guido Saborio, SMART Community Forum
Hi Guido, 

Apologies for the delay in a response. Have you consulted the attached guidance? 

Cheers,

Alex

--
You received this message because you are subscribed to the Google Groups "SMART Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to community+...@smartconservationsoftware.org.
To view this discussion on the web visit https://groups.google.com/a/smartconservationsoftware.org/d/msgid/community/CAEdARPuo15TouwBO8v9z%3D51qc6SbO9VO3aB8LNHOVp%3D77VbhWA%40mail.gmail.com.
R Plugin Overview.pdf

Guido Saborio

unread,
Jun 18, 2021, 10:32:46 AM6/18/21
to Alexander Wyatt, SMART Community Forum
Hi Alexander, 

I did check the guidance, but it is not clear enough for me to understand how you read the data into the R script, or what are the default script parameters.  

With the following code, I was able to read the data into the R script, but it does not allow to read data from multiple queries, as its reads the newest file into the "tempfiles" folder.  

file <- list.files(path = "C:/PATH-TO-/filestore/tempfiles", pattern = "*.csv", full.names = FALSE)
data <- lapply (file, read.delim) 
  
Pura vida

Guido

Alexander Wyatt

unread,
Jun 21, 2021, 1:11:22 AM6/21/21
to Guido Saborio, SMART Community Forum
Hi Guido, 

Please see a comment from a colleague on this: "R scripts and SMART essentially just run basic scripts to get a quick output or to convert queries into a format which is easy to read for something like R studio. It’s not a ‘full' integration. You also need to have the script which you want to run.' 

It may be that the functionality you're after isn't quite feasible at current. If you could elaborate further on what is missing / what would be most useful we would appreciate the feedback as it will help with future development (it may also be that a colleague more familiar with the functionality will be able to provide some other solution). 

Cheers,

Alex
Reply all
Reply to author
Forward
0 new messages