shiny_rot: Rotations and Data Plots

Description Usage Value shiny First Plot Second Plot Examples

View source: R/shiny_rot.R

Description

User uploads any multivariate data set with at least two continuous variables and it must be a .csv file. User then specifies which columns of data they are interested in, and a table and two scatterplots are created. The table is the first six entries of the data set, for user reference. The first scatterplot allows the user to create a aesthic graph and look at the drop-one correlation. The second allows the user to rotate the axes by theta (from user input) and gives the correlation corresponding to that theta and the theta at which the correlation will be zero.

Usage

1

Value

Table with the first six entries of the uploaded data

A scatterplot that is a ggplot2 object

A second ggplot2 scatterplot

shiny

The shiny web server will run once this function is invoked and will open a web browser. You should learn how this is implemented.

The web server can be studied https://shiny.rstudio.com/tutorial/

First Plot

This scatterplot responds to user input to do the following things:

  1. The user uploads the data set

  2. The user selects their variables of interest by inputing the column number - default columns 1 and 2

  3. The user sets the color of the scatterplot using hexadecimal color codes - default to black

  4. The user sets the size of the points using a slider - default to 2.5

  5. The user can update the labels of the axes - default to xLab and yLab

  6. The user can click on a point on the graph and it will return the drop-1 correlation (correlation without the clicked point)

Second Plot

This scatterplot also uses the uploaded data and variables of interest and responds to user input to do the following things:

  1. The user selects a theta value that is then used to rotate the axes by theta degrees

  2. The selected theta value is also used to calculate the sample correlation

  3. The user also selects how long the rotated axes are

  4. The sample correlation and the first-quadrant solution (calculated using the uniroot() function) are printed

Examples

1
## Not run:  shiny_rot()

leahpom/MATH5793POMERANTZ documentation built on May 10, 2021, 9:52 a.m.