[R] limit to complex plots?

2004-02-26 Thread Suzanne E. Blatt

Hello all.

I am trying to create one figure, divided into 6 graphs/plots each with an inset 
sub-figure.  I can use to layout command to generate one figure with one inset 
sub-figure, but cannot seem to do it for multiple figures on one page.

I've tried a test with the following code:

layout(matrix(c(1,2,3,4), nrow=2, byrow=TRUE))
plot(rnorm(10), rnorm(10))
plot(rnorm(10), rnorm(10))
plot(rnorm(30), rnorm(30))
plot(rnotm(40), rnorm(40))
layout.show(4)

#this works and gives me my one page with 4 figures on it

layout(matrix(c(0,0,0,0,0,1,0,2,0,0,0,0,0,3,0,4), nrow=4, byrow=TRUE))
par(new=TRUE)
plot(rnorm(10), rnorm(10))

par(new=TRUE)
plot(rnorm(20), rnorm(20))

par(new=TRUE)
plot(rnorm(30), rnorm(30))

par(new=TRUE)
plot(rnorm(40), rnorm(40))

# this is the part that doesn't.  I've tried only one 'par(new=TRUE)' command before 
ALL the plot commands and as written above.  The best I can get is 3 sub-figures #2,3 
and 4, in positions 1,2 and 3.

Has anyone figured this out?

thanks,
Suzanne Blatt

__
Introducing the New Netscape Internet Service.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Memory clear problem

2004-01-29 Thread Suzanne E. Blatt

Hello.

I think this is a simple problem.  I have R running a program which generates 
variables that it 'remembers'.  The trouble is that I've modified the file that it's 
generating these variables from but doesn't seem to realize that.  When I type 'trees' 
- I get the same data set produced.

I tried shutting R down and not saving the workspace, but when I open 'er up again and 
type 'trees', there is that same data set.  I saw a memory clear command somewhere in 
one of the help files but I'll be danged if I can locate it now.

Please tell me this is a simple problem with a nice(one-line) solution.

Thanks,
Suzanne

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] cca in vegan

2004-01-14 Thread Suzanne E. Blatt
Hello all,

I'm hoping this is a simple problem.

I'm trying to do cca of my data.  I have my plant data and environmental data as 2 
separate files.  I have 3 years of data, stacked vertically, within these files.  I 
want to conduct the cca for each year and am trying to create separate year files 
using the following:

cnts94 - cnts[1:27,]
env94 - env[1:27,]

when I run

cca(cnts94, env94)

I get the following error message:

Error in cca.default(cnts94, env94): All row and column sums must be 0 in the 
community matrix

There are no missing data points in the data set.

If I run the whole data set:

cca(cnts, env)

it works, and I can plot and do all the associated stuff.

Why not work if I specify a smaller data set?  Am I specifying it wrong?

Thanks,
Suzanne

__
New! Unlimited Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] mpl and ppp

2003-12-19 Thread Suzanne E. Blatt
Hello.

I'm trying to use mpl to compare one spatial pattern with soil variables.  I have 
generated a surface trend for the soil variables and predicted their values for the 
x,y of my trees - that's fine.  I have generated a 'ppp' for my tree data, but when I 
try to put the 2 together in mpl, I get the following error message:

Error in as.ppp(X): Can't interpret X as a point pattern

which is odd because when I,in R, ask it to examine my object it reads:

marked planar point pattern: 55 points
multitype, with levels = 1 2 3 4 5 6
window: polygonal boundary
enclosing rectangle: [4943.5, 5023.4] x [4965.2, 5083.7]

which, as far as I can tell is a ppp.  Can anybody shed some light as to why R would 
not like it?  Is it the polygonal boundary?

Thanks,
Suzanne

__
New! Unlimited Access from the Netscape Internet Service.
Beta test the new Netscape Internet Service for only $1.00 per month until 3/1/04.
Sign up today at http://isp.netscape.com/register
Act now to get a personalized email address!

Netscape. Just the Net You Need.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Barplots

2003-11-07 Thread Suzanne E. Blatt
Hello,
Can anyone tell me how to label individual bars on a barplot?  I want to put an * or 
letter ABOVE the bar to denote statistical significance.  Is this possible and how?

Thanks,
Suzanne

__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Barplots

2003-11-07 Thread Suzanne E. Blatt

Hello,

Thanks for the suggestion below.  I did one of my figures and it worked perfectly.  I 
tried it on my second figure and got double-labelling on the first bar.  I used the 
same code to create both figures, and the same code to label.  I've attached the code 
for one of the plots (there were 3/figure) if anyone has a chance to figure out why.

Thanks,
Suzanne


Philipp Pagel [EMAIL PROTECTED] wrote:

Hi!

On Fri, Nov 07, 2003 at 10:46:27AM -0500, Suzanne E. Blatt wrote:
 Can anyone tell me how to label individual bars on a barplot?  I want
 to put an * or letter ABOVE the bar to denote statistical
 significance.  Is this possible and how?

You can use text() to put arbitrary strings in your plot. So you only
need to add some offset to your y-values and work out the x-positions:

y - c(10,12,15,8)
lab - c('*','**','***','*')
barplot(y, ylim=c(0,20), space=0.5)
x - (0:3*0.5)+1:4 
text(x, y+1, lab, adj=0.5)

cu
Philipp

-- 
Dr. Philipp PagelTel.  +49-89-3187-3675
Institute for Bioinformatics / MIPS  Fax.  +49-89-3187-3585
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1
85764 Neuherberg, Germany

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Barplots (THANK YOU!!)

2003-11-07 Thread Suzanne E. Blatt


Thanks!

That did it!!

Suzanne


Philipp Pagel [EMAIL PROTECTED] wrote:

On Fri, Nov 07, 2003 at 03:16:13PM -0500, Suzanne E. Blatt wrote:
 Thanks for the suggestion below.  I did one of my figures and it
 worked perfectly.  I tried it on my second figure and got
 double-labelling on the first bar.  I used the same code to create
 both figures, and the same code to label.

Well, maybe you should use the x values returned by barplot (your
variable blocks) instead of computing x-positions yourself as I
originally suggested.

cu
Philipp

-- 
Dr. Philipp PagelTel.  +49-89-3187-3675
Institute for Bioinformatics / MIPS  Fax.  +49-89-3187-3585
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1
85764 Neuherberg, Germany

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Deciphering an error message

2003-07-01 Thread Suzanne E. Blatt




Hello again,

Below is the code I am using which generates the error message.

Any comments greatly appreciated,
S.




#
# Function to create a PPP object for all the points in a particular
# include.  Mark the points with their species name (or a number
# indicating it)
#
# Usage:
# x - getBigPPP(year, include, species, number=FALSE)
#
# Where:
# x = ppp object with coordinates and bounds for indicated species
#  and plots.
# year = year(s) to include data for.  Either a single number or a
#vector of numbers
# include = name(s) of plots to include data from.  Either a single
#   character expression or a vector of characters.
# species = name(s) of species to include data for.  Either a single
#   species name or a vector of characters.
# number = flag indicating whether species names or numbers are used
#  as marks in ppp object.  Species names are default.  To
#  use numbers, set number=TRUE.  This argument is not needed
#  unless numbers are desired.
#
# Example:
# source(spat1.R)  # source file to install functions
# getBigPPP(1992, G1, apple) # print PPP object (summary of)
## for apple in G1 in 1992.  Marks
## will be species name 'apple'
# x - getBigPPP(1992, c(P1,P2,P3), c(apple,hawthorn), number=TRUE)
## x is defined as PPP object with
## coordinates and plot information
## for apple and hawthorn species
## in plots P1, P2, and P3, with
## marks set to numbers.
# plot(x)# plot locations of species, with
## different marks for each one, and
## plot boundaries.
#
getBigPPP - function(year=NULL, include=NULL, species=NULL, number=FALSE, 
spColNam=Species) {
# message about usage
if(is.null(year) || is.null(include)) {
return(ERROR !)
}
# create species selection if it is now null
spCol - t(trees[spColNam])
# print(spCol)
if(is.null(species)) {
species - as.character(unique(spCol))
}
# create the bounds for this object
bounds - plotBounds(include)
# selection based on include and year
select - (trees$Plot %in% include)  (trees$Year %in% year) 
(spCol %in% species)  (!is.na(trees$Northing)) 
(!is.na(trees$Easting))  (trees$Present == 1)
# mark with numbers or with species name
if(!number) {
return(ppp(x=trees$Easting[select], y=trees$Northing[select],
marks=as.factor(spCol[select]), poly=bounds))
}
specs - unique(spCol[select])
marks - apply(as.matrix(spCol[select]), 1, function(x) {
which(specs == x)[1]
})
return(ppp(x=trees$Easting[select], y=trees$Northing[select],
marks=as.factor(marks), poly=bounds))
}
--







Uwe Ligges [EMAIL PROTECTED] wrote:

Suzanne E. Blatt wrote:
 Hello,
 
 I'm working in spatstat and having difficulty with the ppp objects.  I can get a 
 ppp object for one set of data, but with the same code applied to a second data set 
 (all I am changing is the field identifier), I get the following error message:
 
 Error in switch(w$type, rectangle={: internal error: some total scores are neither 
 0 nor 1

What is a ppp object?
Which function has been applied and generated that error message?

The error message tells you some values a ought to sum up to 0 or 1 but 
they don't. I (and perhaps others as well) cannot help when you don't 
specify some relevant information.

Uwe Ligges

 Any thoughts on what this means and how to correct it would be most appreciated.
 
 Thanks,
 Suzanne
 
 __
 McAfee VirusScan Online from the Netscape Network.
 Comprehensive protection for your entire computer. Get your free trial today!
 http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
 
 Get AOL Instant Messenger 5.1 free of charge.  Download Now!
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help




__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Deciphering an error message

2003-06-30 Thread Suzanne E. Blatt

Hello,

I'm working in spatstat and having difficulty with the ppp objects.  I can get a ppp 
object for one set of data, but with the same code applied to a second data set (all I 
am changing is the field identifier), I get the following error message:

Error in switch(w$type, rectangle={: internal error: some total scores are neither 0 
nor 1

Any thoughts on what this means and how to correct it would be most appreciated.

Thanks,
Suzanne

__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Nested anovas

2003-06-09 Thread Suzanne E. Blatt

Hello,

Is anyone out there doing nested anovas?  I'm familiar with the notation to designate 
the nesting in SAS but can't seem to find any for R.  How can I specify the nesting 
levels?

Thanks,
Suzanne

__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Fonts in expression(paste)

2003-01-31 Thread Suzanne E. Blatt

Hello.

I'm trying to change the fonts of my text.  If I have 'expression(paste)' included (to 
get scientific symbols), the font= doesn't take effect.  Is there a way around this?

Thanks,
Suzanne

__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help