I solved this problem using the
nonint.factors=F,generate.factors=F)
when i imported the dta files.
Thanks to all. My issue can be declared as solved.
On Sat, Aug 27, 2016 at 12:55 PM, Michael Friendly
wrote:
> On 8/26/2016 11:05 AM, Juan Ceccarelli Arias wrote:
>
>> Yep. Im a bit stalled.
>> I
There has been some good advice not to lose the labels, but perhaps this
gets you where you seem determined to go?
?read.dta
read.dta(file, convert.dates = TRUE, convert.factors = TRUE,
missing.type = FALSE,
convert.underscore = FALSE, warn.missing.labels = TRUE)
or
library(
On 8/26/2016 11:05 AM, Juan Ceccarelli Arias wrote:
Yep. Im a bit stalled.
I can't find the option to import only the values and drop the value labels
from the dta file.
Im quite sure R can do that. Then i'd only used the values and i'd rely on
my memory.
It isn't a bad alternative.
Hint: use
t;
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Juan
> > Ceccarelli Arias
> > Sent: Thursday, August 25, 2016 9:15 PM
> > To: ruipbarra...@sapo.pt
> > Cc: r-help@r-project.org
> > Subject: Re: [R] Impor
n...@r-project.org] On Behalf Of Juan
> Ceccarelli Arias
> Sent: Thursday, August 25, 2016 9:15 PM
> To: ruipbarra...@sapo.pt
> Cc: r-help@r-project.org
> Subject: Re: [R] Importint stata file and using value labels
>
> Mmm...The other option working with R for importing the dta file
Mmm...The other option working with R for importing the dta file but
obtaining the values and deleting or ignoring the value labels.
I think some time ago i did that, but now i can't remember it.
On Thu, Aug 25, 2016 at 4:11 PM, wrote:
> So you should do
>
> table(region[sex=="Hombre"],type[se
> str(sex)
Factor w/ 2 levels "Hombre","Mujer": 1 2 2 1 2 2 1 1 1 1 ...
On Thu, Aug 25, 2016 at 1:42 PM, wrote:
> Maybe sex is a factor and Man its label. Factors are coded internally as
> integers, to see it use
>
> str(sex)
>
> Rui Barradas
>
>
> Citando Juan Ceccarelli Arias :
>
> Nop. I did
So you should do
table(region[sex=="Hombre"],type[sex=="Hombre"]
Rui Barradas
Citando Juan Ceccarelli Arias :
str(sex)
Factor w/ 2 levels "Hombre","Mujer": 1 2 2 1 2 2 1 1 1 1 ...
On Thu, Aug 25, 2016 at 1:42 PM, wrote:
_Maybe sex is a factor and Man its label. Factors are coded
inte
You need to (re-)read the "Introduction to R" document that comes with R. R Is
not Stata, and you should not expect R to look syntactically like Stata.
Note that if you, against normal R convention, wish to manipulate the integers
that a factor is implemented with, you can create such a variabl
Maybe sex is a factor and Man its label. Factors are coded internally
as integers, to see it use
str(sex)
Rui Barradas
Citando Juan Ceccarelli Arias :
> Nop. I didn't work. But using the following it does work.
> table(region[sex=="Men"],type[sex=="Men"])
> When i use the dta file with stat
Nop. I didn't work. But using the following it does work.
table(region[sex=="Men"],type[sex=="Men"])
When i use the dta file with stata i declare the condition with sex==1 and
not sex=="Man".
On Thu, Aug 25, 2016 at 12:39 PM, wrote:
> Hello,
>
> Try instead
>
> table(region[sex==1],type[sex==1])
Hello,
Try instead
table(region[sex==1],type[sex==1])
To test for equality use == not =.
Hope this helps,
Rui Barradas
Citando Juan Ceccarelli Arias :
> Hi
> Im a bit lost.
> Ive imported a stata13 file. When i try to make a simple
> table(region[sex=1],type[sex=1])
> i get something as
>
12 matches
Mail list logo