[R] need help to convert animal ID to a factor
Jeff Newmiller
jdnewmil at dcn.davis.ca.us
Mon May 23 08:49:57 CEST 2016
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 )
--
Sent from my phone. Please excuse my brevity.
On May 22, 2016 9:46:30 PM PDT, 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.
>
>
>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.
[[alternative HTML version deleted]]
More information about the R-help
mailing list