On Mar 6, 2011, at 7:34 PM, David Winsemius wrote:
On Mar 6, 2011, at 6:05 PM, Liviu Andronic wrote:
On Sun, Mar 6, 2011 at 11:53 PM, Liviu Andronic landronim...@gmail.com
wrote:
On Sun, Mar 6, 2011 at 11:49 PM, Liviu Andronic landronim...@gmail.com
wrote:
Dear all
This may be obvious,
Hi,
I am missing something obvious.
Need to create vector as:
(0, i-1 + TheoP(i) - TheoP(i-1), repeat) Where i is the index position
in the vector and i[1] is always 0.
Found myself having to use a For Loop because I could not get sapply
working. Any suggestions ?
delta - function(x)
I have to create a number of bubble plots, and am wondering what methods folks
prefer for this task. I've been experimenting with the symbols() function, with
text() to provide plot labels. Any opinions on the relative merits of this
method versus others? One criterion would be the ability to
Any help on this would be appreciated. Thank you.
--
View this message in context:
http://r.789695.n4.nabble.com/Zero-Inflated-Distributions-tp3334861p3338344.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
predict.svm only returns probabilities for model types (Model$type) less
than 2, which I guess are classification models (?). In any case, the
probabilities are returned as an attribute which your result clearly
lacks. Trivial example:
model- svm(Species ~ ., data = iris[-1,],
I am trying to construct a data set with some sequences for example:
a = seq(0,1,0.1)
m = matrix(nrow = 1331, ncol = 3)
m[,1] = rep(a,121)
m[,2] = rep(a,11,each = 11)
m[,3] = rep(a,1,each = 121)
I realize that there may be better ways of doing this, but this approach
demonstrates the problem
On Sun, Feb 27, 2011 at 1:29 AM, James Platt james-pl...@hotmail.co.uk wrote:
Hi all,
I'm quite new to wireframe, essentially what I want to do is display a graph,
and z-values 1 would be yellow and those 1 would be blue.
This is a bit of my data.
0.334643563 0.350913807
Hi Tom,
That's once again the floating point number issue: see FAQ 7.31.
Look at this:
sum(m[161,])
[1] 1
sum(m[161,])==1
[1] FALSE
sum(m[161,])-1
[1] 2.220446e-16
So 0.6+0.3+0.1 is indeed greater than 1
Try this instead:
round(sum(m[161,]))==1
[1] TRUE
HTH,
Ivan
Le 3/7/2011 08:08,
On Mon, Feb 21, 2011 at 5:29 AM, joepvanderzanden
joep_vd_zan...@hotmail.com wrote:
Hi all,
I'm trying to make multiple lattice contour plots which have the same color
key, to allow good comparisons. However, I run into some problems when
fitting the plots to the color key. Basically my
On Mon, Mar 7, 2011 at 1:38 AM, David Winsemius dwinsem...@comcast.net wrote:
subset(x[order(x$Species1), ], Sepal.Length==6.7 )
Thank you all for the suggestions. Now I can do exactly what I wanted. Regards
Liviu
__
R-help@r-project.org mailing list
On 06/03/11 22:34, John Dennison wrote:
[...]
from data like
Customer-ID | Item-ID
cust1 | 2
cust1 | 3
cust1 | 5
cust2 | 5
cust2 | 3
cust3 | 2
...
#read in data to a sparse binary transaction matrix
txn =
Hello everyone !
I am currently trying to convert a program from S-plus to R, and I am
having some trouble with the S-plus function called influence(data,
statistic,...).
This function aims to calculate empirical influence values and related
quantities,
and is part of the Resample library that
I have the following xts objetct temp
str(temp)
An ‘xts’ object from 2010-12-26 to 2011-03-05 containing:
Data: num [1:70, 1] 2.95 0.852 -0.139 1.347 2.485 ...
- attr(*, dimnames)=List of 2
..$ : NULL
..$ : chr t_n
Indexed by objects of class: [POSIXct,POSIXt] TZ: GMT
xts
Hi,
I have produced some clustersets with the same program and different
parameters and want to compare them.
They contain a few thousand clusters each with a few million elements in total.
After googling around, I couldn't find much of relevance, so I am
asking here. Is there any package in R
Thank you very much.
-- Forwarded message --
From: Uwe Ligges lig...@statistik.tu-dortmund.de
Date: 2011/3/5
Subject: Re: [R] Fwd: r.dll
To: wesley mathew wesleycmat...@gmail.com
Cc: r-help@r-project.org
On 04.03.2011 19:40, wesley mathew wrote:
Dear All
I downloaded
CHECK FOR CONFLICTS IN YOUR PATH !!!
I had a related problem when trying to use library RGtk2 for the first
time. My problem was that when loading the library R was looking for the
file zlib1.dll but couldn't find the procedure to launch RGtk2. I was
getting an Entry Point not found error from
Victor,
The weekdays function will return the days of the week (as a character
vector of names) that a given vector of dates (Date or POSIXct) fall on.
These can then be converted into numbers using a look-up table/vector. See
below for an example using the sample_matrix data included with the
Hi,
I have two 3 D arrays. Both are of this form
array_1- array[n,n,k]
array_2-array[m,m,k]
Lets say n=83 and m=80
Since nm. I would like to add rows and columns to array_2 to make them
equal. I want to keep the size of the third dimension fixed i.e.. k.
i.e.
if (nrow(array_1)nrow(array_2))
{
On Sun, Mar 6, 2011 at 10:13 PM, Eric Fail eric.f...@gmx.com wrote:
Dear R-list,
I have a partly comma separated partly underscore separated string that I am
trying to parse into R.
Furthermore I have a bunch of them, and they are quite long. I have now spent
most of my Sunday trying to
On Mar 7, 2011, at 12:34 AM, rivercode wrote:
Hi,
I am missing something obvious.
Need to create vector as:
(0, i-1 + TheoP(i) - TheoP(i-1), repeat) Where i is the index
position
in the vector and i[1] is always 0.
I think your prototype is not agreeing with the code below. Is i
On Mar 7, 2011, at 12:11 AM, Al Roark wrote:
I have to create a number of bubble plots, and am wondering what
methods folks prefer for this task. I've been experimenting with the
symbols() function, with text() to provide plot labels. Any opinions
on the relative merits of this method
Dear List members,
I would like to test whether an observed occupancy of lakes in a landscape has
occurred randomly (by chance) or not.
How can I do that? The problem is that it concerns only a single species and I
would like to use binary data only.
At first I thought of generating null
I am trying to compare and contrast the smoothing in the {mgcv} version
of gam vs. the {gam} version of gam but I get a strange side effects
when I try to alternate calls to these routines, even though I detach
and unload namespaces.
Specifically when I start up R the following code runs
Hi! I have a dataframe like this:
dat=data.frame(Age=c(rep(30,8),rep(40,8),rep(50,8)),Period=rep(seq(2005,2008,1),3),Rate=c(seq(1,8,1),seq(9,16,1),seq(17,24,1)),Sex=rep(c(rep(0,4),rep(1,4)),3))attach(dat)dat
Age Period Rate Sex1 30 2005 1 02 30 2006 2 03 30 2007
3 04
### An numeric problem in R
###I have two matrix one is##
A - matrix(c(21.97844, 250.1960, 2752.033, 29675.88, 316318.4, 3349550,
35336827,
24.89267, 261.4211, 2691.009, 27796.02, 288738.7, 3011839,
31498784,
21.80384, 232.3765, 2460.495, 25992.77,
On 07/03/2011 12:11 AM, Erin Hodgess wrote:
Dear R People:
When I want to produce a small sample confidence interval using
t.test, I get the following:
t.test(buzz$var1, conf.level=.98)$conf.int
[1] 2.239337 4.260663
attr(,conf.level)
[1] 0.98
How do I keep the attr statement from printing,
On 07/03/2011 8:46 AM, baicaidoufu wrote:
### An numeric problem in R
###I have two matrix one is##
A- matrix(c(21.97844, 250.1960, 2752.033, 29675.88, 316318.4, 3349550,
35336827,
24.89267, 261.4211, 2691.009, 27796.02, 288738.7, 3011839,
31498784,
On Mar 7, 2011, at 8:37 AM, Marcos Prunello wrote:
Hi! I have a dataframe like this:
dat
=
data
.frame
(Age=c(rep(30,8),rep(40,8),rep(50,8)),Period=rep(seq(2005,2008,1),
3
),Rate
=c(seq(1,8,1),seq(9,16,1),seq(17,24,1)),Sex=rep(c(rep(0,4),rep(1,4)),
3))attach(dat)dat
Age Period Rate Sex1
Hi Thomas,
Several of us explained this in different ways just last week, so you might
search the archive. Floating point numbers are an approximate representation
of real numbers. Things that can be expressed exactly in powers of 10 can't be
expressed exactly in powers of 2. So the sum
However the as.data.frame(a) transforms the matrix into a numeric
data.frame so when I implement the rpart algorithm it automatically
returns a regression classification tree.
Look at help(rpart). The program uses the type of the y variable to
GUESS at what you want for the method argument.
Date: Mon, 7 Mar 2011 14:15:49 +0100
From: johannes.pen...@mfn-berlin.de
To: r-help@r-project.org
Subject: [R] null model for a single species?
Dear List members,
I would like to test whether an observed occupancy of lakes in a landscape
Hi All,
When I teach an intro workshop on R, I've been minimizing quote confusion by
always using quotes around package names in function calls. For example:
install.packages(Hmisc)
update.packages(Hmisc)
library(Hmisc)
citation(Hmisc)
search() # displays package names in quotes
On 07/03/2011 9:52 AM, Muenchen, Robert A (Bob) wrote:
Hi All,
When I teach an intro workshop on R, I've been minimizing quote confusion by
always using quotes around package names in function calls. For example:
install.packages(Hmisc)
update.packages(Hmisc)
library(Hmisc)
citation(Hmisc)
abind works well for this example.
a1 - array(1:18, dim=c(3,3,2))
a2 - array(101:150, dim=c(5,5,2))
a1b - abind(a1, array(400, dim=c(2,3,2)), along=1)
a1c - abind(a1b, array(500, dim=c(5,2,2)), along=2)
dim(a1c)
a1
a2
a1c
On Mon, Mar 7, 2011 at 6:54 AM, Usman Munir
In an Sweave slide, I want to use sem::read.moments() and
sem::specify.model(), which work
by using scan() to read the following lines, up to the first blank
line. However, Sweave
throws an error:
Sweave(sem-thurstone.Rnw)
Writing to file sem-thurstone.tex
Processing code chunks ...
1 :
On 07/03/2011 10:21 AM, Michael Friendly wrote:
In an Sweave slide, I want to use sem::read.moments() and
sem::specify.model(), which work
by using scan() to read the following lines, up to the first blank
line. However, Sweave
throws an error:
Sweave(sem-thurstone.Rnw)
Writing to file
One way would be to wrap it in as.vector()
as.vector( t.test(rnorm(5),rnorm(5))$conf.int )
[1] -0.9718231 1.2267976
-Don
On 3/6/11 9:11 PM, Erin Hodgess erinm.hodg...@gmail.com wrote:
Dear R People:
When I want to produce a small sample confidence interval using
t.test, I get the
On Mar 7, 2011, at 10:44 AM, MacQueen, Don wrote:
One way would be to wrap it in as.vector()
as.vector( t.test(rnorm(5),rnorm(5))$conf.int )
[1] -0.9718231 1.2267976
Or even c():
c( t.test(rnorm(5),rnorm(5))$conf.int )
[1] -1.055843 1.742806
-Don
On 3/6/11 9:11 PM, Erin Hodgess
Dear all,
I'm performing a detrended correspondence analysis on vascular plant
community data (296 species), and I have a question on the species scores
projected in the ordination diagram. When I run a ordiplot all species are
projected in the output graph, but I'd like to restrict the number of
I'm not sure if this exactly what you need but it is a good introduction.
and a great website to boot.
http://flowingdata.com/2010/11/23/how-to-make-bubble-charts/
John
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
At 10:21 AM -0500 3/7/11, Michael Friendly wrote:
In an Sweave slide, I want to use sem::read.moments() and
sem::specify.model(), which work
by using scan() to read the following lines, up to the first blank
line. However, Sweave
throws an error:
Sweave(sem-thurstone.Rnw)
Writing to file
Hope this clarifies my Q.
Creating a vector where each element is (except the first which is 0) is:
the previous element + a calculation from another vector theoP[i] -
theoP[i-1]
I could not figure out how to do this without a for loop, as the vector had
to reference itself for the next
On Mar 7, 2011, at 11:12 AM, rivercode wrote:
Hope this clarifies my Q.
Creating a vector where each element is (except the first which is
0) is:
the previous element + a calculation from another vector theoP[i] -
theoP[i-1]
I could not figure out how to do this without a for loop, as
On 07.03.2011 16:17, Duncan Murdoch wrote:
On 07/03/2011 9:52 AM, Muenchen, Robert A (Bob) wrote:
Hi All,
When I teach an intro workshop on R, I've been minimizing quote
confusion by always using quotes around package names in function
calls. For example:
install.packages(Hmisc)
Look at the filter() function, which can do recursive
and convolutional filtering. cumsum() and diff(),
respectively, are special cases of recursive and
convolutional filtering and cumsum() may be enough
in your case.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original
Isn't c(0, cumsum(diff(theoP)) ) just theoP - theoP[1] ?
-- David
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of David Winsemius
Sent: Monday, March 07, 2011 10:52 AM
To: rivercode
Cc: r-help@r-project.org
Subject: Re: [R]
hello list! I'm sorry, I just stumbled over this strange behaviour (at
least I am not able to explain the behaviour, therefore I assume it to
be a strange behaviour):
attach(water) # I know, this is not recommended
names(water[3:10])
[1] temp pH DO BOD COD no3 no2 po4
for (i in
Hi,
I myself do not use lattice plots, but I think your problem is in FAQ
7.22: you didn't print() your plots.
See the R FAQ for more details on it.
HTH,
Ivan
Le 3/7/2011 18:28, Sacha Viquerat a écrit :
hello list! I'm sorry, I just stumbled over this strange behaviour (at
least I am not
Try:
print(xyplot(N_female~eval(parse(text=i))
|group,xlab=i,ylab=Abundance))
Steve Riley, PharmD, PhD
Clinical Pharmacology
Specialty Care Medicines Development Group
Pfizer Inc.
50 Pequot Ave MS-6025-B2110
New London, CT 06320
Email: steve.ri...@pfizer.com
Phone: (860) 732-1796
Dear Sacha,
On Mon, Mar 7, 2011 at 9:28 AM, Sacha Viquerat tweedi...@web.de wrote:
hello list! I'm sorry, I just stumbled over this strange behaviour (at least
I am not able to explain the behaviour, therefore I assume it to be a
strange behaviour):
attach(water) # I know, this is not
On Mar 7, 2011, at 12:27 PM, David Reiner wrote:
Isn't c(0, cumsum(diff(theoP)) ) just theoP - theoP[1] ?
I think it just might be. There is no random or systematic factor
that modifies that alternating sign in the series.
-- other David.
-- David
-Original Message-
From:
I'm trying to use the survey package to calculate a risk difference with
confidence interval for binge drinking between sexes. Variables are
X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group
prevalences easily enough with
result - svyby(~X_RFBING2, ~SEX, la04.svy, svymean, na.rm
You need to print lattice objects. See the FAQ.
--
David.
On Mar 7, 2011, at 12:28 PM, Sacha Viquerat wrote:
hello list! I'm sorry, I just stumbled over this strange behaviour
(at least I am not able to explain the behaviour, therefore I assume
it to be a strange behaviour):
It turned out that rearranging the data was indeed the key to get the image I
want. The way I do it now is this:
tt - read.csv(file=file.csv, header=T, sep=,, dec=.,
stringsAsFactors=F)
names(tt) - c('time','abs')
dat - with(tt, table(time, abs))
image(dat,col=rainbow(256))
I'm now modifying the
Hi
I have the table data below
Simula.Capital-data.frame(Week=c(0:52), Production=0)
Simula.Capital$Production-round(c(120,rnorm(52, mean = 100, sd = 25)), 0)
weeks=3
i-1; Sell-NULL; Maximo-NULL
for(i in seq(along= Simula.Capital$Production)){
Maximo-Simula.Capital[2,Production]
Just to tie up this thread, I wanted to report my solution:
When (n-1)p is an integer, there is a closed form solution:
pbinom(j-1,n,...)
When it is not an integer, its fairly easy to approximate the solution by
interpolating between the closed-form solutions: fitting log(1 - probability
from
Hi R-help.
I am trying to run a linear mixed model with nested factors with either
lme or lmer and I am having no luck obtaining the same results as Minitab.
Here is Minitab's code:
MTB GLM 'count' = site year replicate(site year) site*year;
SUBC Random 'year' 'replicate';
Can you tell me
David:
It is unlikely you will get a helpful response to this. Instead, you will
improve your chances of a good response if you do three things:
1) Provide a mathematical description of the model you are trying to estimate
2) Provide a description of the data you have
3) Provide some code or
Think about it.
You have asked for help from the R list but have posted no R code,
only Minitab code. That means in order to answer, the helpeR must know
Minitab. Well, some may, but there's certainly no reason to expect so
on an R list. Don't you therefore think it might be wiser to post a
On Tue, Mar 8, 2011 at 6:50 AM, michael.laviole...@dhhs.state.nh.us wrote:
I'm trying to use the survey package to calculate a risk difference with
confidence interval for binge drinking between sexes. Variables are
X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group
The way I see it is that you have a non-homogeneous poisson process to
describe the way the students arrive and that you're missing the service
time of your tutors.
The way you are modeling the arrival of students is *really *bad. At most,
only a single student can arrive each hour so to solve
Hello:
I wonder if I could get a little help with random sampling in R.
I have a vector of length 7375. I would like to draw 3 distinct random
samples, each of length 100 without replacement. I have tried the following:
d1 - 1:7375
set.seed(7)
i - sample(d1, 100, replace=F)
s1 - sort(d1[i])
Thank you Peter. SAS Universal Viewer can open both SAS datasets. And if I do
the following in SAS, it will print out the dataset:
libname x 'C:\SASdata';
proc print data=x.a;
run;
Here are what is in the log files:
1. For the one that doesn't work:
tmp-read.ssd(C:\\SASdata,
Hi Erin,
The Chambers book and web page Josh mentioned provide a good
description of the S4 object system. Another introduction to S4 is Robert
Gentleman's S4 Classes in 15 pages, more or less (
http://www.stat.auckland.ac.nz/S-Workshop/Gentleman/S4Objects.pdf). The
help pages for
would this work?
s - sample(d1, 300, F)
D - data.frame(a = s[1:100], b = s[101:200], c = s[201:300])
--
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
Is the room still a room when its empty?
Cesar, your indexing is wrong:
On Mon, Mar 7, 2011 at 2:17 PM, Cesar Hincapié
cesar.hinca...@utoronto.ca wrote:
Hello:
I wonder if I could get a little help with random sampling in R.
I have a vector of length 7375. I would like to draw 3 distinct random
samples, each of length 100
Hi,
I'm using package caret to rank predictors using random forest model and draw
predictors importance plot. I used below commands:
rf.fit-randomForest(x,y,ntree=500,importance=TRUE)
## x is matrix whose columns are predictors, y is a binary resonse vector
## Then I got the ranked predictors
It would help if you provided the code that you used for the caret functions.
The most likely issues is not using importance = TRUE in the call to train()
I believe that I've only implemented code for plotting the varImp
objects resulting from train() (eg. there is plot.varImp.train but not
On 07/03/2011 2:17 PM, Cesar Hincapié wrote:
Hello:
I wonder if I could get a little help with random sampling in R.
I have a vector of length 7375. I would like to draw 3 distinct random
samples, each of length 100 without replacement. I have tried the following:
d1- 1:7375
set.seed(7)
Hi, I am trying to run a conditional logistic model on a nested case-control
study using cph() and then estimate survival based on the model. The data came
from Prof Bryan Langholz website where he also has the SAS code to this, so I
am
trying to replicate the SAS results.
The data attached.
Dear,
I am now writing more formal academical paper, and would like to reference
an R package. Do you have any recommendation how to do it?
Taking for instance the RODBC package as an example, how would the reference
look like?
http://cran.r-project.org/web/packages/RODBC/index.html
Thank you
Duncan Murdoch murdoch.dun...@gmail.com 03/07/11 3:17 PM
On 07/03/2011 9:52 AM, Muenchen, Robert A (Bob) wrote:
Hi All,
When I teach an intro workshop on R, I've been minimizing
quote confusion by always using quotes around package names
in function calls.
... I'm wondering if there's a
http://www.iiap.res.in/astrostat/School07/R/html/utils/html/citation.html
On Mon, Mar 7, 2011 at 4:12 PM, Jan Hornych jh.horn...@gmail.com wrote:
Dear,
I am now writing more formal academical paper, and would like to reference
an R package. Do you have any recommendation how to do it?
Hi Jan,
R citation('RODBC')
To cite package RODBC in publications use:
Brian Ripley and and from 1999 to Oct 2002 Michael Lapsley (2010). RODBC:
ODBC
Database Access. R package version 1.3-2.
http://CRAN.R-project.org/package=RODBC
A BibTeX entry for LaTeX users is
@Manual{,
Hello!
I have 2 variables - predictor pred and response variable DV:
pred-c(439635.053, 222925.718, 668434.755, 194242.330, 5786.321, 115537.344,
100835.368, 7133.206, 159058.286, 4079991.629, 3380078.060, 2661279.136,
2698324.478, 1245213.965, 1901815.503, 1517019.451, 1396857.736,
Cesar, I think your basic misconception is that you believe 'sample' returns a
list of indices into the original vector. It does not; it returns actual
elements of the vector:
sample(runif(100),3)
[1] 0.4492988 0.0336069 0.6948440
I'm not sure why you keep resetting the seed, but if it's
David, David, David...you forgot the solid and dashed lines :) It's OK, it
gives me an excuse to look at this from a slightly different angle. [The
intersection() function is a *really* good trick, BTW - thanks for the
reminder.]
Back to the OP. Let's re-read the data:
dat=data.frame(Age =
I am using the following commands:
postscript(file=test.eps,paper=special,width=6,height=6,horizontal=FALSE)
# fake data
x - c(12,13,14)
y - c(41,42,43)
plot(x,y,type=n,xlab=expression(paste(log ,nu[peak],
[Hz],sep=)),ylab=expression(paste(log ,L[peak], [,ergs,
I found the answer, sorry for not waiting longer before asking.
For anyone reading the archives, inserting
par(mar=c(5,4,4,2)+0.5) should alleviate the problem (default is +0.1).
In general,
help(par)
is a good thing to check for graphical issues.
On 03/07/2011 04:53 PM, Eileen Meyer
Thank you all for your helpful comments and suggestions.
Both proper indexing and subsetting a random sample of 300 work well.
Best wishes,
Cesar
On 2011-03-07, at 5:31 PM, rex.dw...@syngenta.com rex.dw...@syngenta.com
wrote:
Cesar, I think your basic misconception is that you believe
Erin
You could use
as.vector(t.test(buzz$var1, conf.level=.98)$conf.int)
Bill Venables.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Erin Hodgess
Sent: Monday, 7 March 2011 3:12 PM
To: R help
Subject: [R] attr question
Dear
I am using, http://www.rd.dnc.ac.jp/~otsu/lecture/RwithMKL.html to
compile R 2.10 . Everything compiles fine but I was wondering if there
are any more optimizations I can do with the flags.
__
R-help@r-project.org mailing list
David Dudek david.dudek at student.umb.no writes:
Hi R-help.
I am trying to run a linear mixed model with nested factors with either
lme or lmer and I am having no luck obtaining the same results as Minitab.
Here is Minitab's code:
MTB GLM 'count' = site year replicate(site year)
Dimitri Liakhovitski dimitri.liakhovitski at gmail.com writes:
I have 2 variables - predictor pred and response variable DV:
pred-c(439635.053, 222925.718, 668434.755, 194242.330, 5786.321, 115537.344,
100835.368, 7133.206, 159058.286, 4079991.629, 3380078.060, 2661279.136,
2698324.478,
Hi:
This works only because all of the observations you want to label are in one
panel - it is not a general solution. I used the layer() function from the
latticeExtra package for this:
library(lattice)
library(latticeExtra)
xyplot(p ~ xvar|chr, data=dataf,
panel = function(x, y, ...) {
This may be asking too much, but I'm wondering if anyone has a
solution (even a hack) for creating multiple (overlay) plots in an
Sweave file and post-processing the overlays in beamer appropriately.
For example, suppose I have a series of figure blocks in my .Rnw file:
plot1,fig=TRUE=
Thanks to Gabor Grothendieck and Dennis Murphy I can now solve first
part of my problem and already impress my colleagues with the
R-program below (I know it could be written in a smarter way, but I am
learning). It reads my partly comma separated partly underscore
separated string and cleans it
Hello!
I have the data frame pop:
xloc yloc gonad indEneW Agent
123 20 516.74 1 0.02 20.21 0.25
223 20 1143.20 1 0.02 20.21 0.50
321 19 250.00 1 0.02 20.21 0.25
422 15 251.98 1 0.02 18.69 0.25
524 18 598.08 1 0.02
Hi, let's say I have a simple ANOVA model with 2 factors A (level A1 and A2)
and
B (level B1 and B2) and their interaction:
aov(y~A*B, data=dat)
It turns out that the interaction term is not significant (e.g. P value = 0.2),
but if I used glht() to compare A1 vs. A2 within each level of B, I
Here is possibly one method (if I have understood you correctly):
con - textConnection(
+ xloc yloc gonad indEneW Agent
+ 123 20 516.74 1 0.02 20.21 0.25
+ 223 20 1143.20 1 0.02 20.21 0.50
+ 321 19 250.00 1 0.02 20.21 0.25
+ 422 15
Dear Bill.. .great, thanks for your quick response.
Cheers
Nico
On 3/7/2011 8:16 PM, bill.venab...@csiro.au wrote:
i- with(pop, cumsum(!duplicated(cbind(xloc, yloc
k- 2 ## how many do you want?
no- min(which(i == k))
pop[1:no, ]
__
As I believe I already told you in my original reply, you have to make
use of the subscripts argument in the panel function to subscript the
P values etc. vector to be plotted in each panel. Something like:
(untested)
panel = function(x, y,subscripts,...) {
panel.xyplot(x,
Hi,
Thanks for your replies.
In summary:
1. Replace code with c(0, cumsum(diff(theoP)) ). This is indeed correct
and I had not realized it !!
d = vector(mode = numeric, length= len)
d[1] = 0
if (len1) for (i in 2:len) { d[i] = d[i-1] + theoP[i] - theoP[i-1] }
2. How to create
Hello, I am trying to run multiple glm models for a dataset and need some
help
First, i generated a matrix of abundance for 1 populations based on the
mean and variance of my dataset
X - replicate(1, rpois(50, 9.244655))
and entered the years as row names
Y - c(1960:2009)
rownames(X)-Y
Hello,
I just ran the predict.StructTS function using the AirPassengers data
and got a ridiculous result. Here's what I ended up with:
http://24.210.155.111/PredictWhat!.pdf
Who wrote this? Am I seriously supposed to think this function would
accurately predict a time series?
-AnalogKid
Hi all,
I followed the example in
http://www.statmethods.net/advstats/cluster.html
and apply it to one of my own dataset,
I got this tiny problem with the boreders,
http://r.789695.n4.nabble.com/file/n3340238/temp.png
The red rectangle are 'outside' the plot,
so I want to know how do I
I try to install Rmpi as root with install.packages(Rmpi).
It fails with:
...
checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to accept ISO
C89... none needed
I am here /usr and it is OpenMPI
Trying to find mpi.h ...
Found in /usr/include
Trying to find libmpi.so or libmpich.a ...
Found
Hi Lattice Users
I have been working to fix this problem, still I am not able to solve fully.
I could label those names that have pvalue less than 0.01 but still the
label appears in all compoent plots eventhough those who do have the pvalue
! How can I implement it successuflly to grouped data
Inline below
On Mon, Mar 7, 2011 at 8:08 PM, array chip arrayprof...@yahoo.com wrote:
Hi, let's say I have a simple ANOVA model with 2 factors A (level A1 and A2)
and
B (level B1 and B2) and their interaction:
aov(y~A*B, data=dat)
It turns out that the interaction term is not significant
Dear All,
I am new for R and SEM. I try to fit the model with Y (ordinal outcome), X
(4 categorical data), M1-M3 (continuous), and 2 covariates (Agesex) as a
diagram.
library(polycor)
model.ly -specify.model()
1: x - m1, gam11, NA
2: x - m2, gam12, NA
3: x - m3, gam13, NA
4: age - m1, gam14, NA
1 - 100 of 111 matches
Mail list logo