[R] Error Message Help: Differing Number of Rows
ligges at statistik.tu-dortmund.de
Sun Jul 17 16:21:36 CEST 2011
On 15.07.2011 19:01, ScottM wrote:
> 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
We do not have your data and hence cannot say, but the error message is
probbaly right that cQ.ou[ind.mea] and cQ[cal.cQ:nrow(cQ), 2] do not
have the same number of elements.
> 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!
> 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.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help