rmv.blanks | R Documentation |
When large SPSS datasets are imported into R, non-numeric fields frequently have numerous blank spaces prior to the text. The blank spaces make it difficult to summarize non-numeric text. The function is applied to an entire dataframe and removes the blank spaces.
rmv.blanks(object)
object |
Typically a dataframe created from an imported SPSS file. |
Returns a new dataframe without preceeding
Paul Bliese pdbliese@gmail.com
read.spss
## Not run: library(foreign) mydata<-read.spss(file.choose(),to.data.frame=T,use.value.labels=F) mydata<-rmv.blanks(mydata) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.