amsImport
Import an Object into the AMS

Description

Creates a new project in the AMS and imports a R object into it.

Usage

amsImport(x, projectName, path=NULL, comment="import object",
  projDescription="Project Description", objDescription=NULL,
  url, apiToken, port = 2185)

Arguments

x a R object or a packed R object to import as an artifact into the projectName project.
projectName a character value, the name for the new project.
path a character string, the path name to use for the artifact in AMS. The default is the name of the object provided as x. This value is ignored if x is already a packed object.
comment a character string, a comment for the project. This value is ignored if x is already a packed object.
projDescription a character string, a description for the project. This value is ignored if x is already a packed object.
objDescription a character string describing the object. The default is to use the call component of x if it exists. This value is ignored if x is already a packed object.
url the url for the AMS. The default is the cached value saved when amsLogin was called.
apiToken a character value, the API token to connect to the AMS. The default is cached value created when amsLogin was called.
port an numeric value, the port for connecting to the AMS. The default is cached value saved when amsLogin was called.

Details

A warning will be issued if the return status is not 200 (success).
Value
a list with components:
body a character vector with the body of the results from the connection to the AMS. This is in JSON format.
status an integer return code from the connection to the AMS. A value of 200 indicates a successful operation.
headers a character vector containing the headers returned from the connection to the AMS.
Note
R objects are converted to a base64 encoded string by amsPackObject before being uploaded to the AMS.
See Also
amsPackArtifact
Examples
## Not run: 
amsLogin("http://localhost", "fakeuser", "fakepassword")

# Create a project called "FuelProject" and add a linear model: fuel_lm01 <- lm(Fuel ~ Weight + Disp., data=Sdatasets::fuel.frame) zimport <- amsImport(fuel_lm01, "FuelProject") ## End(Not run)

Package AMS version 6.1.1-7
Package Index