term_split2: Split vector like NWEA CDF TermName column into usefule...

Description Usage Arguments Details Value Examples

Description

term_split2 returns a data frame splitting a TermName

Usage

1
term_split2(term_name, grade = NULL)

Arguments

term_name

character vector of term names from NWEA CDF.

grade

(optional, default = NULL) integer vector of grade levels

Details

This function returns a data framre with length(x) rows that separates a TermName character vector into the following components (here we use "Spring 2012-2013" as en example element of the vector:

In addition, if a length(x) vector of grade levels is passed to the optional second argument then an additional column will be added to the data frame:

Value

a data frame of with length(x) rows and 4 (5 if grade vector supplied) columns

Examples

1
2
3
4
5
6
7
8
9
x<-c("Spring 2012-2013",
"Fall 2013-2014",
     "Winter 2012-2013",
     "Fall 2012-2013" ,
     "Spring 2013-2014")

grades<-c(3:7)
term_split2(term_name=x,
            grade=grades )

almartin82/MAP-visuals documentation built on May 10, 2019, 9:24 a.m.