Skip to content
Prev 277070 / 398506 Next

Odp: Error in matrix, not ordered vectors or numerical value, and SIAR.

and SIAR.
the
Not much. 

FConsumerData is data frame with nonnumeric first column, the same is with 
FTEFData and FSourceData. If you change it to matrix you will get 
character matrix. Trying to change character values to numeric obviously 
leads to NA. How the poor R shall know what number it shall make from A3, 
B3, C2 or A7?

I do not use siar package but in the help page it is clearly stated that 
input shall be ***numeric*** matrices. Not data frames, not character 
values not factors. If you do not know distinction among those objects you 
shall look into R intro document (at least first 6 chapters) which should 
came along with your installation.

BTW, in help page there is

out <- 
siarmcmcdirichletv4(geese1demo,sourcesdemo,correctionsdemo,concdepdemo)

It does not produce any error does it?

If it does not produce any error it is sign that something is wrong with 
your data. Look at structure of your objects you are trying to evaluate 
and compare it with those demo objects.

str(object)

is the first option when something does not seem to be OK.

Regards
Petr
matrix-not-ordered-vectors-or-numerical-value-and-SIAR-tp4024578p4030650.html
http://www.R-project.org/posting-guide.html