Description Usage Arguments Details Value See Also Examples
Analogous to the '/update' function of magma, allows data to be sent to magma (by users with at least "editor" authorization).
1 2 3 4 5 6 7 | updateValues(
target,
projectName,
revisions = list(),
auto.proceed = FALSE,
...
)
|
target |
A list, which can be created using |
projectName |
Single string. The name of the project you would like to interact with. For options, see |
revisions |
A list of named lists containing the data to be updated. List structure:
See https://mountetna.github.io/magma.html#update for additional formatting details. |
auto.proceed |
Logical. When set to TRUE, the function does not ask before proceeding forward with the 'magma/update'. |
... |
Additional parameters passed along to the internal '.retrieve()', '.query()', or '.update()' functions, for troubleshooting or advanced-user purposes only:
|
This function mimics the activity of the magma/update function, documented here https://mountetna.github.io/magma.html#update,
with the main difference being that the revisions
input should be in nested list format rather than nested hash (because R does not support hash structures).
Internally, the function:
1. Summarizes records of each model that will be targeted for updating.
2. Prompts the user before proceeding (unless auto.proceed
is set to TRUE
)
3. Directly passes its inputs along to magma/update via a curl request.
None directly.
The function sends data to magma, and the only outputs are information reported via the console.
https://mountetna.github.io/magma.html#update for documentation of the underlying magma/update function.
updateMatrix
for a matrix-dedicated version of this function which can be provided a matrix, or matrix's file location, directly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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.
updateValues(
target = magma,
projectName = "example",
revisions = list(
# model
'rna_seq' = list(
# record
'EXAMPLE-HS1-WB1-RSQ1' = list(
# attribute
'fraction' = list(
# value(s)
"Tcells"
)
)
)
)
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.