[R] need help to convert animal ID to a factor

David Winsemius dwinsemius at comcast.net
Mon May 23 08:39:39 CEST 2016


> On May 22, 2016, at 9:46 PM, Neny Sitorus <nsit315 at aucklanduni.ac.nz> wrote:
> 
> 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"))
> 
>> From Console:
>> ets.df <- toFactor(ets.df, id.var=c("ID", "Time"))
> Error: could not find function "toFactor"
> 
> Looking forward for your reply.

I've got quite a few packages loaded and yet I get:

> ?toFactor
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.

-- 
David.


> 
> 
> Kind regards,
> Neny
> 
> On 23 May 2016 at 15:59, Jim Lemon <drjimlemon at gmail.com> wrote:
> 
>> Okay, perhaps if you try this:
>> 
>> cellcontrol<-
>> loadNetwork("C:/Users/mohammad/Documents/cellcontrol.txt")
>> stateTransition(cellcontrol, rep(1,11))
>> 
>> Obviously this is a guess, but it might help.
>> 
>> Jim
>> 
>> 
>> On Mon, May 23, 2016 at 1:55 PM, mohammad alsharaiah
>> <mohdsharaiah at gmail.com> wrote:
>>> Hi jim ,
>>> first of all iwant to thank you for your reply.
>>> the object "cellcontrol" its a network that i created it by using
>> boolnet
>>> package. when i call the network its loaded inside the R workspace
>> screen.
>>> but i got this error when i want to work on it.
>>> 
>>> boolnet allow to us to create the network and write a logical rules  in
>> text
>>> file, then we can loaded it as a network inside R to study the dynamic
>>> behavior.
>>> 
>>> but i can not work on it because this error and converting it to data
>> file.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Mohammad
>>> 
>>> 
>>> On Sun, May 22, 2016 at 8:40 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
>>>> 
>>>> Hi Mohammad,
>>>> I don't have the BoolNet package installed, but the error means that
>>>> the object "cellcontrol" is not there for the function to use. It
>>>> should be a network "generated by generateRandomNKNetwork, or
>>>> reconstructed by reconstructNetwork" as detailed in the help pages.
>>>> 
>>>> Jim
>>>> 
>>>> 
>>>> On Mon, May 23, 2016 at 11:07 AM, mohammad alsharaiah
>>>> <mohdsharaiah at gmail.com> wrote:
>>>>> Hi,
>>>>> 
>>>>> every one , im using Boolnet package inside R environment to create a
>>>>> boolean network.
>>>>> 
>>>>> after i create a text file for the Boolean network  and  i loaded it
>> by
>>>>> using R  by using this command:
>>>>> 
>>>>>> library(BoolNet)
>>>>>> loadNetwork("C:/Users/mohammad/Documents/cellcontrol.txt")
>>>>> 
>>>>> then its loaded inside R screen. But when i started to do some of
>> tasks
>>>>> on
>>>>> this network every time i got this error message, this is an example
>> how
>>>>> i
>>>>> work on the created network and get the error.
>>>>> 
>>>>>> stateTransition(cellcontrol, rep(1,11))
>>>>> Error in inherits(network, "BooleanNetwork") :
>>>>>  object 'cellcontrol' not found
>>>>>> 
>>>>> 
>>>>> please can any one help me to solve this error .
>>>>> 
>>>>> Reagdrs,
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> *Mohammad *
>>>>> 
>>>>>        [[alternative HTML version deleted]]
>>>>> 
>>>>> ______________________________________________
>>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>>>> 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 at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list