Re: [R] overlaying frequency histograms or density plots in R

2021-02-24 Thread Bogdan Tanasa
Thanks a lot Petr ! shall i uses "dodge" also for the RELATIVE FREQUENCY HISTOGRAMS : p <- ggplot(iris, aes(x=Sepal.Length, y=..count../sum(..count..)*100, colour=Species)) p+geom_histogram(position="dodge") or is there any other way to display the RELATIVE FREQUENCY HISTOGRAMS ? thanks again !

Re: [R] overlaying frequency histograms or density plots in R

2021-02-24 Thread PIKAL Petr
Hi You should use position dodge. p <- ggplot(iris, aes(x=Sepal.Length, colour=Species)) p+geom_density() p <- ggplot(iris, aes(x=Sepal.Length, y=..density.., colour=Species)) p+geom_histogram(position="dodge") Cheers Petr > -Original Message- > From: R-help On Behalf Of Bogdan Tanasa >

Re: [R] Is it Possible to Create S4 Function Objects?

2021-02-24 Thread Abby Spurdle
I've completed the S4 example. Thank you, Herve, for your assistance. begin code plotf <- function (f) { x <- seq (-1, 1,, 200) plot (x, f (x), type="l") } #s4-based function object, with slot setClass ("Quad.S4", contains="function", slots = list (p="numeric") ) Quad.S4 <- function

[R] overlaying frequency histograms or density plots in R

2021-02-24 Thread Bogdan Tanasa
Dear all, we do have a dataframe with a FACTOR called EXP that has 3 LEVELS ; head(pp_ALL) VALUE EXP 1 1639742 DMSO 2 1636822 DMSO 3 1634202 DMSO shall i aim to overlay the relative frequency histograms, or the density histograms for the FACTOR LEVELS, please would you let me know why the

Re: [R] Extract data from .nc file

2021-02-24 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Shailendra: You didn't provide the error messages you received, which makes it difficult to answer. I will say here is at least one typo, in: > write.csv(amo_final, "soi.csv", row.names = FALSE) You have only defined "soi_final". But I would also be surprised if either of the "cbind()" o

[R] Extract data from .nc file

2021-02-24 Thread Shailendra Pratap
Hi, Please help me. I am trying to get information on "soi" from the NetCDF file (please see the attached). The file is showing this info- float soi(time=2001, *MCrun=20, members=100*); :description = "soi"; :long_name = "Southern Oscillation Index"; :units = ""; :level = "sfc"; And Dime