02. DATA MANIPULATION

Rules and logic operators

Select records from data that meet certain condition or conditions defined by user.

Recode a variable.

1.-Create new variables from compliance of conditions in other variables in the database.

2.- Create new variables from the application of a summary function (mean, median or sum) or mathematical expresion to the variables of the database defined by the user.

Create a new variable counting the number of times that p variables take the value in a vector defined by user.

Create new variable, from quantile or ordinal version of a variable defined by user.

Change order of factor levels selected by the user.

Split database into as many elements as factor levels.

Random sample of size n from a data.frame.

Z scores of a variable or p variables of a data.frame.

Sort a data.frame by a variable or nested variables.

Change variables names.

Make NA the values of a cuantitative variable by subject and experimental conditions, following criteria of +- 1,2, standard deviation.

subset( ) y operador %in%

recode( )

1.-create new variable

2.-compute.fnc

count.fnc