... | ... |
@@ -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 |
} |
... | ... |
@@ -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 |
} |
... | ... |
@@ -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 |
} |
Changed names of data, e.g., changed crookedPath to crooked_path.
... | ... |
@@ -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 |
} |
... | ... |
@@ -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 |
} |
... | ... |
@@ -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 |
... | ... |
@@ -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 |
} |
... | ... |
@@ -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 |
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 |
+} |