| Version: | 0.0.1 | 
| Date: | 2016-01-21 | 
| Title: | Frequency Profiles Computing and Plotting | 
| Description: | Tools for generating an informative type of line graph, the frequency profile, which allows single behaviors, multiple behaviors, or the specific behavioral patterns of individual subjects to be graphed from occurrence/nonoccurrence behavioral data. | 
| License: | GPL-3 | 
| Depends: | R (≥ 3.2.2) | 
| Imports: | reshape2, ggplot2, shiny | 
| LazyData: | true | 
| URL: | https://github.com/AIBRT/FreqProf | 
| BugReports: | https://github.com/AIBRT/FreqProf/issues | 
| RoxygenNote: | 5.0.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2016-01-21 18:44:58 UTC; aibrt | 
| Author: | Robert Epstein [aut], Thomas Boulier [aut], Ronald E. Robertson [cre, aut], Jonathan Mejia [ctb], AIBRT [cph] | 
| Maintainer: | Ronald E. Robertson <rrobertson@aibrt.org> | 
| Repository: | CRAN | 
| Date/Publication: | 2016-01-21 23:48:21 | 
Interpolate multiple columns of a data.frame
Description
Interpolate multiple columns of a data.frame
Usage
approxm(data1, n, method = "linear")
Arguments
| data1 | a  | 
| n | the number of points to interpolate | 
| method | the method to interpolate by,  | 
Value
Returns a data.frame of all data1 variables
interpolated to n rows.
See Also
approx is the underlying function and has more
options
Correlation test for multiple variables - of the same name - in separate data.frames
Description
Correlation test for multiple variables - of the same name - in separate data.frames
Usage
cor.testm(data1, data2, method)
Arguments
| data1 | a  | 
| data2 | a  | 
| method | a correlation method, either  | 
Value
Returns a data.frame of correlation test data for N variables
See Also
cor.test is the underlying function and has more
options
Convert data to moving sum/prop.
Description
Convert data to moving sum/prop.
Usage
freqprof(data.behavior, window = round(0.25 * nrow(data.behavior)),
  step = 1, resolution = 1, which = c("sum", "proportion"))
Arguments
| data.behavior | a data.frame containing occurrence/nonoccurrence data in binary (0/1) format | 
| window | the window length to use in computing a moving sum or proportion | 
| step | the number of bins of which the data will be translated. | 
| resolution | the number of points contained in a bin | 
| which | giving the moving function to apply: sum or proportion | 
Value
The data in a freqprof object.
Examples
data(s58)
freqprof(s58)
Internal ggplot Wrapper to Graph Frequency Profiles
Description
Internal ggplot Wrapper to Graph Frequency Profiles
Usage
ggplot_fp(data1, resolution = resolution, step = step, yAxis = yAxis,
  xAxisUnits = xAxisUnits, xmin = xmin, xmax = xmax,
  tick.every = tick.every, label.every = label.every)
Arguments
| data1 | data formated into  | 
| resolution | resolution of  | 
| step | step size of  | 
| yAxis | a string providing a label for the y-axis. | 
| xAxisUnits | a string indicating which unit has been used. By default, "sec". | 
| xmin | x-axis minimum value | 
| xmax | x-axis maximum value | 
| tick.every | the spacing between each tick. By default, N/30 where N is the number of time units. | 
| label.every | label every X ticks, where X = label.every. By default, label.every = 3. | 
Value
A ggplot of the frequency profile data in data1
Import Data Pop Up
Description
This function reads a file, whose extension is either csv, bin or fpw, and imports it as a data.frame.
Usage
import_data(filename = file.choose())
Arguments
| filename | a string indicating the path of the file containing the data. By default, will open a pop-up so that the user can choose a file with the GUI. | 
Value
A data.frame ready to be converted into freqprof class (see function 
freqprof).
Examples
 
 # Select a file
 import_data(filename = system.file("extdata", "S58-1-1.bin", 
                                    package = "FreqProf"))
 
Kolmogorov-Smirnov test for multiple variables - of the same name - in separate data.frames
Description
Kolmogorov-Smirnov test for multiple variables - of the same name - in separate data.frames
Usage
ks.testm(data1, data2, vars)
Arguments
| data1 | a  | 
| data2 | a  | 
| vars | a  | 
Value
Returns a data.frame with Kolmogorov-Smivnov test data for N
variables
See Also
ks.test is the underlying function and has more
options.
Internal function for Generating Moving Sum or Proportion
Description
Internal function in freqprof that is used to generate moving 
sum or proportion data.
Usage
movfun(x, n, s, r, fun)
Arguments
| x | data passed from  | 
| n | window length passed from  | 
| s | step size passed from  | 
| r | resolution passed from  | 
| fun | "sum" or "proportion" passed from  | 
Value
Returns a list containing the processed data into $movfun, and the 
associated panels into $panels. Passes list to freqprof.
Plot Frequency Profiles.
Description
Use plot_freqprof to plot frequency profile data generated from 
freqprof.
Usage
plot_freqprof(data.freqprof, yAxis = NULL, xAxisUnits = "sec",
  panel.in = TRUE, panel.out = TRUE, gg = FALSE, multiPlot = FALSE,
  tick.every = round(length(data.freqprof$data$time)/31), label.every = 3)
Arguments
| data.freqprof | data formated into class  | 
| yAxis | a string labelling the y-axis, defaults to 
 | 
| xAxisUnits | a string indicating x-axis units, defaults to "sec". | 
| panel.in | if  | 
| panel.out | if  | 
| gg | if  | 
| multiPlot | if  | 
| tick.every | the spacing between each plot tick mark. By default, N/30 where N is the number of time units. | 
| label.every | label every X ticks, where X = label.every. By default, label.every = 3. | 
Value
Returns a frequency profiles plot.
Examples
data(s58)
plot_freqprof(freqprof(s58))
Internal function for Resolution Adjustment
Description
Internal function in freqprof 
that is used to modify data resolution.
Usage
radj(x, r)
Arguments
| x | data data passed from  | 
| r | resolution passed from  | 
Value
Resolution adjustment.
Reads the data in the file "filename", which is supposed to be a .bin file
Description
Reads the data in the file "filename", which is supposed to be a .bin file
Usage
read.bin(filename)
Arguments
| filename | a string indicating the path of the file. | 
Value
A data.frame giving the raw data.
Examples
 
 read.bin(filename = system.file("extdata", "S58-1-1.bin",
                                 package = "FreqProf"))
 
Reads the data in the file "filename", which is supposed to be a .fpw file
Description
Reads the data in the file "filename", which is supposed to be a .fpw file
Usage
read.fpw(filename)
Arguments
| filename | a string indicating the path of the file. | 
Value
A data.frame of the .fpw data.
Run interactive FreqProf example (Shiny App)
Description
Run interactive FreqProf example (Shiny App)
Usage
runEx()
Examples
 runEx()
Occurrence/nonoccurrence data for four behaviors from a single subject
Description
A dataset containing the occurrence/nonoccurence data for four behaviors of a single subject over 3092 observations. Each behavior corresponds to touches on areas of a touchpad.
Usage
s58
Format
A data.frame with 3092 rows and 4 variables
- V1
- Behavior 1 
- V2
- Behavior 2 
- V3
- Behavior 3 
- V4
- Behavior 4