~ubuntu-branches/ubuntu/utopic/foreign/utopic

« back to all changes in this revision

Viewing changes to tests/writeForeignSPSS.R

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2014-01-21 06:49:00 UTC
  • mfrom: (1.3.24)
  • Revision ID: package-import@ubuntu.com-20140121064900-94hi99chgswzehcq
Tags: 0.8.58-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
library(foreign)
 
2
 
 
3
DF <- data.frame(X1 = 1:3, X2 = 4:6, X3 = paste0("str_", 1:3), 
 
4
                 stringsAsFactors = FALSE)
 
5
 
 
6
write.foreign(DF, "datafile.dat", "codefile.sps", "SPSS")
 
7
 
 
8
files <- c( "datafile.dat", "codefile.sps")
 
9
for(f in files) tools::Rdiff(f, file.path("keep", f))
 
10
unlink(files)