Browse code

implement sandbox

Yihang Xin authored on 27/03/2021 06:47:14
Showing 6 changed files

... ...
@@ -107,6 +107,7 @@ export(getCurrentSandboxName)
107 107
 export(getCurrentSandboxPath)
108 108
 export(getCurrentStyle)
109 109
 export(getDefaultSandbox)
110
+export(getDefaultSandboxPath)
110 111
 export(getDisabledApps)
111 112
 export(getEdgeColor)
112 113
 export(getEdgeCount)
... ...
@@ -210,6 +211,7 @@ export(setCurrentNetwork)
210 211
 export(setCurrentSandbox)
211 212
 export(setCurrentView)
212 213
 export(setDefaultSandbox)
214
+export(setDefaultSandboxPath)
213 215
 export(setEdgeColorBypass)
214 216
 export(setEdgeColorDefault)
215 217
 export(setEdgeColorMapping)
... ...
@@ -53,6 +53,33 @@ getDefaultSandbox <- function(){
53 53
     return(.GlobalEnv$defaultSandbox)
54 54
 }
55 55
 
56
+# ------------------------------------------------------------------------------
57
+#' @title setDefaultSandboxPath
58
+#'
59
+#' @description setDefaultSandboxPath
60
+#' @return default sandbox path
61
+#' @examples \donttest{
62
+#' setDefaultSandboxPath()
63
+#' }
64
+#' @export
65
+setDefaultSandboxPath <- function(newPath){
66
+    .GlobalEnv$defaultSandboxPath <- newPath
67
+    return(.GlobalEnv$defaultSandboxPath)
68
+}
69
+
70
+# ------------------------------------------------------------------------------
71
+#' @title getDefaultSandboxPath
72
+#'
73
+#' @description getDefaultSandboxPath
74
+#' @return default sandbox path
75
+#' @examples \donttest{
76
+#' getDefaultSandboxPath()
77
+#' }
78
+#' @export
79
+getDefaultSandboxPath <- function(){
80
+    return(.GlobalEnv$defaultSandboxPath)
81
+}
82
+
56 83
 # ------------------------------------------------------------------------------
57 84
 #' @title getCurrentSandboxName
58 85
 #'
59 86
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/RCy3-sandbox.R
3
+\name{getDefaultSandboxPath}
4
+\alias{getDefaultSandboxPath}
5
+\title{getDefaultSandboxPath}
6
+\usage{
7
+getDefaultSandboxPath()
8
+}
9
+\value{
10
+default sandbox path
11
+}
12
+\description{
13
+getDefaultSandboxPath
14
+}
15
+\examples{
16
+\donttest{
17
+getDefaultSandboxPath()
18
+}
19
+}
... ...
@@ -10,7 +10,7 @@ runningRemoteCheck(newState = NULL)
10 10
 \item{newState}{new state of running remote}
11 11
 }
12 12
 \value{
13
-old state
13
+oldState
14 14
 }
15 15
 \description{
16 16
 runningRmoteCheck
17 17
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/RCy3-sandbox.R
3
+\name{setDefaultSandboxPath}
4
+\alias{setDefaultSandboxPath}
5
+\title{setDefaultSandboxPath}
6
+\usage{
7
+setDefaultSandboxPath(newPath)
8
+}
9
+\value{
10
+default sandbox path
11
+}
12
+\description{
13
+setDefaultSandboxPath
14
+}
15
+\examples{
16
+\donttest{
17
+setDefaultSandboxPath()
18
+}
19
+}
... ...
@@ -10,7 +10,7 @@ setNotebookIsRunning(newState = NULL)
10 10
 \item{newState}{new state of running remote}
11 11
 }
12 12
 \value{
13
-oldSatte
13
+oldState
14 14
 }
15 15
 \description{
16 16
 setNotebookIsRunning