Re: [R] mixture univariate distributions fit

2021-12-30 Thread PIKAL Petr
Hallo Bert Sorry for the confusion, I may not have used correct wording in describing what I wanted to do. Consider this example # 2 different distribution densities mixed together in 1:2 proportion x <- (0:100)/100 y1 <- dnorm((x, mean=.3, sd=.1) y2 <- dnorm((x, mean=.7, sd=.1) ymix <-

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Kai Yang via R-help
Thank you all of your help. I'm new in R. I'll follow Bert's and your suggestions to post the question in another area in future.  Happy New Year Kai On Thursday, December 30, 2021, 02:05:12 PM PST, CALUM POLWART wrote: You will get shot down in flames for posting this here. This list

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Rui Barradas
Hello, This seems like a repetition of a question you already asked and it has nothing to do with the fill aesthetic. The error message is caused by the maps y = mpg[[y]] color = mpg[[c]] First you filter the data keeping only a subset of the rows but now you are using the full data. This

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Bert Gunter
1. Please read and follow the Posting Guide linked below. Among other things, 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." [The link is:

[R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Kai Yang via R-help
Hi R team, I can create a plot using the code below: library(ggplot2) library(dplyr) mpg %>%   filter(hwy <35) %>%    ggplot(aes(x = displ, y = hwy, color = cyl)) +    geom_point() ggsave("c:/temp/hwy_cyl.jpg",width = 9, height = 6, dpi = 1200, units = "in") I want to do the exactly same work

Re: [R] mixture univariate distributions fit

2021-12-30 Thread Bert Gunter
Petr: 1. I now am somewhat confused by your goals. Any curve fitting procedure can fit curves to data, including discrete points on a smooth curve. What cannot be done is to recover the exact parameters of the smooth curve from which your data derive, at least not without knowing how the curve

Re: [R] mixture univariate distributions fit

2021-12-30 Thread PIKAL Petr
Thank you Bert The values are results from particle size measurement by sedimentation and they are really available only as these cumulative or density distributions. What I thought about was that there is some package which could fit data of such curves and deliver parameters of fitted