project | R Documentation |
Creates or retrieves a Project
or multiple Projects from a
SsimLibrary.
project(
ssimObject = NULL,
project = NULL,
sourceProject = NULL,
summary = NULL,
forceElements = FALSE,
overwrite = FALSE
)
ssimObject |
|
project |
|
sourceProject |
|
summary |
logical. If |
forceElements |
logical. If |
overwrite |
logical. If |
For each element of project:
If element identifies an existing Project: Returns the existing Project.
If element identifies more than one Project: Error.
If element does not identify an existing Project: Creates a new Project named element. Note that SyncroSim automatically assigns an id to a new Project.
Returns a Project
object representing a SyncroSim Project. If
summary is TRUE
, returns a data.frame of Project names and descriptions.
## Not run:
# Set the file path and name of the new SsimLibrary
myLibraryName <- file.path(tempdir(),"testlib_project")
# Set the SyncroSim Session, SsimLibrary, and Project
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, session = mySession)
myProject <- project(ssimObject = myLibrary, project = "My project name")
myproject2 <- project(ssimObject = myLibrary, project = "My new project name")
# Get a named list of existing Projects
# Each element in the list is named by a character version of the Project ID
myProjects <- project(myLibrary, summary = FALSE)
names(myProjects)
# Get an existing Project.
myProject <- myProjects[[1]]
myProject <- project(myLibrary, project = "My new project name")
# Get/set the Project properties
name(myProject)
name(myProject) <- "New project name"
# Create a new Project from a copy of an existing Project
myNewProject <- project(myLibrary, project = "My copied project",
sourceProject = 1)
# Overwrite an existing Project
myNewProject <- project(myLibrary, project = "My copied project",
overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.