-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathclean_viewr.Rd
104 lines (90 loc) · 3.45 KB
/
clean_viewr.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/all_in_one_functions.R
\name{clean_viewr}
\alias{clean_viewr}
\title{All-in-one function to clean imported objects}
\usage{
clean_viewr(
obj_name,
relabel_viewr_axes = TRUE,
gather_tunnel_data = TRUE,
trim_tunnel_outliers = TRUE,
standardization_option = "rotate_tunnel",
get_velocity = TRUE,
select_x_percent = TRUE,
rename_viewr_characters = FALSE,
separate_trajectories = TRUE,
get_full_trajectories = TRUE,
fill_traj_gaps = FALSE,
...
)
}
\arguments{
\item{obj_name}{The input viewr object; a tibble or data.frame with attribute
\code{pathviewr_steps} that includes \code{"viewr"}}
\item{relabel_viewr_axes}{default TRUE, should axes be relabeled?}
\item{gather_tunnel_data}{default TRUE, should tunnel data be gathered?}
\item{trim_tunnel_outliers}{default TRUE, outliers be trimmed?}
\item{standardization_option}{default "rotate_tunnel"; which standardization
option should be used? See Details for more.}
\item{get_velocity}{default TRUE, should velocity be computed?}
\item{select_x_percent}{default TRUE, should a region of interest be
selected?}
\item{rename_viewr_characters}{default FALSE, should subjects be renamed?}
\item{separate_trajectories}{default TRUE, should trajectories be defined?}
\item{get_full_trajectories}{default TRUE, should only full trajectories be
retained?}
\item{fill_traj_gaps}{default FALSE, should gaps in trajectories be filled?}
\item{...}{Additional arguments passed to any of the corresponding functions}
}
\value{
A viewr object (tibble or data.frame with attribute
\code{pathviewr_steps} that includes \code{"viewr"}) that has passed
through several \code{pathviewr} functions as desired by the user,
resulting in data that have been cleaned and ready for analyses.
}
\description{
For an imported viewr object, run through the cleaning pipeline as desired
}
\details{
Each argument corresponds to a standalone function in
\code{pathviewr}. E.g. the parameter \code{relabel_viewr_axes} allows a
user to choose whether \code{pathviewr::relabel_viewr_axes()} is run
internally. Should the user desire to use any non-default parameter values
for any functions included here, they should be supplied to this function
as additional arguments formatted exactly as they would appear in their
corresponding function(s). E.g. if the "autodetect" feature in
\code{pathviewr::separate_trajectories()} is desired, add an argument
\code{max_frame_gap = "autodetect"} to the arguments supplied to this
function.
}
\examples{
library(pathviewr)
## Import the example Motive data included in the package
motive_data <-
read_motive_csv(system.file("extdata", "pathviewr_motive_example_data.csv",
package = 'pathviewr'))
motive_full <-
motive_data \%>\%
clean_viewr(desired_percent = 50,
max_frame_gap = "autodetect",
span = 0.95)
## Alternatively, used the import_and_clean_viewr()
## function to combine these steps
motive_import_and_clean <-
import_and_clean_viewr(
file_name = system.file("extdata", "pathviewr_motive_example_data.csv",
package = 'pathviewr'),
desired_percent = 50,
max_frame_gap = "autodetect",
span = 0.95
)
}
\seealso{
Other all in one functions:
\code{\link{import_and_clean_viewr}()}
}
\author{
Vikram B. Baliga
}
\concept{all in one functions}