lessR

less work, more results for data analysis with R

  • library(lessR)
  • mydata <- Read("Mach4", format="lessR")
  • theme(colors="orange.black")
  • Plot(m06, m07,
       ellipse=TRUE, fit.line="loess")

This site provides support for doing data analysis with the R program using the functions in the package lessR, as documented by the accompanying text.

R Data Analysis without Programming
David W. Gerbing
Routledge/Taylor & Francis Publishing
December, 2013

The new look of data analysis output.

An R program overview of lessR input.

Both R and lessR are free and open source, and run identically on Macintosh, Windows and Linux/Unix computers.

Most Recent Version of lessR

The developmental version of lessR is on my server before posted to the official CRAN servers. To access, first make sure the dependent packages are installed from CRAN. A recent installation of lessR from the official CRAN servers will have installed these packages. Otherwise:

install.packages(c("ellipse", "leaps", "MBESS", "sas7bdat", "gdata", "triangle"))

Then choose to install either the Mac or Windows binary, here for lessR 3.4.9.

install.packages("lessR", repo="http://web.pdx.edu/~gerbing/lessR", type="mac.binary")

install.packages("lessR", repo="http://web.pdx.edu/~gerbing/lessR", type="win.binary")

Videos

Contents

New Features

Any features added to lessR since August, 2013 are not presented in the book. Enter Help(lessR) and click on Package NEWS to see the full set of additions and bug fixes.

Data

1. The text files listed below for download can also be accessed directly from the web from within R with the following Read statement.

> mydata <- Read("http://lessRstats.com/data/name")

Replace name with the specific name of the file to access. Most of the text files are in csv format, for Comma Separated Values. Other text files are in the fwd format, for Fixed WiDth, in which the data values for a variable all occupy the same columns.

2. The SPSS versions of the data files are provided for SPSS users who can compare R/lessR with SPSS. The purpose is to show that data analysis with the lessR functions within the standard R environment is no more difficult that using SPSS in its GUI environment. And, by comparison, the R environment is much faster and more responsive, and, of course, free.

3. Files that are contained within lessR have already been downloaded when the lessR package was installed. To access any of these files from within R, use the Read function with the format option set to "lessR". For example, read a data table from the specified file into the data frame called mydata with the following R statement.

> mydata <- Read("name", format="lessR")

Replace name with the specific name of the file to download. The data files that are part of lessR are BodyMeas, Cars93, Employee, Learn, Mach4 and Reading. The Employee and Mach4 data tables already have the variable labels included.

Chapter 1: R for Data Analysis

Sec Text SPSS Description
1.6.5 employee.csv employee.sav Employee data table
1.6.6 Mach4.fwd Mach4.sav Responses to the 20-item Mach IV scale

Chapter 2: Read/Write Data

Sec Text SPSS Description
2.2.1 employee.csv employee.sav Employee data table
2.4 employee_lbl.csv Variable labels for employee data table, csv format
2.4 employee_lbl.xlsx Variable labels for employee data table, Excel format
2.6 HtWtEg.fwd Fixed width text data file for Exercise 2-3
2.6 Mach4Plus.fwd Fixed width text data file for Exercise 2-4. All items already reversed scored.

Chapter 3: Edit Data

Sec Text SPSS Description
3.7.1 Emp1a.csv First file to horizontal merge
3.7.1 Emp1b.csv Second file to horizontal merge
3.7.2 Emp2a.csv First file to vertical merge
3.7.2 Emp2b.csv Second file to vertical merge
3.8 Cars93.csv Data from 1993 cars for Exercise 3-2 to 5

Chapter 4: Categorical Variables

Sec Text SPSS Description
4.2 employee.csv employee.sav Employee data table
4.5 psych.csv Text data file for Exercises 4-1, 4-2 and 4-3

Chapter 5: Continuous Variables

Sec Text SPSS Description
5.6.1 Ratings.csv Time series data of student ratings of a professor
5.6.2 WorldPopulation.csv World population data over time
5.7 Cars93.csv Data from 1993 cars for Exercise 5-1
5.7 Mach4.fwd Mach4.sav Responses to the 20-item Mach IV scale, Exercise 5-2

Chapter 6: Means, Compare Two Samples

Sec Text SPSS Description
6.2.1 Mach4.fwd Mach4.sav Responses to the 20-item Mach IV scale, Exercise 5-2
6.3.4 Learn.csv Data for massed vs. distributed practice experiment
6.4.1 WeightLoss.csv Weight loss data
6.5 employee.csv employee.sav Employee data table for Exercise 6-1
6.5 Cars93.csv Data from 1993 cars for Exercise 6-2

Chapter 7: Compare Multiple Samples

Sec Text SPSS Description
7.2.1 anova_1way.csv One-way analysis of variance, unstacked data that needs to be reshaped first
7.2.1 anova_1way_stacked.csv One-way analysis of variance, stacked data ready for analysis
7.3.1 anova_rb.csv Randomized block analysis of variance
7.4.1 anova_2way.csv Two-way analysis of variance
7.5.1 anova_rbf.csv Randomized block factorial analysis of variance
7.5.2 anova_sp.csv Split-plot factorial analysis of variance
7.6 WeightLoss4.csv Weight loss data for Exercise 7-2
7.6 Anxiety.csv Anxiety data for Excercise 7-3

Chapter 8: Correlation

Sec Text SPSS Description
8.2.1 employee.csv employee.sav Employee data table
8.2.5 Mach4.fwd Mach4.sav Responses to the 20-item Mach IV scale
8.5 Cars93.csv Data from 1993 cars for Exercise 8-1

Chapter 9: Regression I

Sec Text SPSS Description
9.2.2 employee.csv employee.sav Employee data table
9.6 BodyMeas.csv Body measurements for Exercises 9-1 and 2
9.6 Cars93.csv Data from 1993 cars for Exercises 9-3

Chapter 10: Regression II

Sec Text SPSS Description
10.2.1 Reading.csv
10.5 BodyMeas.csv Body measurements for Exercise 10-1
10.5 Cars93.csv Data from 1993 cars for Exercise 10-2

Chapter 11: Factor/Item Analysis

Sec Text SPSS Description
11.3.2 Mach4.fwd Mach4.sav Responses to the 20-item Mach IV scale
11.5.2 MIMMperfect.cor Population correlation matrix for the specified measurement model
11.7 Mach4Plus.fwd Fixed width text data file for Exercises 11-1 and 2. All items already reversed scored.