Learn R Programming

micEcon (version 0.6-18)

logDataSet: Creating a Data Set with the Logarithms of the Original Variables

Description

This function creates a data set with the logarithms of the original variables.

Usage

logDataSet( data, varNames, varNamesNum = NULL  )

Arguments

data

a data frame containing the data (possibly a panel data frame created with pdata.frame).

varNames

vector of character strings that indicates names of variables in the data frame. The logarithm of these variables are included in the returned data frame.

varNamesNum

optional vector of character strings that indicates names of further variables in tha data frame. In case of numeric variables, the logarithms of these variabes are included in the returned data frame. In case of factor of logical variables, these variabes are included in the returned data frame without any transformation.

Author

Arne Henningsen

Examples

Run this code
   data( "germanFarms" )
   datLog <- logDataSet( germanFarms, c( "vAnimal", "vOutput", "vVarInput" ) )
   summary( datLog )

Run the code above in your browser using DataLab