Can't upload data with gx_get() in Rstudio tool or install GalaxyConnect into desktop R Studio

Even thought the import 1 ect message will pop up, no data files are being imported as far as I can tell.

There isn’t anything wrong here, but you need to assign the return value to some variable to be able to work with it, e.g.,

my_data <- gx_get(2)

Note: gx_get() makes the specified data available inside RStudio, but what’s returned by it is just a path to the data, for example the string "/import/2".

With this path you can then read from the resource with R functions that you’d normally use to read your input, e.g., if your data is tabular you could do sth like:

read.table(my_data, header=T, sep="\t", row.names = 1)

which in this case is equivalent to:

read.table("/import/2", header=T, sep="\t", row.names = 1)

2 Likes