Blog Archives

Getting variable labels in R, from SPSS

March 26, 2015
By

When using R, we may need find our data has been saved in a different statistics package. While there are some export functions in other statistical software that will export to a different filetype, or we may simply use a .csv file, R can import some ...

Read more »

Easier confidence interval estimation with matrices and similar arrays in R

May 15, 2013
By

When dealing with survey data in particular, social scientists are often wanting to produce proportions from the data, and associated confidence intervals. The prop.test command in R can be used to generate the desired results. When dealing with small ...

Read more »

Shortening code in R: "with" and "within" are your friends

January 4, 2013
By

If you're anything like me, you use words to name both data frames and variables. I use metadata documentation to keep track of new variables I have constructed, and the logic I have used to construct them (and why I bothered!) but I find many variable...

Read more »

R: ifelse statements with multiple variables and NAs

March 27, 2012
By

ifelse statements in R are the bread and butter of recoding variables. Normally these are pretty easy to do, particularly when we are recoding off one variable, and that variable contains no missing values. There are lots of examples on how to do this ...

Read more »

R: ggplot2 for social scientists

January 14, 2012
By
R: ggplot2 for social scientists

I've been tied up with other work, so things have been a bit slow on the mixed methods development. I hope to do another post on the analysis in about a week, but today I would like to do an introduction to ggplot2 and demonstrate some of its...

Read more »

R: Nutrient intake data, mixed methods analysis for males

December 29, 2011
By
R: Nutrient intake data, mixed methods analysis for males

To recap:we've cleaned the data (see earlier posts)we're up to constructing the output data that will be used to estimate the population distribution values for the particular nutrient we are examining (energy)The code below is my implementation of the...

Read more »

Nutrient intake data, finalising the data in R

December 28, 2011
By

I run plain R in the normal gui under Windows 7, which means no bells and whistles. This means that I find the R gui somewhat awkward to program in. Thanks to advice I received a number of years ago, I use Notepad ++ as my programming environment. It h...

Read more »

Nutrients consumed daily, R analysis story board

December 28, 2011
By

With any relatively complicated programming task, I prefer to first create a story board that provides the steps I will take to complete the overall task. This may end up being a heavily edited post if I find that my plans change part way through.The p...

Read more »

Data preparation for analysis, use VBA

December 27, 2011
By

Data on daily nutrient intake information is stored within a database, and the users are extracting the relevant data on a nutrient-by-nutrient basis through an export procedure. The exported data is being stored in Excel 2010 data sets, one for each n...

Read more »

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)