[R] Plot gamma distribution with relative frequency histogram

2014-12-04 Thread dila radi
mma(x, rate=0.02220921, shape=3.63421746),from=0, to=500, main="Gamma distribution", add = T, col = "red") but the gamma fit is not fitted onto histogram as much as it supposed to be. How should I overcome this? Thank you in advanced. Dila [[alternative HTML ve

[R] Finding the Summation of Monthly Amount

2014-10-12 Thread dila radi
1L, 2L, 3L), Rain = c(176.8, 228.2, 90.9, 81, 73.1, 127.7, 242.8, 189.5, 204.2)), .Names = c("Year", "Month", "Rain"), class = "data.frame", row.names = c(NA, -9L)) Thank you so much Dila [[alternative HTML version deleted]] _

[R] to extract extreme data for specified period

2014-06-17 Thread dila radi
0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.08, 0.04, 0, 0, 0, 0, 0, 0, 0, 0, 0.02, 0, 0)), .Names = c("obs", "tobs", "month", "day", "year", "Prec"), row.names = c(NA, 40L ), class = "data.frame") Thank you ver

[R] Replacing NA's in the data set

2014-04-29 Thread dila radi
t;, "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10", "V11"), class = "data.frame", row.names = c(NA, -210L)) I want to replace all NA's value in column 1 until column 10 with

[R] creating multiple line graphs

2014-04-14 Thread dila radi
uot;orange",lwd=3,lty=2) axis(1,at=1:3,c("5%","10%", "20%")) legend("topright", bty="n",c("NRM","AAM","IDW","CCM","MI"), lwd=c(3,3,3,3,3), lty =c(1,2,1,4),col= c("blue","black&q

[R] Replacement Value

2014-04-07 Thread dila radi
0' under variable 'B', the next value under variable 'C' also should be '0'. 2) When value is '1' under variable 'B', there is no changes for values under variable 'C'. How do I achieved this by fulfill these two conditions? Thank you

Re: [R] Deletion of rows

2014-03-14 Thread dila radi
at when I rearrange it column by column, it wont appear anymore. Using this command, I can rearrange the data column by column library(reshape2) res <- transform(melt(dat,id.var=c("Year","Day")),Month=match(variable,month.abb),Amount=value)[,-c(3:4)] res1 <- res[wi

[R] Deletion of rows

2014-03-11 Thread dila radi
have 29 days in Feb) Hope you can help me. Thanks a lot. Regards, Dila __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] Data Rearrangement

2014-02-27 Thread dila radi
5 4 110.5 2013 6 4 22 2013 7 4 3.5 2013 8 4 36.5 I want to rearrange the data according to the YEAR (year by year) Thank you. Regards, Dila [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] (no subject)

2014-02-24 Thread dila radi
0 3/1/2012 0 4/1/2012 0 ... ... ... ... How can I achieve this? Thank you in advanced! Regards, Dila [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Replace NA's with value in the next row

2013-11-13 Thread dila radi
lied to non-(list or vector) of type 'NULL' How to solve this? Thank you in advance. Regards, Dila. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

[R] How to replace NA's data with some value

2013-11-12 Thread dila radi
ght5*Phg); Targetstation but I still could not replace the NA's. My problem is, how do I replace those NA's with another value? Thank you so much for your help and attention. Regards, Dila [[alternative HTML version deleted]] __ R-help@r-projec

[R] how to introduce missing data for complete data

2013-11-10 Thread dila radi
48603 71 1 1 1 48603 71 1 2 0.5 48603 71 1 3 1.3 48603 71 1 4 0.8 48603 71 1 5 0 48603 71 1 6 0 48603 71 1 7 0 ... Thank you so much for your attention and help. Regards, Dila [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] simulation of modified bartlett's test

2012-06-04 Thread dila
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt

[R] simulation of modified bartlett's test

2012-06-04 Thread dila
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt

[R] simulation of levene's test

2012-05-28 Thread dila
hello, I try to run simulation of levene's test to find the p-value but the error of replacement has length zero occur, could anyone help me to fix this problem? asim <- 1000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) g1 <- rnorm(20,0,2) g2 <- rnorm(20,0,2) g3 <- rnorm(20,0,2) x