Cover image for The R primer
Title:
The R primer
Author:
Ekstrøm, Claus Thorn, 1971-
ISBN:
9781439862063
Publication Information:
Boca Raton, FL : CRC Press/Taylor & Francis, c2012.
Physical Description:
xii, 287 p. : ill. ; 22 cm.
Series:
A Chapman & Hall book.
General Note:
"A Chapman & Hall book"
Contents:
Machine generated contents note: 1.Importing data -- 1.1.Read data from a text file -- 1.2.Read data from a simple XML file -- 1.3.Read data from an XML file -- 1.4.Read data from an SQL database using ODBC -- Reading spreadsheets -- 1.5.Read data from a CSV file -- 1.6.Read data from an Excel spreadsheet -- 1.7.Read data from an Excel spreadsheet under Windows -- 1.8.Read data from a LibreOffice or OpenOffice Calc spreadsheet -- 1.9.Read data from the clipboard -- Importing data from other statistical software programs -- 1.10.Import a SAS dataset -- 1.11.Import an SPSS dataset -- 1.12.Import a Stata dataset -- 1.13.Import a Systat dataset -- Exporting data -- 1.14.Export data to a text file -- 1.15.Export a data frame to a CSV file -- 1.16.Export a data frame to a spreadsheet -- 1.17.Export a data frame to an Excel spreadsheet under Windows -- 1.18.Export a data frame to a SAS dataset -- 1.19.Export a data frame to an SPSS dataset --

Contents note continued: 1.20.Export a data frame to a Stata dataset -- 1.21.Export a data frame to XML -- 2.Manipulating data -- 2.1.Using mathematical functions and operations -- 2.2.Working with common functions -- 2.3.Working with dates -- 2.4.Working with character vectors -- 2.5.Find the value of x corresponding to the maximum or minimum of y -- 2.6.Check if elements in one object are present in another object -- 2.7.Transpose a matrix (or data frame) -- 2.8.Impute values using last observation carried forward -- 2.9.Convert comma as decimal mark to period -- Working with data frames -- 2.10.Select a subset of a dataset -- 2.11.Select the complete cases of a dataset -- 2.12.Delete a variable from a data frame -- 2.13.Join datasets -- 2.14.Merge datasets -- 2.15.Stack the columns of a data frame together -- 2.16.Reshape a data frame from wide to long format or vice versa -- 2.17.Create a table of counts -- 2.18.Convert a table of counts to a data frame --

Contents note continued: 2.19.Convert a data frame to a vector -- Factors -- 2.20.Convert a factor to numeric -- 2.21.Add a new level to an existing factor -- 2.22.Combine the levels of a factor -- 2.23.Remove unused levels of a factor -- 2.24.Cut a numeric vector into a factor -- Transforming variables -- 2.25.Sort data -- 2.26.Transform a variable -- 2.27.Apply a function multiple times to parts of a data frame or array -- 2.28.Use a Box-Cox transformation to make non-normally distributed data approximately normal -- 2.29.Calculate the area under a curve -- 3.Statistical analyses -- Descriptive statistics -- 3.1.Create descriptive tables -- Linear models -- 3.2.Fit a linear regression model -- 3.3.Fit a multiple linear regression model -- 3.4.Fit a polynomial regression model -- 3.5.Fit a one-way analysis of variance -- 3.6.Fit a two-way analysis of variance -- 3.7.Fit a linear normal model -- Generalized linear models -- 3.8.Fit a logistic regression model --

Contents note continued: 3.9.Fit a multinomial logistic regression model -- 3.10.Fit a Poisson regression model -- 3.11.Fit an ordinal logistic regression model -- Methods for analysis of repeated measurements -- 3.12.Fit a linear mixed-effects model -- 3.13.Fit a linear mixed-effects model with serial correlation -- 3.14.Fit a generalized linear mixed model -- 3.15.Fit a generalized estimating equation model -- 3.16.Decompose a time series into a trend, seasonal, and residual components -- 3.17.Analyze time series using an ARMA model -- Specific methods -- 3.18.Compare populations using t test -- 3.19.Fit a nonlinear model -- 3.20.Fit a Tobit regression model -- Model validation -- 3.21.Test for normality of a single sample -- 3.22.Test for variance homogeneity across groups -- 3.23.Validate a linear or generalized linear model -- Contingency tables -- 3.24.Analysis of two-dimensional contingency tables -- 3.25.Analyze contingency tables using log-linear models -- Agreement --

Contents note continued: 3.26.Create a Bland-Altman plot of agreement to compare two quantitative methods -- 3.27.Determine agreement among several methods of a quantitative measurement -- 3.28.Calculate Cohen's kappa -- Multivariate methods -- 3.29.Fit a multivariate regression model -- 3.30.Cluster observations -- 3.31.Use principal component analysis to reduce data dimensionality -- 3.32.Fit a principal component regression model -- 3.33.Classify observations using linear discriminant analysis -- 3.34.Use partial least squares regression for prediction -- Resampling statistics and bootstrapping -- 3.35.Non-parametric bootstrap analysis -- 3.36.Use cross-validation to estimate the performance of a model or algorithm -- 3.37.Calculate power or sample size for simple designs -- Robust statistics -- 3.38.Correct p-values for multiple testing -- Non-parametric methods -- 3.39.Use Wilcoxon's signed rank test to test a sample median --

Contents note continued: 3.40.Use Mann-Whitney's test to compare two groups -- 3.41.Compare groups using Kruskal-Wallis' test -- 3.42.Compare groups using Friedman's test for a two-way block design -- Survival analysis -- 3.43.Fit a Kaplan-Meier survival curve to event history data -- 3.44.Fit a Cox regression model (proportional hazards model) -- 3.45.Fit a Cox regression model (proportional hazards model) with time-varying covariates -- 4.Graphics -- 4.1.Including Greek letters and equations in graphs -- 4.2.Set colors in R graphics -- 4.3.Set color palettes in R graphics -- High-level plots -- 4.4.Create a scatter plot -- 4.5.Create a histogram -- 4.6.Make a boxplot -- 4.7.Create a bar plot -- 4.8.Create a bar plot with error bars -- 4.9.Create a plot with estimates and confidence intervals -- 4.10.Create a pyramid plot -- 4.11.Plot multiple series -- 4.12.Make a 2D surface plot -- 4.13.Make a 3D surface plot -- 4.14.Plot a 3D scatter plot -- 4.15.Create a heat map plot --

Contents note continued: 4.16.Plot a correlation matrix -- 4.17.Make a quantile-quantile plot -- 4.18.Graphical model validation for linear models -- More advanced graphics -- 4.19.Create a broken axis to indicate discontinuity -- 4.20.Create a plot with two y-axes -- 4.21.Rotate axis labels -- 4.22.Multiple plots -- 4.23.Add a legend to a plot -- 4.24.Add a table to a plot -- 4.25.Label points in a scatter plot -- 4.26.Identify points in a scatter plot -- 4.27.Visualize points, shapes, and surfaces in 3D and interact with them in real-time -- Working with graphics -- 4.28.Exporting graphics -- 4.29.Produce graphics output in Latex-ready format -- 4.30.Embed fonts in postscript or pdf graphics -- 5.R -- Getting information -- 5.1.Getting help -- 5.2.Finding R source code for a function -- R packages -- 5.3.Installing R packages -- 5.4.Update installed R packages -- 5.5.List the installed packages -- 5.6.List the content of a package -- 5.7.List or view vignettes --

Contents note continued: 5.8.Install a package from BioConductor -- 5.9.Permanently change the default directory where R installs packages -- 5.10.Automatically load a package when R starts -- The R workspace -- 5.11.Managing the workspace -- 5.12.Changing the current working directory -- 5.13.Saving and loading workspaces -- 5.14.Saving and loading histories -- 5.15.Interact with the file system -- 5.16.Locate and choose files interactively -- 5.17.Interact with the operating system.
Copies: