Hello,
I want to build a function to call up a column of a data.frame by the names of
the columns. I have column names that are sequentially named (col1, col2,
etc.). How do I change a character expression into something that will be
understood as a data.frame column. For example:
example<
Hello,
I am trying to make a xyplot plot with points that are different symbols. I
want to call the symbol type (pch) from a column in my dataframe. Here is a
simplified example. In my real example I also have groups, which I have not
included here. This example doesn't change the symbols or
01)
b.s1~dnorm(0, 0.01)
b.s2~dnorm(0, 0.01)
b.s3~dnorm(0, 0.01)
b.dcon~dnorm(0, 0.01)
tau.ind~dunif(0,100)
sigma.ind<-1/sqrt(tau.ind)
tau.plt ~ dunif(0,100)
sigma.plt<-1/sqrt(tau.plt)
tau.sp ~ dunif(0,100)
sigma.sp<-1/sqrt(tau.sp)
tau ~ dunif(0,100)
sigm
Patrick,
Thanks for the tip below. It took me awhile to get to it, but your solution
worked great. In case it is useful for other people, below is a very simple
example where I create two plots side by side with the legend centered on top.
John
## Example plot for R server
par(mar=c
Hello,
I have used layout() to produce to 2 plots on a page, leaving a plotting space
above them. I would like "Legend", which will actually be a real legend, to be
centered above the two graphs. Right now I am only able to position "Legend"
above the second graph that I create... obviously I
Yes, it is wrapped around the code in mlefun, but could be changed...
Thanks again, John.
David Winsemius wrote:
On May 30, 2009, at 9:36 AM, Uwe Ligges wrote:
John Poulsen wrote:
Hello,
I am using maximum likelihood to find the best parameters for a
model. This involves sometimes
Hello,
I am using maximum likelihood to find the best parameters for a model.
This involves sometimes tweaking the starting values to find a solution
that converges.
I would like to automate the process so that when the optimizer runs
into an error it tweaks one of the parameters slightly,
Hello,
Could someone please tell me how to find the estimate of inertia for the
second axis of an RLQ analysis using ade4? Using the example from the
ade4 package, I *suspect* that the inertia for the 2nd axis of the R
table would be 4.139332 (see below results summary from rlq1). However,
t
Hello,
Could someone please tell me how to find the estimate of inertia for the
second axis of an RLQ analysis using ade4? Using the example from the
ade4 package, I *suspect* that the inertia for the 2nd axis of the R
table would be 4.139332 (see below results summary from rlq1). However,
Hello,
I am trying to graph a violin plot like the example in
panel.violin(lattice) with the singer data - see below
Does anyone know how to change the color of the boxplot on the graph
from blue to green? I tried a number of changes, but to no avail.
Thanks for your help,
John
bwplot(v
Hello R-Users,
I am plotting several histograms to demonstrate zero-inflated data using
lattice. Because there are so many zeros, it is difficult to see the
observations of non-zeros on the graph (i.e. the y-axis scale is too
large). I would like to break the y-scale so that the non-zeros at
Hello,
I am having a problem specifying the correlation structure in lme which
leads to the error: Error in getCovariate.corSpatial(object, data =
data) : Cannot have zero distances in "corSpatial". I have specified a
grouping variable which is the only fix I could find by searching this
err
6.1498)
> STY<-c(2.0387, 2.0214, 1.9877, 1.9846)
> STX
[1] 16.0962 16.1227 16.0921 16.1498
> STY
[1] 2.0387 2.0214 1.9877 1.9846
Did you perhaps redefine c()?
Or:
options()$digits
If not, then what do these say:
str(STX)
str(STY)
On Mar 6, 2009, at 1:47 PM, John Poulsen wrote:
I kn
Hello,
I know I am forgetting to do something silly. I typed coordinates in
vectors (as below) but when I call them in R they come out as integers,
and I want them to be real numbers. I have tried using as.numeric,
as.real, etc... but they are still read by R as integers.
STX<-c(16.0962, 1
Hello,
I know I am forgetting to do something silly. I typed coordinates in
vectors (as below) but when I call them in R they come out as integers,
and I want them to be real numbers. I have tried using as.numeric,
as.real, etc... but they are still read by R as integers.
STX<-c(16.0962, 16.12
Hello,
I am looking for some general advice on which graphics package to use to
make a figure demonstrating my experimental design.
I want to design a circle with 7 sectors inside. Then I will want to
shade the sectors depending on densities of observations in the
sectors. I will also want
Hello,
I am trying to run a logistic regression with random effects on
proportional data in glmmBUGS. I am a newcomer to this package, and
wondered if anyone could help me specify the model correctly.
I am trying to specify the response variable, /yseed/, as # of successes
out of total obse
bscripts, ...) {
panel.xYplot(x, y, subscripts = subscripts, ...)
panel.curve(a*(x+c)/(1+(a*(x+c)/b)), from=0, type="l", lwd=1,
col="black")
}
xYplot(Cbind(y1, lo, hi)~jitter(sds, amount=1),
method="bars",ylim=c(0,max(hi)+1),
ylab="Y", xlab="X", panel
Hello,
I am trying to plot a curve over points plotted with se's in xYplot (see
example below). I can get Figure 1 below to plot the data with error.
However, I keep getting a the error message
"Error using packet 1 object "y" not found"
Can anyone see what I am doing wrong?
Thanks!
John
Hello,
I have a dataset that has counts, but I need to expand the dataset so
that each of the counts has its own line in the dataset (row) and is
given and id. It looks something like:
SiteTypeCnt
1 "A" 3
1 "B" 0
2 "C" 2
I want the dataset to look like:
Site
,...)
ltext(x=list(1,2,3,4),
y=list(13,14,15,16),
labels=list("A","B","C","D"), pos=2)})
---
David Winsemius, MD
Heritage Labs
comes with the usual warrantee... if it breaks you get to keep the parts
On Nov 10, 2008, at 11:26
Yes, using panel.xYplot is the best thing to do. I couldn't get it to
work, which probably means I was specifying it incorrectly. I would be
very happy if someone had an example of how to do it.
Thanks again -- John
Frank E Harrell Jr wrote:
John Poulsen wrote:
Hello R-Users,
I am t
Hello R-Users,
I am trying to label points on an xYplot. I can label the points, but
then I lose the error bars. I suspect that I should be using
panel.xYplot rather than panel.xyplot, but that didn't work either...
Can anybody help me out? Example code is below. First xYplot has error
b
Hello,
I have made a plot using xYplot, but am having trouble with some final
touching up details. I would appreciate your help...
The below code results in a plot of 4 species, with the species being
the same color. So, the first three points are blue, the second three
are purple, etc...
Hello,
Does anyone know in general what causes the following error:
Error: C stack usage is too close to the limit
I rewrote some R code that worked fine to be more streamlined, and now I
get this error. I don't really know where to start to fix the problem.
Thanks,
John
__
Hello,
I am using xyplot and am happy with my graph, *except* that I cannot get
the symbols to be filled. I tried using
bg=c("red3","red","black","lightgrey")) in both the key and the xyplot
function, that that was obviously not the answer. I would like the
sybols to be filled with the same
Hello R-users,
I have code that gives me the important variables from an analysis. I
need to input these variables into a different analysis. To do this, I
need to modify them slightly... 1) remove all numbers at the end of the
variables, 2) remove all periods.
I tried to do it with the aw
Hello R-Users,
I have recently run into several problems using vgam() in the VGAM
package. I am hoping someone might have some solutions...
Briefly, I have been trying to fit GAM models for zero-altered negative
binomial models.
1. When fitting smoothed parameters (e.g. s(X, df=2)) changin
Hello,
I am just starting to use the vgam() function in VGAM to try to fit
zero-altered negative binomial models. So far I have gotten some a test
dataset to run, but can't seem to extract the log-likelihood. That is,
I am using summary(fit)@df.residual to extract the residual df's, but
can
Hello,
Sorry, I have used xYplot before and feel like this should be a very
easy problem to solve. But I keep hitting a snag.
I want the below code to plot three panels with different point
estimates and their standard errors for each of five days. I keep
getting a warning message (see bel
Hello,
I am using glmer() from lmer(lme4) to run generalized linear mixed
models. However, I am having a problem extracting the standard errors
for the fixed effects.
I have used:
summary(model)$coef
fixed.effects(model)
coef(model)
to get out the parameter estimates, but do not seem able
Hello,
The simple example below plots three species by year and site. However,
I would like the points to occur in groups horizontally, rather than
on top of each other.
I thought jitter might work, but haven't been successful in getting it
to do what I want.
Any ideas? Thanks in advanc
Hello,
I am trying to create a dotplot, and have run into a couple of snags
with the finishing details. The below code creates the dotplot, but I
cannot figure out how to: 1) change the color of the CI bars to black,
not blue, 2) delete the horizontal dotplot lines, and 3) arrange the
parame
Deepayan,
Thanks for your help, works great!
Cheers -- John
Deepayan Sarkar wrote:
On Tue, Aug 5, 2008 at 11:15 AM, John Poulsen <[EMAIL PROTECTED]> wrote:
Hello,
I apologize in advance as this example seems really elementary. Below I
have created a simple scatterplot with lines. I
Hello,
I apologize in advance as this example seems really elementary. Below I
have created a simple scatterplot with lines. I would like to label
each line with the name of the village, instead of using a legend. Can
someone please let me know how to do it.
Thanks in advance -- John
Po
Hello,
I have been using mgcv to run GAM hurdle models, analyzing
presence/absence data with GAM logistic regressions, and then analyzing
the data conditional on presence (e.g. without samples with no zeros)
with GAMs with a negative binomial distribution.
It occurs to me that using the nega
Hello Deepayan,
Please ignore my last e-mail and question. The information was
easily found in ?panel.segments.
Thanks,
John
On 5/5/08, John Poulsen <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I am using xYplot to plot lines with confidence bands (see
test examp
Hello Deepayan,
Thanks for the below solution to my graphing problem - just what I
was looking for.
One quick additional question, where do I change graphical
settings (lwd, pch, etc...) for the added points?
Thanks,
John
On 5/5/08, John Poulsen <[EMAIL PROTECTED]> wrote:
>
&
ot;, method="filled bands", col.fill="light
grey",
scales=list(y=list(relation="free"),x=list(alternating=c(1,1,1))),
ylim=list(c(0,1200),c(0,1)),
strip=strip.custom(factor.levels=c(expression("Anls
km"^2),expression("Plants km"^2)
Hello Christoph,
Oops, I see that the factor.levels function is in the help menu for
strip.default. I had tried it, but not specified it correctly.
Thanks again for you help,
John
Christoph Meyer wrote:
> Hi John,
>
> a solution to your problem would be using strip.custom like this:
>
> ...
Hello again,
I have been trying to add an expression to the strips in xYplot to no
avail. For example, in the code below, the text in the strips for each
panel is "Anls" and "Plts". However, I would like it to add "Anls km^2"
and "Plants km^2" with the exponents raised.
I tried resetting the
Hello,
I have been trying to use xYplot in Hmisc to graph plots, allowing each
panel to have a y-axis dependent on the data in the panel.
Following the advice from the R-Help list, message: [R] separate
y-limits in xYplot panels on Wed, 30 May 2007 08:12:06 -0700 (PDT), I
used scales=list(y=list(
Hello,
I have been trying to use xYplot in Hmisc to graph plots, allowing each
panel to have a y-axis dependent on the data in the panel.
Following the advice from the R-Help list, message: [R] separate
y-limits in xYplot panels on Wed, 30 May 2007 08:12:06 -0700 (PDT), I
used scales=list(y=li
43 matches
Mail list logo