Re: [R] How to tweak genomic plot with genoPlotR?

2024-04-02 Thread Eric Berger
According to https://cran.r-project.org/web/packages/genoPlotR/index.html the maintainer of genoPlotR is Lionel Guy Send your question also to him. On Tue, Apr 2, 2024 at 11:27 AM Luigi Marongiu wrote: > > I would like to use your genoPlotR package > (doi:10.1093/bioinformatics/btq413) to

Re: [R] How to tweak genomic plot with genoPlotR?

2024-04-02 Thread Luigi Marongiu
Already did... On Tue, Apr 2, 2024 at 10:45 AM Eric Berger wrote: > > According to https://cran.r-project.org/web/packages/genoPlotR/index.html > the maintainer of genoPlotR is > > Lionel Guy > > Send your question also to him. > > On Tue, Apr 2, 2024 at 11:27 AM Luigi Marongiu > wrote: > > >

Re: [R] split a factor into single elements

2024-04-02 Thread Kimmo Elo
Hi, why would this simple procedure not work? --- snip --- mydf <- data.frame(id_station = 1234, string_data = c(2024, 12, 1, 0, 0), rainfall_value= 55) mydf$string_data <- as.factor(mydf$string_data) values<-as.integer(levels(mydf$string_data)) for (i in 1:length(values)) { 

[R] How to tweak genomic plot with genoPlotR?

2024-04-02 Thread Luigi Marongiu
I would like to use your genoPlotR package (doi:10.1093/bioinformatics/btq413) to compare the genomes of two isolates of E. coli K-12 that I have. One is a K-12 that was in my lab's fridge; the other is a derivative of K-12 bought some time ago, HB101. I tried to use genoPlotR, but I could not

Re: [R] split a factor into single elements

2024-04-02 Thread Bert Gunter
Note: > levels(factor(c(0,0,1))) ## just gives you the levels attribute [1] "0" "1" > as.character(factor(c(0,0,1))) ## gives you the level of each value in the vector [1] "0" "0" "1" Does that answer your question or have I misunderstood. Cheers, Bert On Tue, Apr 2, 2024 at 12:00 AM Kimmo

Re: [R] split a factor into single elements

2024-04-02 Thread Ebert,Timothy Aaron
Using levels rather than length might cause problems. 2024 1, 1, 0, 0 will have a different number of levels than 2024, 3, 8, 0, 0 and I cannot assume that the two tailing zeros are zero for all records. The code can be simplified if you can assume more. It might require more work if I have