Displaying 3 results from an estimated 3 matches for "startyr".
Did you mean:
starter
2012 Jun 29
1
number of items to replace is not a multiple of replacement length
...k with my data.
For some reason, one of the scripts which were supposed to work is not, and
I get the error message "number of items to replace is not a multiple of
replacement length".
The script is this one:
*open_lpj_nc_gpp <- function(file_name,varname,y1850_file_no,
recentre,startyr,nyrs)
{
library(ncdf)
start_yr=y1850_file_no+(startyr-1850)
print("************************************")
filename=paste(file_name,start_yr,".nc",sep="")
print("Opening:")
print(varname)
print("in:")
print(fil...
2006 Nov 20
2
problem with loop to put data into array with missing data for some files
...their suggestions!
Thank you for taking the time to read my problem,
Sincerely,
Jennifer Barnes
r-help at stat.math.ethz.ch
Here is my code:
#takes precip data for every year and month needed
#from file saved on computer already
#and sorts it into a list (array)
#set some control parameters
startyr <-1954 #note needs to be year before data wanted
nyrs <- 50
months <- nyrs*12
k <- 0
library(chron)
library(utils)
data.out <- list(lats=seq(88.542, -88.542, length=94),
lons=seq(0, 360-1.875, length=192),
date=vector(length=months),
data=array(NA, c(months, 94*192))
)
#...
2006 Nov 20
3
problem with loop to put data into array with missing data forsome files
...y problem,
>
>Sincerely,
>
>Jennifer Barnes
>
>r-help at stat.math.ethz.ch
>Here is my code:
>
>#takes precip data for every year and month needed
>#from file saved on computer already
>#and sorts it into a list (array)
>
>#set some control parameters
>
>startyr <-1954 #note needs to be year before data wanted
>nyrs <- 50
>months <- nyrs*12
>k <- 0
>library(chron)
>library(utils)
>data.out <- list(lats=seq(88.542, -88.542, length=94),
> lons=seq(0, 360-1.875, length=192),
> date=vector(length=months),
> da...