diff --git a/README.Rmd b/README.Rmd index 5a7acaaa..865ae4d0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -20,7 +20,8 @@ knitr::opts_chunk$set( [![R build status](https://github.com/ropensci/pathviewr/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/pathviewr/actions) [![Codecov test coverage](https://codecov.io/gh/ropensci/pathviewr/graph/badge.svg)](https://codecov.io/gh/ropensci/pathviewr?branch=master) [![](https://badges.ropensci.org/409_status.svg)](https://github.com/ropensci/software-review/issues/409) -[![DOI](https://zenodo.org/badge/268906628.svg)](https://zenodo.org/badge/latestdoi/268906628) +[![DOI](https://zenodo.org/badge/268906628.svg)](https://zenodo.org/badge/latestdoi/268906628) +[![CRAN status](https://www.r-pkg.org/badges/version/pathviewr)](https://CRAN.R-project.org/package=pathviewr) `pathviewr` offers tools to import, clean, and visualize movement data, @@ -35,9 +36,15 @@ perception of visual stimuli. ## Installation -This package can be installed via: -``` r -#install.packages("devtools") # if devtools is not installed +You can install `pathviewr` from CRAN via: + +``` {r install_cran, eval = FALSE} +install.packages("pathviewr") +``` + +Or to get the latest (developmental) version through GitHub, use: + +``` {r install_github, eval = FALSE} devtools::install_github("ropensci/pathviewr") ``` diff --git a/README.md b/README.md index b2f98186..625564ac 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ status](https://github.com/ropensci/pathviewr/workflows/R-CMD-check/badge.svg)]( coverage](https://codecov.io/gh/ropensci/pathviewr/graph/badge.svg)](https://codecov.io/gh/ropensci/pathviewr?branch=master) [![](https://badges.ropensci.org/409_status.svg)](https://github.com/ropensci/software-review/issues/409) [![DOI](https://zenodo.org/badge/268906628.svg)](https://zenodo.org/badge/latestdoi/268906628) +[![CRAN +status](https://www.r-pkg.org/badges/version/pathviewr)](https://CRAN.R-project.org/package=pathviewr) `pathviewr` offers tools to import, clean, and visualize movement data, @@ -28,10 +30,15 @@ subject position to estimate perception of visual stimuli. ## Installation -This package can be installed via: +You can install `pathviewr` from CRAN via: + +``` r +install.packages("pathviewr") +``` + +Or to get the latest (developmental) version through GitHub, use: ``` r -#install.packages("devtools") # if devtools is not installed devtools::install_github("ropensci/pathviewr") ``` @@ -111,7 +118,7 @@ has passed through the pipeline. ``` r ## Check out the data's structure before cleaning and wrangling: str(motive_data) -#> tibble [934 × 26] (S3: tbl_df/tbl/data.frame) +#> tibble[,26] [934 x 26] (S3: tbl_df/tbl/data.frame) #> $ frame : int [1:934] 72210 72211 72212 72213 72214 72215 72216 72217 72218 72219 ... #> $ time_sec : num [1:934] 722 722 722 722 722 ... #> $ device02_rotation_x : num [1:934] 0.1346 0.0819 0.2106 0.1961 0.1305 ... @@ -141,7 +148,7 @@ str(motive_data) #> - attr(*, ".internal.selfref")= #> - attr(*, "pathviewr_steps")= chr "viewr" #> - attr(*, "file_id")= chr "pathviewr_motive_example_data.csv" -#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-03-15 16:34:52" +#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-05-06 08:57:14" #> - attr(*, "frame_rate")= num 100 #> - attr(*, "header")='data.frame': 11 obs. of 2 variables: #> ..$ metadata: chr [1:11] "Format Version" "Take Name" "Take Notes" "Capture Frame Rate" ... @@ -158,7 +165,7 @@ str(motive_data) ## Check out the data's structure after cleaning and wrangling: str(motive_allinone) -#> tibble [449 × 24] (S3: tbl_df/tbl/data.frame) +#> tibble[,24] [449 x 24] (S3: tbl_df/tbl/data.frame) #> $ frame : int [1:449] 72213 72214 72215 72216 72217 72218 72219 72220 72221 72222 ... #> $ time_sec : num [1:449] 722 722 722 722 722 ... #> $ subject : chr [1:449] "device02" "device02" "device02" "device02" ... @@ -184,7 +191,7 @@ str(motive_allinone) #> $ end_length_sign : num [1:449] -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ... #> $ direction : chr [1:449] "leftwards" "leftwards" "leftwards" "leftwards" ... #> - attr(*, "file_id")= chr "pathviewr_motive_example_data.csv" -#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-03-15 16:34:52" +#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-05-06 08:57:14" #> - attr(*, "frame_rate")= num 100 #> - attr(*, "header")='data.frame': 11 obs. of 2 variables: #> ..$ metadata: chr [1:11] "Format Version" "Take Name" "Take Notes" "Capture Frame Rate" ... @@ -321,6 +328,6 @@ clean, and visualize animal movement data in R*. R package version ## License -GPL (\>= 3) + file LICENSE +GPL (>= 3) + file LICENSE 🐢 diff --git a/codemeta.json b/codemeta.json index cf3512de..5497862a 100644 --- a/codemeta.json +++ b/codemeta.json @@ -258,7 +258,7 @@ } ], "readme": "https://github.com/ropensci/pathviewr/blob/master/README.md", - "fileSize": "11637.19KB", + "fileSize": "10753.257KB", "contIntegration": "https://codecov.io/gh/ropensci/pathviewr?branch=master", "developmentStatus": "https://www.repostatus.org/#active", "citation": [ @@ -307,7 +307,8 @@ }, "relatedLink": [ "https://docs.ropensci.org/pathviewr", - "https://docs.ropensci.org/pathviewr/" + "https://docs.ropensci.org/pathviewr/", + "https://CRAN.R-project.org/package=pathviewr" ], "keywords": [ "movement-data", @@ -322,5 +323,11 @@ "trajectory-analysis", "trajectories" ], - "releaseNotes": "https://github.com/ropensci/pathviewr/blob/master/NEWS.md" + "releaseNotes": "https://github.com/ropensci/pathviewr/blob/master/NEWS.md", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + } } diff --git a/docs/articles/data-import-cleaning.html b/docs/articles/data-import-cleaning.html index 10325400..69537725 100644 --- a/docs/articles/data-import-cleaning.html +++ b/docs/articles/data-import-cleaning.html @@ -98,7 +98,7 @@

Basics of data import and cleaning in pathviewr

Vikram B. Baliga

-

2021-05-04

+

2021-05-06

Source: vignettes/data-import-cleaning.Rmd diff --git a/docs/articles/managing-frame-gaps.html b/docs/articles/managing-frame-gaps.html index 5c44be78..4d937717 100644 --- a/docs/articles/managing-frame-gaps.html +++ b/docs/articles/managing-frame-gaps.html @@ -98,7 +98,7 @@

Managing frame gaps with pathviewr

Melissa S. Armstrong

-

2021-05-04

+

2021-05-06

Source: vignettes/managing-frame-gaps.Rmd diff --git a/docs/articles/visual-perception-functions.html b/docs/articles/visual-perception-functions.html index 82a77ad2..c4ba30f9 100644 --- a/docs/articles/visual-perception-functions.html +++ b/docs/articles/visual-perception-functions.html @@ -98,7 +98,7 @@

Estimating visual perceptions from tracking data

Eric R. Press

-

2021-05-04

+

2021-05-06

Source: vignettes/visual-perception-functions.Rmd diff --git a/docs/index.html b/docs/index.html index f5ba2701..19ae248d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -111,10 +111,12 @@

Installation

-

This package can be installed via:

+

You can install pathviewr from CRAN via:

-#install.packages("devtools") # if devtools is not installed
-devtools::install_github("ropensci/pathviewr")
+install.packages("pathviewr")
+

Or to get the latest (developmental) version through GitHub, use:

+
+devtools::install_github("ropensci/pathviewr")

@@ -124,12 +126,12 @@

Data import and cleaning via pathviewr

We’ll also load two tidyverse packages for wrangling & plotting in this readme.

-
+
 

We will import and clean a sample data set from .csv files exported by Optitrack’s Motive software. For examples of how to import and clean other types of data, see the Basics of data import and cleaning vignette.

-
+
 ## Import the Motive example data included in 
 ## the package
 
@@ -139,7 +141,7 @@ 

package = 'pathviewr') )

Several functions to clean and wrangle data are available, and we have a suggested pipeline for how these steps should be handled. For this example, we will use one of two “all-in-one” functions: clean_viewr(). See the Basics of data import and cleaning vignette for the full pipeline and the other “all-in-one” function.

-
+
 motive_allinone <-
   motive_data %>%
   clean_viewr(
@@ -170,10 +172,10 @@ 

)

To get a sense of what we’ve done, compare the data before and after it has passed through the pipeline.

-
+
 ## Check out the data's structure before cleaning and wrangling:
 str(motive_data)
-#> tibble [934 × 26] (S3: tbl_df/tbl/data.frame)
+#> tibble[,26] [934 x 26] (S3: tbl_df/tbl/data.frame)
 #>  $ frame                     : int [1:934] 72210 72211 72212 72213 72214 72215 72216 72217 72218 72219 ...
 #>  $ time_sec                  : num [1:934] 722 722 722 722 722 ...
 #>  $ device02_rotation_x       : num [1:934] 0.1346 0.0819 0.2106 0.1961 0.1305 ...
@@ -203,7 +205,7 @@ 

#> - attr(*, ".internal.selfref")=<externalptr> #> - attr(*, "pathviewr_steps")= chr "viewr" #> - attr(*, "file_id")= chr "pathviewr_motive_example_data.csv" -#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-03-15 16:34:52" +#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-05-06 08:57:14" #> - attr(*, "frame_rate")= num 100 #> - attr(*, "header")='data.frame': 11 obs. of 2 variables: #> ..$ metadata: chr [1:11] "Format Version" "Take Name" "Take Notes" "Capture Frame Rate" ... @@ -220,7 +222,7 @@

## Check out the data's structure after cleaning and wrangling: str(motive_allinone) -#> tibble [449 × 24] (S3: tbl_df/tbl/data.frame) +#> tibble[,24] [449 x 24] (S3: tbl_df/tbl/data.frame) #> $ frame : int [1:449] 72213 72214 72215 72216 72217 72218 72219 72220 72221 72222 ... #> $ time_sec : num [1:449] 722 722 722 722 722 ... #> $ subject : chr [1:449] "device02" "device02" "device02" "device02" ... @@ -246,7 +248,7 @@

#> $ end_length_sign : num [1:449] -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ... #> $ direction : chr [1:449] "leftwards" "leftwards" "leftwards" "leftwards" ... #> - attr(*, "file_id")= chr "pathviewr_motive_example_data.csv" -#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-03-15 16:34:52" +#> - attr(*, "file_mtime")= POSIXct[1:1], format: "2021-05-06 08:57:14" #> - attr(*, "frame_rate")= num 100 #> - attr(*, "header")='data.frame': 11 obs. of 2 variables: #> ..$ metadata: chr [1:11] "Format Version" "Take Name" "Take Notes" "Capture Frame Rate" ... @@ -282,7 +284,7 @@

Add more info about experiments

Now that our objects have been cleaned, we will use insert_treatments() to add information about the experiments that are necessary for calculating visual perceptions.

The data from this example were recorded in a V-shaped tunnel. Accordingly, the vertex angle and vertex height of the tunnel, along with information about the visual stimuli used during the experiment, will be added to the data to inform calculations of visual perception (next section).

-
+
 motive_V <- 
   motive_allinone %>%
   insert_treatments(
@@ -302,14 +304,14 @@ 

Estimate perception of visual stimuli

To calculate the spatial frequency of the visual stimuli as perceived by the subject some distance from the stimuli, we will use get_sf().

This will require two intermediate steps: 1) calculating the minimum distance between a subject and each wall (via calc_min_dist_v()) and 2) estimating the visual angles from the subject’s perspective (get_vis_angle()).

-
+
 motive_V_sf <- 
   motive_V %>%
   calc_min_dist_v(simplify_output = TRUE) %>%
   get_vis_angle() %>%
   get_sf()

Visualizing the calculations provides an more intuitive understanding of how these visual perceptions change as the subject moves throughout the tunnel. Please see the vignette on Estimating visual perceptions from tracking data for more examples of visualizing calculations.

-
+
 ggplot(motive_V_sf, aes(x = position_width, y = position_height)) +
   geom_point(aes(color = sf_pos), shape=1, size=3) +
   geom_segment(aes(x = 0,         # dimensions of the positive wall
@@ -353,6 +355,8 @@ 

diff --git a/docs/news/index.html b/docs/news/index.html index 7365b496..40fd28bf 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -142,7 +142,8 @@

Changelog

-pathviewr 1.0.0

+pathviewr 1.0.0 Unreleased +
  • Package has been accepted by rOpenSci and is now hosted on ropensci/pathviewr
  • No changes to code since v0.9.5
  • @@ -150,14 +151,16 @@

-pathviewr 0.9.5

+pathviewr 0.9.5 Unreleased +
  • Package has been updated to incorporate feedback from rOpenSci reviewers @asbonnetlebrun and @marcosci, along with editor @maelle. See here for more details: ropensci/software-review#409

-pathviewr 0.9.4

+pathviewr 0.9.4 Unreleased +
  • We are targeting a submission to rOpenSci in the near future (hopefully today). This version of pathviewr has been prepped according to rOpenSci’s “Packages: Development, Maintenance, and Peer Review” guide.
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 27b05609..de44f424 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,7 +5,7 @@ articles: data-import-cleaning: data-import-cleaning.html managing-frame-gaps: managing-frame-gaps.html visual-perception-functions: visual-perception-functions.html -last_built: 2021-05-05T01:28Z +last_built: 2021-05-06T15:57Z urls: reference: https://docs.ropensci.org/pathviewr/reference article: https://docs.ropensci.org/pathviewr/articles diff --git a/docs/reference/figures/README-all_in_one-1.png b/docs/reference/figures/README-all_in_one-1.png index a455d876..5153e69e 100644 Binary files a/docs/reference/figures/README-all_in_one-1.png and b/docs/reference/figures/README-all_in_one-1.png differ diff --git a/docs/reference/figures/README-motive_V_sf_pos-1.png b/docs/reference/figures/README-motive_V_sf_pos-1.png index ae095d5a..a13bdddc 100644 Binary files a/docs/reference/figures/README-motive_V_sf_pos-1.png and b/docs/reference/figures/README-motive_V_sf_pos-1.png differ diff --git a/docs/reference/read_motive_csv.html b/docs/reference/read_motive_csv.html index 71fddd4c..019ec5f3 100644 --- a/docs/reference/read_motive_csv.html +++ b/docs/reference/read_motive_csv.html @@ -360,7 +360,7 @@

Examp #> [919] 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 #> #> $.internal.selfref -#> <pointer: 0x0000000004561ef0> +#> <pointer: 0x00000000044d1ef0> #> #> $class #> [1] "tbl_df" "tbl" "data.frame" @@ -372,7 +372,7 @@

Examp #> [1] "pathviewr_motive_example_data.csv" #> #> $file_mtime -#> [1] "2021-05-04 18:25:38 PDT" +#> [1] "2021-05-06 08:55:39 PDT" #> #> $frame_rate #> [1] 100 diff --git a/man/figures/README-all_in_one-1.png b/man/figures/README-all_in_one-1.png index a455d876..5153e69e 100644 Binary files a/man/figures/README-all_in_one-1.png and b/man/figures/README-all_in_one-1.png differ diff --git a/man/figures/README-motive_V_sf_pos-1.png b/man/figures/README-motive_V_sf_pos-1.png index ae095d5a..a13bdddc 100644 Binary files a/man/figures/README-motive_V_sf_pos-1.png and b/man/figures/README-motive_V_sf_pos-1.png differ