Wildson B B Lima
01/11/2020
The intention of this app is to help the data analysis of the spacial variables generated in the Weight Lifting Exercises.
It makes it faster to see how each class is associated with its spacial variables.
The app can be accessed here and the code to reproduce the app can be found at github (this link needs to be open in a new tab)
With the following code, we can retrieve from the dataset the available spacial variables
trainingpath <- './data/pml-training.csv'
#' Use fread to load data into R environment.
training <- fread(file = trainingpath, data.table = F,stringsAsFactors = T)
#' Cleaning data
training1 <- training %>%
select(!where(anyNA)) %>%
select(classe,ends_with(c('x','y','z')))
xvariables <- training1 %>%
select(ends_with(c('x'))) %>% names()
yvariables <- training1 %>%
select(ends_with(c('y'))) %>% names()
zvariables <- training1 %>%
select(ends_with(c('z'))) %>% names()The variables of the x coordinate
[1] "gyros_belt_x" "accel_belt_x" "magnet_belt_x"
[4] "gyros_arm_x" "accel_arm_x" "magnet_arm_x"
[7] "gyros_dumbbell_x" "accel_dumbbell_x" "magnet_dumbbell_x"
[10] "gyros_forearm_x" "accel_forearm_x" "magnet_forearm_x"
The variables of the y coordinate
[1] "gyros_belt_y" "accel_belt_y" "magnet_belt_y"
[4] "gyros_arm_y" "accel_arm_y" "magnet_arm_y"
[7] "gyros_dumbbell_y" "accel_dumbbell_y" "magnet_dumbbell_y"
[10] "gyros_forearm_y" "accel_forearm_y" "magnet_forearm_y"
The variables of the z coordinate
[1] "gyros_belt_z" "accel_belt_z" "magnet_belt_z"
[4] "gyros_arm_z" "accel_arm_z" "magnet_arm_z"
[7] "gyros_dumbbell_z" "accel_dumbbell_z" "magnet_dumbbell_z"
[10] "gyros_forearm_z" "accel_forearm_z" "magnet_forearm_z"