Re: [R] Issues when trying to fit a curve when generating random deviates

2022-09-19 Thread Daniel Nordlund
On 9/18/2022 9:44 PM, Rui Barradas wrote: Hello, I cannot reproduce the error. Anyway, if the data is discrete a bar plot might be more appropriate. barplot(table(x),     col = "green",     main = "Bar plot of Binomial Distribution B(20,0.4)") Or, to have proportions,

Re: [R] Issues when trying to fit a curve when generating random deviates

2022-09-18 Thread Rui Barradas
Hello, I cannot reproduce the error. Anyway, if the data is discrete a bar plot might be more appropriate. barplot(table(x), col = "green", main = "Bar plot of Binomial Distribution B(20,0.4)") Or, to have proportions, barplot(table(x)/length(x), etc) Hope this helps,

[R] Issues when trying to fit a curve when generating random deviates

2022-09-18 Thread Paul Bernal
Dear friends, Hope you are doing great. I first generated random deviates from a binomial distribution with the following code (I had to generate from a B(20,0.4) dist): #Setting seed set.seed(1234567) #Generating 1000 random deviates from a B(20,0.4) Distribution x <- rbinom(1000,20,0.4)