Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Prof Brian Ripley wrote: Your examples work for me via read.dta() and via use(), including the Date columns, with the current foreign_0.8-28. They also work on Windows 2.7.1 with foreign_0.8-26. As far as I can see the only relevant part of read.dta is as.Date("1960-1-1"

Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Prof Brian Ripley
Your examples work for me via read.dta() and via use(), including the Date columns, with the current foreign_0.8-28. They also work on Windows 2.7.1 with foreign_0.8-26. As far as I can see the only relevant part of read.dta is as.Date("1960-1-1"): you might want to try that to see if it malf

Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Lazarus Mramba
Dear Prof Brian, It is true that i used the epicalc package. The functions use() and des() are from epicalc. The problem does not occur if i use library(foreign) : tmp <- read.dta("maltreat.dta", convert.dates=FALSE) > sessionInfo() R version 2.7.1 (2008-06-23) i386-pc-mingw32 locale: LC_C

Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Prof Brian Ripley
What are use() and des()? Please note the footer of this message. (Are you using package epicalc without telling us?) I suspect that foreign::read.dta is being used. That has argument 'convert.dates', and you could try setting it to FALSE, as the message is from as.Date.character() complainin

[R] Help in running Stata dataset in R

2008-08-06 Thread Lazarus Mramba
Dear All, I installed R 2.7.0 and tried to call a dataset i had ealier own called on R2.6.2 but i keep on getting an error: use("maltreat.dta") Error in fromchar(x) : character string is not in a standard unambiguous format Tried doing the same with R2.7.1 but i get the same error. However i