if (interactive()) {
# First, we use magmaRset to create an object which will tell other magmaR
# functions our authentication token (as well as some other optional bits).
# When run in this way, it will ask you to give your token.
magma <- magmaRset()
### Note that you likely do not have write-permissions for the 'example'
# project, so this code can be expected to give an authorization error.
### Retrieve some data from magma, which will be in the proper format.
df <- retrieve(
magma, projectName = "example", modelName = "rna_seq",
recordNames = "all",
attributeNames = c("tube_name", "biospecimen", "cell_number")
)
df
updateFromDF(
target = magma,
projectName = "example",
modelName = "rna_seq",
df = df)
}
Run the code above in your browser using DataLab