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, then update that same data.
mat <- retrieveMatrix(magma, "example", "rna_seq", "all", "gene_tpm")
updateMatrix(
target = magma,
projectName = "example",
modelName = "rna_seq",
attributeName = "gene_tpm",
matrix = mat)
}
Run the code above in your browser using DataLab