uploadQScript | R Documentation |
Take an arbitrary number of js files and either upload them as a custom qscript via Displayr Drive or save them locally as a single file.
uploadQScript(
...,
filename = NULL,
check.include.web = TRUE,
upload = TRUE,
api.root = Sys.getenv("API_ROOT"),
company.secret = Sys.getenv("COMPANY_SECRET"),
client.id = Sys.getenv("CLIENT_ID"),
send.to = ""
)
... |
An arbitrary number of strings that contain the paths to js files to construct the QScript. |
filename |
Name of the output file QScript. If only a single file is provided then it is deduced by the input file name by default. Otherwise the filename argument must be provided. |
check.include.web |
A logical to remove any includeWeb calls if the input files are used in the construction. E.g. if testing a Calculation feature the script might use a custom QScript Functions for Calculations.js and then call one of those functions with includeWeb. If any matches are found like this, then the line with the includeWeb is omitted. |
upload |
A logical whether to upload the script or not (useful to check the script is good before upload). |
api.root |
API root URL obtained by running |
company.secret |
A string containing the appropriate company secret to access the required Displayr drive |
client.id |
Client ID obtained by running |
send.to |
Character string the can be used to more conveniently specify
an alternative company (i.e. |
If the send.to
argument is provided, the inputs for api.root
,
company.secret
, and client.id
are ignored and it is assumed that
the user has additional environment variables setup that are used instead. For
example, if send.to = "JANE"
, then the function uses
Sys.getenv("COMPANY_SECRET_JANE")
for company.secret
(and similarly for client.id
and api.root
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.