Skip to content

need help to convert animal ID to a factor

4 messages · Neny Sitorus, David Winsemius, Jeff Newmiller

#
Hi,

I was trying to convert my animal ID experiment (ID) to factor to get the
ggboxplot, previously it was working well.
But since yesterday it displayed "Error" every time I tried to re-run it.
Could you help me in this issue?


# convert rat ID to factor
Leak.df <- toFactor(Leak.df, id.var=c("ID", "Time"))
Error: could not find function "toFactor"

Looking forward for your reply.


Kind regards,
Neny
On 23 May 2016 at 15:59, Jim Lemon <drjimlemon at gmail.com> wrote:

            

  
  
#
I've got quite a few packages loaded and yet I get:
No documentation for ?toFactor? in specified packages and libraries:
you could try ???toFactor?

So it's a function from some undetermined package and It's not even locatable with sos::findFn. I suspect you have forgotten to load it (whatever _it_ is.
#
I am not familiar with any function called "toFactor". It may be part of some contributed package that you need to re-load. 

However, one does not ordinarily need to use a package to convert one column of a data frame into a factor, since factors are supported by base R.

Eg

MyDF$ID <- factor( MyDF$ID )
#
Thanks for your advise.
Just wondering, since I have to analyse my data with "Mixed model analysis
in R"
and I'm not familiar at all with this software, just try to use it within a
week and need to write my analysis result as soon as I can, could you
please advise me of what does mixed model analysis mean?


Kind regards,
Neny
On 23 May 2016 at 16:46, Neny Sitorus <nsit315 at aucklanduni.ac.nz> wrote: