[R] Odp: Error in matrix, not ordered vectors or numerical value, and SIAR.
Petr PIKAL
petr.pikal at precheza.cz
Fri Nov 11 07:39:06 CET 2011
Hi
> Help!
>
> model1 <- siarmcmcdirichletv4(data, source, tef, concdep=0, 500000,
50000)
>
> Error in matrix(1, ncol = (numsources + numiso) * numgroups, nrow =
> (siardata$iterations - :
> invalid 'ncol' value (too large or NA)
> In addition: Warning message:
> In Ops.ordered((numsources + numiso), numgroups) :
> '*' is not meaningful for ordered factors
>
> Previous message, but more problems:
Maybe it is time to consult manual and help page for the function you use.
For your convenience I coppied it below. I do not use the package so only
few comments
siarmcmcdirichletv4(data, sources, corrections = 0, concdep = 0,
iterations=200000, burnin=50000, howmany=Arguments
data A matrix with each food source as a seperate row and each isotope as
a seperate
column.
^^^^^^^^^^^^^^^^^ most probably a numeric matrix
sources A matrix containing the mean and standard deviations of the
fractionated correction
values for each of the isotopes. Also allows corrections = 0 for
pre-corrected
data.
^^^^^^^^^^^^^^^^^ again a matrix (numeric)
corrections A matrix containing the mean and standard deviations of the
fractional correction
values for each of the isotopes. Also allows corrections = 0 for
pre-corrected
data.
^^^^^^^^^^^^^^^^^^ and for the third time a numeric matrix
Only you know what are your data, sources and tef objects which you feed
to the function. Why not to follow posting guide and uncover it to us,
poor helpers.
Regards
Petr
>
>
> > The data set has 101 values, what can I use instead of letters?
>
> Why do you need to use letters? AFAIK this was only illustration what
> could be root of the error message. If the function requires ordered
> factor you can use
>
> your.ordered.factor <- ordered(your.unordered.factor)
>
> I do not remember original mail but to get rid of error message, the
> function probably needs as an input ordered factor or numeric values.
You
> shall consult help page for this function which option is valid.
>
> as.numeric comes back as NA for the pond dataset (A3, A5, A7, B3, B7,
C2)
>
> Cannot use ordered factor as * function does not work for this. ? And is
> needed to run the model (see below).
>
> ANYONE know max length for dataset in SIAR?
>
> NOW getting following error:
>
> model1 <- siarmcmcdirichletv4(data, source, tef, concdep=0, 500000,
50000)
> Error in matrix(1, ncol = (numsources + numiso) * numgroups, nrow =
> (siardata$iterations - :
> invalid 'ncol' value (too large or NA)
> In addition: Warning message:
> In Ops.ordered((numsources + numiso), numgroups) :
> '*' is not meaningful for ordered factors
>
> Matrix 1 has only 6 vectors in column 1.
>
>
> Thank-you.
>
> Alex.
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Error-in-
>
matrix-not-ordered-vectors-or-numerical-value-and-SIAR-tp4024578p4024578.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list