Re: [R] Converting daily data series to monthly series

2010-04-20 Thread zow...@ncst.go.ke
Thanks  Gabor,
I have got the idear how to aggregate the daily data into monthly data 
using the zoo package. However, as I indicated earlier, in the series I am 
analysing, 29th February of leap years are excluded (so as to have 365 days 
in each year). How do I coerce(force) the the aggregate command to only  
sum 28-days in February for all the years. 

Thanks

ZABLONE OWITI
 GRADUATE STUDENT
Nanjing University of Information, Science and Technology
College of International Education
Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
Tel: +86-25-58731402
Fax: +86-25-58731456 
Mob. 15077895632
Website: www.nuist.edu.cn




From: "Gabor Grothendieck" 
Sent: Wednesday, April 21, 2010 11:46 AM
To: zow...@ncst.go.ke
Subject: Re: [R] Converting daily data series to monthly series 

There is a monthly aggregation of daily data example in the
zoo-quickref vignette:

vignette("zoo-quickref")

and there are also relevant examples using aggregate.zoo or duplicated
in the example section of ?aggregate.zoo

On Tue, Apr 20, 2010 at 11:16 PM, zow...@ncst.go.ke wrote:
> Hi Users,
> I have daily series of data from 1962 - 2000, with  the data for 
February
> 29th in leap years  excluded, leaving 365 daily values for each year. I
> wish to convert the daily series to monthly series. How can I do this 
using
> the zoo package or any other package?
>
> Thanks
>
> ZABLONE OWITI
>  GRADUATE STUDENT
> Nanjing University of Information, Science and Technology
> College of International Education
> Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
> Tel: +86-25-58731402
> Fax: +86-25-58731456
> Mob. 15077895632
> Website: www.nuist.edu.cn
> 
>
>
>[[alternative HTML version deleted]]
>
> __
> 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 provide commented, minimal, self-contained, reproducible code.
>

 

[[alternative HTML version deleted]]

__
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 provide commented, minimal, self-contained, reproducible code.


[R] Converting daily data series to monthly series

2010-04-20 Thread zow...@ncst.go.ke
Hi Users,
I have daily series of data from 1962 - 2000, with  the data for February 
29th in leap years  excluded, leaving 365 daily values for each year. I 
wish to convert the daily series to monthly series. How can I do this using 
the zoo package or any other package?

Thanks 

ZABLONE OWITI
 GRADUATE STUDENT
Nanjing University of Information, Science and Technology
College of International Education
Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
Tel: +86-25-58731402
Fax: +86-25-58731456 
Mob. 15077895632
Website: www.nuist.edu.cn

 

[[alternative HTML version deleted]]

__
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 provide commented, minimal, self-contained, reproducible code.


[R] Problem writing netcdf data with Rclim

2010-04-12 Thread zow...@ncst.go.ke
Dear Users:
I am able to read the file precip.nc (CMAP monthly precip) using the Rclim 
package. How ever, when I try to write the data in a netcdf file, I get the 
following error about the missing value attribute:

> pcpmon<-netcdfread("precip.nc","lon","lat","time","precip",unpack=T)

> 
netcdfwrite(pcpmon$lon,pcpmon$lat,pcpmon$data,"pcpmon.nc",pcpmon$time,mv=-99
9)
Error: Found NAs but no missing value attribute

I can't figure out the error in the missing value attribute. 

How ca I fix the error?

Thanks

ZABLONE OWITI
 GRADUATE STUDENT
Nanjing University of Information, Science and Technology
College of International Education
Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
Tel: +86-25-58731402
Fax: +86-25-58731456 
Mob. 15077895632
Website: www.nuist.edu.cn

 

[[alternative HTML version deleted]]

__
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 provide commented, minimal, self-contained, reproducible code.


[R] Adding country boundaries on field map plots

2010-04-11 Thread zow...@ncst.go.ke
Hi R users,

What is the command  for adding (or how do we add) country boundaries on 
r-spatial plots. 

Thanks  

ZABLONE OWITI
 GRADUATE STUDENT
Nanjing University of Information, Science and Technology
College of International Education
Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China

Website: www.nuist.edu.cn

 

[[alternative HTML version deleted]]

__
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 provide commented, minimal, self-contained, reproducible code.


[R] Adjusting X-axis time scale

2010-04-04 Thread zow...@ncst.go.ke
Dear all,

I am plotting daily data from 1950 to  2000 and I wish to have the time in 
X-axis to indicate years and NOT days (i.e 1950 1951,..,2000 instead of 
1,2, 3, ..).
How do I set the x-axis to show years instead of days.

ZABLONE OWITI
 GRADUATE STUDENT
Nanjing University of Information, Science and Technology
College of International Education
Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
Tel: +86-25-58731402
Fax: +86-25-58731456 
Mob. 15077895632
Website: www.nuist.edu.cn

 

[[alternative HTML version deleted]]

__
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 provide commented, minimal, self-contained, reproducible code.