gt;> NA values
>> >>
>> >>
>> >>
>> >> We agree on that. However, the error gives you no hint about which
>> >> variables are causing the problem. If it did, then it could only tell
>> >> about the first variable with the prob
b...@ufl.edu>>
Cc: Neha gupta mailto:neha.bologn...@gmail.com>>;
r-help mailing list mailto:r-help@r-project.org>>
Subject: Re: [R] Error with text analysis data
[External Email]
Constant columns can be the model when you do some subsetting or are exploring
a new dataset. My ob
> *Sent:* Wednesday, April 13, 2022 12:23 PM
> *To:* Ebert,Timothy Aaron
> *Cc:* Neha gupta ; r-help mailing list <
> r-help@r-project.org>
> *Subject:* Re: [R] Error with text analysis data
>
>
>
> *[External Email]*
>
> Constant columns can be the model when
ike summarize(y) or mean(y) if that was the goal.
>
> Tim
>
> -Original Message-
> From: R-help On Behalf Of Bill Dunlap
> Sent: Wednesday, April 13, 2022 9:56 AM
> To: Neha gupta
> Cc: r-help mailing list
> Subject: Re: [R] Error with text analysis data
>
&
This sounds like what I think is a bug in stats::model.matrix.default(): a
numeric column with all identical entries is fine but a constant character
or factor column is not.
> d <- data.frame(y=1:5, sex=rep("Female",5))
> d$sexFactor <- factor(d$sex, levels=c("Male","Female"))
> d$sexCode <- as.i
Hi Neha,
The error message is about not having _factors_ with two or more
levels. Apart from using stringsAsFactors=FALSE (meaning that you
probably won't get any factors in "d"), your sample data doesn't look
like CSV format. Perhaps the lines have been truncated. You may get
something with string
6 matches
Mail list logo