R/function3.R

Defines functions function3

Documented in function3

#' NBA Function3
#'
#' This function limits the data for year x to include numeric continuous variables only. The output is the correlation matrix for all numeric variables in the data for that year.
#' @x individual year
#' function3(1950)

function3 <- function(x){
  library(dplyr)
  library(purrr)
  load("/Users/xiaoxuanyang/Desktop/SP18/MDA/Week6/NBA/data/d.RData")
  a <- d %>% filter(Year == 1950) %>% keep (is.numeric) %>% cor()
  a
}
XiaoxuanYang/NBA documentation built on May 25, 2019, 2:23 p.m.