Displaying 2 results from an estimated 2 matches for "feb_data1".
2008 May 12
2
How to eliminate perticular date
Hi R-expert,
I try to eliminate 29 Feb but I got an error message below:
feb_data1 <- Pooraka_data[Pooraka_data$Month=="2",]
feb_28days <- feb_data1 [feb_data1$Day=="28",]
feb_29days <- feb_data1 [feb_data1$Day=="29",]
## delete 29 Feb
feb_no_29 <- feb_data1 [-(feb_29days),]
feb_no_29 <- feb_data1 [-(feb_29days),]
Error in xj[i] : inv...
2010 Sep 02
0
extract month data automatically
Hi,
I would like to extract monthly data automatically using a code. Given are my
sample data.
I know how to do one by one:
jan_data1 <- Pooraka_data[Pooraka_data$Month=="1",4]
feb_data1 <- Pooraka_data[Pooraka_data$Month=="2",4]
mar_data1 <- Pooraka_data[Pooraka_data$Month=="3",4]
apr_data1 <- Pooraka_data[Pooraka_data$Month=="4",4]
...
then i try:
p0_mn <- function(dt)
{ p0 <- sum(dt==0)/length(dt)
mn <- mean(dt)
c(p0=p0, mn...