Re: [R] problem with data for metaMDS analysis please help

2008-04-23 Thread Gavin Simpson
On Tue, 2008-04-22 at 20:19 -0400, stephen sefick wrote:
> am at my wit's end.  I am not sure what is wrong with this data matrix.  It
> is sparse because it is a matrix of species, but I have looked at the row
> totals and column totals and they are positive.
> rmetaMDS(x.d)
> Error in if (autotransform && xam > 50) { :
> missing value where TRUE/FALSE needed
> What is wrong?  And in the future how in God's name do I easily diagnose
> whatever problem there is with this data.  I am in debt to anyone who
> figures this one out.

[All this presumes that x.d is your data as in the file you attached.
You could have helped by including the few lines to read in the data and
do the metaMDS so I didn't have to work this out and guess what x.d
was.]

The problem is very simple; you don't have *all* positive marginal
totals with the dataset you attached. Two variables have missing values
in the R sense, and unless you ask for R to remove missing values (which
in this case would defeat the object of checking the marginal totals),
you can't have found all positive values using the common R tools for
marginal totals.

Take a closer look at your data (that you attached). There are two
columns with NA in them.

This is how I diagnosed the problem:

> # read in the data
> dat <- read.delim("trans.txt")
> # generate species sums these will be NA is any are missing
> csum <- colSums(dat)
> # check if any are missing
> any(is.na(csum))
[1] TRUE
> # yes, some missing, so which ones?
> which(is.na(csum))
X49 X68 
 49  67 
> # Check how many are missing
> summary(dat[, c("X49","X68")])
  X49  X68 
 Min.   :  0.00   Min.   :0.0  
 1st Qu.:  0.00   1st Qu.:0.0  
 Median :  1.00   Median :0.0  
 Mean   :  9.13   Mean   :0.02094  
 3rd Qu.:  6.00   3rd Qu.:0.0  
 Max.   :257.00   Max.   :2.0  
 NA's   :  1.00   NA's   :1.0

These are rudimentary data management and checking steps in R. It would
be worth brushing up on these sorts of things in one of the online
documents. Alternatively, you could have included what you did that lead
you to believe that you had all positive marginal totals so we could see
where you went wrong.

HTH

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-help@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.


[R] Problem with data editor when R built with --enable-mcfs

2007-12-01 Thread gginiu
Hi,

I encountered this problem when I was looking around in R, by default
R is built with --enable-mcfs and when I tried to edit any data I was
getting:

dataentry(datalist, modes) : invalid device
unable to create fontset -*-fixed-medium-r-normal--13-*-*-*-*-*-*-*

anyway I looked around code, noticed that it comes from fragment when
SUPPORT_MCFS is defined, and decided to try my luck without it,
rebuild with:

--disable-mfcs

and it worked like a charm, just doesn't have UTF-8 support now of
course what would be nice... am I missing something? I googled and
searched and found one similar message, but then it was stated it
works with current versions... my fonts in xorg.conf points to right
directories in my system and all other apps works. I run current
version of Arch linux

I would appreciate any help or hints how to solve that - whatever this
is bug or misconfiguration :)
thanks in advance,
Andrzej Giniewicz.

__
R-help@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.