[R] Plotting issue

uday uday_143_4u at hotmail.com
Fri Feb 17 11:08:17 CET 2012


I have two different datasets 
1) is in monthly format (obs)
2) yearly format (model) 

in obs I have 84 files ( 2003:2009)for different months & in model I have 4
different files which has yearly data (2005:2008)

So for calculating my requirement I need these both data sets. 
The sample calculations are as follows 

file_o<-list.files(path=' ', pattern="0.2.text") # total number of files are
80 
for ( i in 1:file_o){
#get data  here I get 
     Lat_o<-
     Lon_o <-
    time_o<-
     gas_o<- 
} 

file_t< list.files(path=' ', pattern="fg.nc")
for (j in 1:file_t){ 

#get data  here I get 
     Lat_t<-
     Lon_t <-
    time_t<-
     gas_t<- 
} 
nobs<- length(Lat_o)
for (k in 1:nobs){

# here it does some calculation and get some value which is  " gas_new "
}

now I would like to plot this data for every month according to my
observation data 

 ############ plotting##############
year <- 2005:2008
        month<- ("jan","Feb","March","".........."Dec") 
for ( y in year)
for (m in month)
here I use Sp plot and plot map 
      }
} 

what I would like to do is I want to plot data according to my observations
taken ( its in month) 

but when I run my codes it plots same file from2005:2008 but it suppose to
plot 48 different files for different months.

I got stuck here, I am quit new in R.
 it would be very nice it somebody can tell me how to fix this problem. 


Uday 

 





--
View this message in context: http://r.789695.n4.nabble.com/Plotting-issue-tp4396832p4396832.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list