United Nations Economic Commission for Europe has published these two documents very interesting documents.
Making Data Meaningful, Part I
Making Data Meaningful, Part II
V.
|
|||||
|
United Nations Economic Commission for Europe has published these two documents very interesting documents. Making Data Meaningful, Part I Making Data Meaningful, Part II V. I am organising a group at CESP, JNU that will produce scripts using open source tools for reading NSSO and ASI data. The idea is to release these scripts under an open source license. Any researcher who purchases NSSO/ASI data will be able to use these scripts to process them. We will use these scripts [...] I discovered a new, very useful, R function yesterday: ave. This is what it does: “Subsets of ‘x[]‘ are averaged, where each subset consist of those observations with the same factor levels.” But interestingly, you can use any function other than average. The output of that function is set against each observation. I wanted [...] Two students of social sciences who had so far used computers for limited, specific tasks recently asked me for some kind of a course outline that they should cover to pick up basic skills for using a spreadsheet software. I prepared the list and thought it may interest some others. Hence this post. 1. [...] ?rollmean (package=zoo)?rollmedian (package=zoo)?runmed (package=stats) ?relevel : The levels of a factor are re-ordered so that the level specified by ‘ref’ is first and the others are moved down. This is useful for ‘contr.treatment’ contrasts which take the first level as the reference. Here are some useful tips on the issue. V. Some of the Census 2001 data are in microsoft access files (having filename extensions .mdb). A microsoft access file can have several tables inside, each of which contains data. There is a software called mdbtools that can be used to read access files. The command mdb-tables can be used to see the names of tables [...] Use “select=c(var1,var2)” in the subset command to select var1 and var2. Use “select=-c(var1,var2)” in the subset command to drop var1 and var2.
Technorati Tags: GNU-R There is no direct command in R for renaming variables and that may make it less than obvious for some people. Of course, once you know, it is simple. The following command does the trick. names(dataframe)[names(dataframe)=="oldvariablename"]<-”newvariablename”
VR Technorati: GNU-R Package reshape is meant for aggregating, reshaping and tabulating data.Tabulation is done in two steps: melt and cast. Read help for these functions. melt(sl1,id.var=,measure.var=”foo”)->sl2 This will create a dataframe sl2 which will have all the variablesin sl1 and “foo” being reorganised for casting later. See head(sl2) to see the form it takes.
Function “names” gives list of columns/variables in a dataframe.
Technorati: R You can replace selected values of variables in a dataframe (or any other r object) by using the function replace. The documentation on the function is straightforward and comprehensive. Here is an example of the beauty of R. To split up a character string, all you need is to use a function called substr (for sub string)!! So you don’t really need to write the variable into a new file and read it back with read.fwf as I did (see my earlier post titled [...] The following text from the R help pages clearly explains the use of command subset in extracting data from a data.frame. This command will be of much use in preparation of data set for further analysis. Vikas ————— subset {base} R Documentation Subsetting Vectors and Data Frames Description Return subsets of vectors or data frames [...] |
|||||
|
Copyright © 2013 V. - All Rights Reserved Powered by WordPress & Atahualpa ![]() ![]() ![]() ![]() ![]() ![]() |
|||||