Re: [R] Cannot write a dataframe to xls or csv Windows 7

2012-09-14 Thread research email
Thank you so much,
Yes I need to look up how to make a reproducible example,
William I will try your advice, I believe this will be my salvation here, once 
I get my computer.

Pancho

On Sep 13, 2012, at 23:59, William Dunlap wdun...@tibco.com wrote:

 
 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
 Behalf
 Of R. Michael Weylandt
 Sent: Thursday, September 13, 2012 2:52 PM
 To: pmulonge
 Cc: r-help@r-project.org
 Subject: Re: [R] Cannot write a dataframe to xls or csv Windows 7
 
 On Thu, Sep 13, 2012 at 4:05 PM, pmulonge
 resea...@namibia.pharmaccess.org wrote:
 Hello,
 I have  a similar issue , but in my case I am using Windows 7
 i try the following command to write a dataframe to xls using the
 xlsReadWrite package or the write.csv function
 write.xls(DATA,'Reg_IDcleaned.xls')
 or I will write.csv replacin the suffix with .csv
 I get absolutely no error message and the setwd appears at top of my code
 with absolute path
 
 Immediately after the write.xls(..., file=something) run
   normalizePath(something, mustWork=TRUE)
 and it should give a full path to the file called something.
 
 Bill Dunlap
 Spotfire, TIBCO Software
 wdunlap tibco.com
 
 However when I look in the relevant folder ,the xls or cdv outfile is
 nowhere to be found.
 Is there a gremlin in the computer or what?
 
 It seems unlikely, but I suppose it can't be ruled out
 
 Before, this write.xls was working fine and now it stopped, i used the
 write.csv to test if it was an error in the package.
 So since write.csv also fails to produce the oufile in .csv in the relevant
 folder, I am at my witts end
 
 
 Firstly, please do quote context: most of us don't read nabble and I
 have no idea what similar problem you're having. (Well, actually, I
 clicked the link and I do, but I'm not letting on) Secondly, can you
 whip up a reproducible example?
 
 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-
 example
 
 I see no reason why
 
 setwd(~) # Replace with appropriate Windows-ism
 write.csv(data.frame(1:5, letters[1:5]))
 
 wouldn't work if you have the right permissions, but perhaps you are
 doing something funny.
 
 Cheers,
 Michael
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Tendonitis and R users

2012-09-04 Thread research email

Hello
This request asks something beyond the technicalities of the R language, I 
would like to ask you wonderful people if you have ever suffered as programmers 
( or de facto programmers like myself though I am a 'research assistant') from 
tendonitis and how you coped with it, i have golfer's elbow on both sides. Any 
resources?

Pancho Mulongeni
Namibia
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Exporting data to spss

2012-08-22 Thread research email
I have a dataframe of 80+ columns and over 700 rows. I use 
write.foreigin(data,C:/filename.dat,codefile.sps) and it does write out the 
.dat file and the code file.
Problem is that when I open the codefile in SPSS 20, I can an error message 
saying there are too many variables and something about the formatting (this is 
not an SPSS list so the details of the error are not germane).
Question: is there another way of reading data into SPSS without having to 
first create a text file, excel file that is then opened in SPSS manually.
Is there any other function apart from write.foreign?
Thank you


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.