Browse code

extra formatting changes

AnnaLaddach authored on 13/01/2021 14:06:05
Showing1 changed files
... ...
@@ -5,12 +5,12 @@
5 5
 \title{Produce random paths modeled on a given path}
6 6
 \usage{
7 7
 generateRandomPaths(
8
-  path,
9
-  from = 1,
10
-  to = nrow(path),
11
-  d = ncol(path),
12
-  randomizationParams,
13
-  N
8
+path,
9
+from = 1,
10
+to = nrow(path),
11
+d = ncol(path),
12
+randomizationParams,
13
+N
14 14
 )
15 15
 }
16 16
 \arguments{
... ...
@@ -47,6 +47,6 @@ randomizationParams.
47 47
 \examples{
48 48
 randomizationParams = c('byPermutation','permuteWithinColumns')
49 49
 randomPaths = generateRandomPaths(crooked_path,from=6,to=nrow(crooked_path),
50
-              d=ncol(crooked_path),randomizationParams=randomizationParams,
51
-              N=10)
50
+            d=ncol(crooked_path),randomizationParams=randomizationParams,
51
+            N=10)
52 52
 }
Browse code

Updated data.R to reference the TrajectoryGeometryData repository and updated the man/... files accordingly.

Michael Shapiro authored on 12/01/2021 16:40:02
Showing1 changed files
... ...
@@ -5,12 +5,12 @@
5 5
 \title{Produce random paths modeled on a given path}
6 6
 \usage{
7 7
 generateRandomPaths(
8
-path,
9
-from = 1,
10
-to = nrow(path),
11
-d = ncol(path),
12
-randomizationParams,
13
-N
8
+  path,
9
+  from = 1,
10
+  to = nrow(path),
11
+  d = ncol(path),
12
+  randomizationParams,
13
+  N
14 14
 )
15 15
 }
16 16
 \arguments{
... ...
@@ -47,6 +47,6 @@ randomizationParams.
47 47
 \examples{
48 48
 randomizationParams = c('byPermutation','permuteWithinColumns')
49 49
 randomPaths = generateRandomPaths(crooked_path,from=6,to=nrow(crooked_path),
50
-            d=ncol(crooked_path),randomizationParams=randomizationParams,
51
-            N=10)
50
+              d=ncol(crooked_path),randomizationParams=randomizationParams,
51
+              N=10)
52 52
 }
Browse code

whitespace, line-lengths and single-cell data sources sorted

AnnaLaddach authored on 12/01/2021 14:29:44
Showing1 changed files
... ...
@@ -5,12 +5,12 @@
5 5
 \title{Produce random paths modeled on a given path}
6 6
 \usage{
7 7
 generateRandomPaths(
8
-  path,
9
-  from = 1,
10
-  to = nrow(path),
11
-  d = ncol(path),
12
-  randomizationParams,
13
-  N
8
+path,
9
+from = 1,
10
+to = nrow(path),
11
+d = ncol(path),
12
+randomizationParams,
13
+N
14 14
 )
15 15
 }
16 16
 \arguments{
... ...
@@ -47,6 +47,6 @@ randomizationParams.
47 47
 \examples{
48 48
 randomizationParams = c('byPermutation','permuteWithinColumns')
49 49
 randomPaths = generateRandomPaths(crooked_path,from=6,to=nrow(crooked_path),
50
-              d=ncol(crooked_path),randomizationParams=randomizationParams,
51
-              N=10)
50
+            d=ncol(crooked_path),randomizationParams=randomizationParams,
51
+            N=10)
52 52
 }
Browse code

Removed documentation for functions which are not exported.

Changed names of data, e.g., changed crookedPath to crooked_path.

Michael Shapiro authored on 01/01/2021 16:41:44
Showing1 changed files
... ...
@@ -5,12 +5,12 @@
5 5
 \title{Produce random paths modeled on a given path}
6 6
 \usage{
7 7
 generateRandomPaths(
8
-path,
9
-from = 1,
10
-to = nrow(path),
11
-d = ncol(path),
12
-randomizationParams,
13
-N
8
+  path,
9
+  from = 1,
10
+  to = nrow(path),
11
+  d = ncol(path),
12
+  randomizationParams,
13
+  N
14 14
 )
15 15
 }
16 16
 \arguments{
... ...
@@ -46,6 +46,7 @@ randomizationParams.
46 46
 }
47 47
 \examples{
48 48
 randomizationParams = c('byPermutation','permuteWithinColumns')
49
-randomPaths = generateRandomPaths(crookedPath,from=6,to=nrow(crookedPath),
50
-            d=ncol(crookedPath),randomizationParams=randomizationParams,N=10)
49
+randomPaths = generateRandomPaths(crooked_path,from=6,to=nrow(crooked_path),
50
+              d=ncol(crooked_path),randomizationParams=randomizationParams,
51
+              N=10)
51 52
 }
Browse code

most whitespace sorted out

AnnaLaddach authored on 15/12/2020 15:29:10
Showing1 changed files
... ...
@@ -5,12 +5,12 @@
5 5
 \title{Produce random paths modeled on a given path}
6 6
 \usage{
7 7
 generateRandomPaths(
8
-  path,
9
-  from = 1,
10
-  to = nrow(path),
11
-  d = ncol(path),
12
-  randomizationParams,
13
-  N
8
+path,
9
+from = 1,
10
+to = nrow(path),
11
+d = ncol(path),
12
+randomizationParams,
13
+N
14 14
 )
15 15
 }
16 16
 \arguments{
... ...
@@ -47,5 +47,5 @@ randomizationParams.
47 47
 \examples{
48 48
 randomizationParams = c('byPermutation','permuteWithinColumns')
49 49
 randomPaths = generateRandomPaths(crookedPath,from=6,to=nrow(crookedPath),
50
-              d=ncol(crookedPath),randomizationParams=randomizationParams,N=10)
50
+            d=ncol(crookedPath),randomizationParams=randomizationParams,N=10)
51 51
 }
Browse code

Wrote a function to measure the progression of a path in a direction and jazzed up the vignette to reflect this.

Michael Shapiro authored on 09/06/2020 15:54:24
Showing1 changed files
... ...
@@ -35,7 +35,7 @@ details.}
35 35
 }
36 36
 \value{
37 37
 This function returns a list of random paths.  Each path is
38
-    a matrix.  Note that each random path begins at the origin.
38
+    a matrix.
39 39
 }
40 40
 \description{
41 41
 This function takes a path and produces N random paths of the same
Browse code

This modifies the path randomization so that paths can be randomized either by permutation of the matrix or by taking steps.

Michael Shapiro authored on 03/06/2020 16:40:36
Showing1 changed files
... ...
@@ -9,7 +9,7 @@ generateRandomPaths(
9 9
   from = 1,
10 10
   to = nrow(path),
11 11
   d = ncol(path),
12
-  preserveLengths = TRUE,
12
+  randomizationParams,
13 13
   N
14 14
 )
15 15
 }
... ...
@@ -26,9 +26,10 @@ nrow(path).}
26 26
 \item{d}{- The dimension under consideration.  This defaults to
27 27
 ncol(path)}
28 28
 
29
-\item{preserveLengths}{- If this is set to TRUE, the steps of the
30
-random paths have the same euclidean length as those of the
31
-give path.  Otherwise they hav length 1.}
29
+\item{randomizationParams}{- A character vector controling the
30
+randomization method used.  It's first entry must be either
31
+'byPermutation' or 'bySteps'  See the vignette for further
32
+details.}
32 33
 
33 34
 \item{N}{- The number of random paths required.}
34 35
 }
... ...
@@ -38,12 +39,13 @@ This function returns a list of random paths.  Each path is
38 39
 }
39 40
 \description{
40 41
 This function takes a path and produces N random paths of the same
41
-dimension and length based on it. The steps along the random paths
42
-are based on uniform sampling of the unit sphere.  If 
43
-preserveLengths is set to TRUE, the random paths of steps of the
44
-same length as the original path.  Otherwise, the steps are all
45
-length 1.
42
+dimension and length based on it.  This can be done either by
43
+permuting the entries in path or by taking steps from the initial
44
+point of path.  Exact behaviour is controlled by
45
+randomizationParams.
46 46
 }
47 47
 \examples{
48
-randomPaths = generateRandomPaths(crookedPath,from=6,N=10)
48
+randomizationParams = c('byPermutation','permuteWithinColumns')
49
+randomPaths = generateRandomPaths(crookedPath,from=6,to=nrow(crookedPath),
50
+              d=ncol(crookedPath),randomizationParams=randomizationParams,N=10)
49 51
 }
Browse code

Documented the data in R/data.R

Michael Shapiro authored on 26/05/2020 14:25:19
Showing1 changed files
... ...
@@ -44,3 +44,6 @@ preserveLengths is set to TRUE, the random paths of steps of the
44 44
 same length as the original path.  Otherwise, the steps are all
45 45
 length 1.
46 46
 }
47
+\examples{
48
+randomPaths = generateRandomPaths(crookedPath,from=6,N=10)
49
+}
Browse code

The changes to the documentaion are the result of a misconception as to the source of some problems. HOWEVER I was able to track down and fix some bugs and successfully run testPathForDirectionality using straightPath as my test data.

Michael Shapiro authored on 21/05/2020 16:56:41
Showing1 changed files
... ...
@@ -6,8 +6,8 @@
6 6
 \usage{
7 7
 generateRandomPaths(
8 8
   path,
9
-  start = 1,
10
-  end = nrow(path),
9
+  from = 1,
10
+  to = nrow(path),
11 11
   d = ncol(path),
12 12
   preserveLengths = TRUE,
13 13
   N
... ...
@@ -17,10 +17,10 @@ generateRandomPaths(
17 17
 \item{path}{- This is an mxn dimensional matrix. Each row is
18 18
 considered a point.}
19 19
 
20
-\item{start}{- The starting place along the path which will be
20
+\item{from}{- The starting place along the path which will be
21 21
 treated as the center of the sphere.  This defaults to 1.}
22 22
 
23
-\item{end}{- The end point of the path.  This defaults to
23
+\item{to}{- The end point of the path.  This defaults to
24 24
 nrow(path).}
25 25
 
26 26
 \item{d}{- The dimension under consideration.  This defaults to
Browse code

This now contains code and documentation.

Michael Shapiro authored on 10/04/2020 11:42:19
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/TrajectoryGeometry.R
3
+\name{generateRandomPaths}
4
+\alias{generateRandomPaths}
5
+\title{Produce random paths modeled on a given path}
6
+\usage{
7
+generateRandomPaths(
8
+  path,
9
+  start = 1,
10
+  end = nrow(path),
11
+  d = ncol(path),
12
+  preserveLengths = TRUE,
13
+  N
14
+)
15
+}
16
+\arguments{
17
+\item{path}{- This is an mxn dimensional matrix. Each row is
18
+considered a point.}
19
+
20
+\item{start}{- The starting place along the path which will be
21
+treated as the center of the sphere.  This defaults to 1.}
22
+
23
+\item{end}{- The end point of the path.  This defaults to
24
+nrow(path).}
25
+
26
+\item{d}{- The dimension under consideration.  This defaults to
27
+ncol(path)}
28
+
29
+\item{preserveLengths}{- If this is set to TRUE, the steps of the
30
+random paths have the same euclidean length as those of the
31
+give path.  Otherwise they hav length 1.}
32
+
33
+\item{N}{- The number of random paths required.}
34
+}
35
+\value{
36
+This function returns a list of random paths.  Each path is
37
+    a matrix.  Note that each random path begins at the origin.
38
+}
39
+\description{
40
+This function takes a path and produces N random paths of the same
41
+dimension and length based on it. The steps along the random paths
42
+are based on uniform sampling of the unit sphere.  If 
43
+preserveLengths is set to TRUE, the random paths of steps of the
44
+same length as the original path.  Otherwise, the steps are all
45
+length 1.
46
+}