Re: [R] ODP: ggplot question

2021-09-15 Thread Grzegorz Smoliński
Hi, of course you can. This should work: ggplot(s8_plot, aes(fill=GTresult, y=cases, x=gc_label)) + geom_bar(position="stack", stat="identity")) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) By "hjust" you make sure that labels do not overlap on plot. Best regards, Grzegorz śr.,

Re: [R] Problem with plotmat package

2021-09-15 Thread Jim Lemon
Oops, your plot On Thu, Sep 16, 2021 at 11:39 AM Jim Lemon wrote: > > Hi H, > Looking at your example and the help page, it looks to me as though > the plot is consistent with the "A" matrix: > > Oz > Rain Nice > Rain 0.25 0.75 > Nice 0.60 0.40 > > # help page > A - square coefficient matri

Re: [R] Problem with plotmat package

2021-09-15 Thread Jim Lemon
Hi H, Looking at your example and the help page, it looks to me as though the plot is consistent with the "A" matrix: Oz Rain Nice Rain 0.25 0.75 Nice 0.60 0.40 # help page A - square coefficient matrix, specifying the links (rows=to, cols=from). In your plot (attached): Rain (col) goes to

[R] Problem with plotmat package

2021-09-15 Thread H
I am using plotmat 1.6.5 (part of the diagram package) in R 3.6 to plot Markov transition charts but have run into an issue that I was hoping someone could shed light on here. I did e-mail the maintainer over a month ago but have not received a reply. The issue is that the directional arrows po

Re: [R] error with dbFD function in FD library

2021-09-15 Thread Bert Gunter
The posting guide, linked below (please read it!), says: "For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R), ask questions on R-help. If the question relates to a contributed package , e.g., one downloaded from CRAN, try contacting the package

Re: [R] [R Code] Split long names in format.ftable

2021-09-15 Thread Leonard Mada via R-help
Dear List members, I have uploaded an improved version on Github: - new option: align top vs bottom; Functions: split.names: splits and aligns the names; merge.align: aligns 2 string matrices; ftable2: enhanced version of format.ftable (proof of concept); see: https://github.com/discoleo/R/blob

Re: [R] ODP: ggplot question

2021-09-15 Thread Kai Yang via R-help
Hi Grzegorz, You are correct. it works now. One more question: can I turn gc_label 90 degree in plot? Thank you Kai On Wednesday, September 15, 2021, 10:54:52 AM PDT, Grzegorz Smoliński wrote: Hi, Isn’t a bracket missing after gc_label? So it should be: > ggplot(s8_plot, aes(fill=GTr

[R] error with dbFD function in FD library

2021-09-15 Thread alessia ciraolo
Hi everyone, I have a question about FD package. I�m trying to calculate functional diversity indices on my marine organisms data. My trait data includes mobility, feeding type and reworking sediment type. I allowed more than one functional trait for a given taxon for each category, and scored f

[R] ODP: ggplot question

2021-09-15 Thread Grzegorz Smoliński
Hi, Isn’t a bracket missing after gc_label? So it should be: > ggplot(s8_plot, aes(fill=GTresult, y=cases, x=gc_label)) + + geom_bar(position="stack", stat="identity")) Best, Grzegorz Od: Kai Yang via R-help Wysłano: środa, 15 września 2021 19:50 Do: R-help Mailing List Temat: [R] ggplot q

[R] ggplot question

2021-09-15 Thread Kai Yang via R-help
Hello List, I use ggplot to draw a stack bar chart. but I error message. please look it below: > ggplot(s8_plot, aes(fill=GTresult, y=cases, x=gc_label) + + geom_bar(position="stack", stat="identity")) Error: Mapping should be created with `aes()` or `aes_()`. GTresult and gc_label are chara

Re: [R] show structure of selected columns of dataframe

2021-09-15 Thread Luigi Marongiu
Thanks On Wed, Sep 15, 2021 at 5:12 PM Jeff Newmiller wrote: > > Really? > > str( df[ , grep(".*_a*.", names(df)) ] ) > > > On September 15, 2021 7:53:17 AM PDT, Luigi Marongiu > wrote: > >Hello, > >I have a dataframe and I would like to browse the information of its > >structure only for a sub

Re: [R] How to remove all rows that have a numeric in the first (or any) column

2021-09-15 Thread Gregg Powell via R-help
Lots of feedback on this. Will have to take some time after work today to digest some of the more complex answers. Just wanted to say thank you though, to all who took time to provide feedback. I'm very grateful. I'll likely be back with a few additional questions. Regards Gregg Sierra Vista,

Re: [R] show structure of selected columns of dataframe

2021-09-15 Thread Jeff Newmiller
Really? str( df[ , grep(".*_a*.", names(df)) ] ) On September 15, 2021 7:53:17 AM PDT, Luigi Marongiu wrote: >Hello, >I have a dataframe and I would like to browse the information of its >structure only for a subset of columns (since there are hundreds of >them). >For instance, I tried with gr

[R] show structure of selected columns of dataframe

2021-09-15 Thread Luigi Marongiu
Hello, I have a dataframe and I would like to browse the information of its structure only for a subset of columns (since there are hundreds of them). For instance, I tried with grepping some columns as in: ``` df <- data.frame(var_a1 = c(letters[1:3], letters[1:4]), var2 = c(LETTE

Re: [R] Handling interrupts in long-running R functions

2021-09-15 Thread bretschr
Dear Ivan Krylov, Re: > On 10 Sep 2021, at 16:43, Ivan Krylov wrote: > > Hello everyone, > > I'm writing an R function that may be running for "long" periods of > time (think tens of minutes), and I would like to be able to tell it: > "please stop what you're doing and return the not-yet conv