[R] Error Message Help: Differing Number of Rows

ScottM scott.mcgrane at abdn.ac.uk
Fri Jul 15 19:01:28 CEST 2011


Hello all, 

I'm relatively new to "R" and programming in general - I had previously used
MatLab, but decided to make the transition to R, as the computational times
are much better!

Anyway, I'm trying to use R to run a gamma distribution model to estimate
mean transit times of water moving through a hydrological catchment.

My input are 3 .txt format files as follow:

Precipitation_18o: 2 columns - column 1 is a date (Excel number format) and
column 2 is an isotope ratio (i.e. -8.12)
Runoff_18o: same as above
Daily_Precip: 2 columns - column 1 is the same date format but column 2 is a
weekly bulk precipitation value (i.e. 10mm)

When running the script, I keep getting the following error message:

Error in data.frame(cQ.ou[ind.mea], cQ[cal.cQ:nrow(cQ), 2]) : 
  arguments imply differing number of rows: 42, 44

Now, I know it's not the script, as it run perfectly for one site, but not
the other, but having read previous threads on other forums, it suggests
that there aren't the same number of values in all 3 input files.

A quick use of the str(FILENAME) quickly confirms that all 3 input files
have 322 entries with 2 variables.

I'd be grateful of ANY help, as this is really hampering my research
progress right now!

Cheers, 

Scott_M

--
View this message in context: http://r.789695.n4.nabble.com/Error-Message-Help-Differing-Number-of-Rows-tp3670451p3670451.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list