Displaying 20 results from an estimated 10000 matches similar to: "subset bug?"
2010 Jul 17
1
Bug 14340 - Symbols() plots with wrongly scaled y-axis
Hello, I submitted this bug report to r-core and got a rejection
saying I should post to r-help.
This is my first time ever submitting a bug report, so forgive me if
I'm using some wrong format.
So, here's my bug report:
Component: Graphics
OS: Mac OS 10.5.8, X11 XQuartz 2.5.0
Summary:
In the symbols function of the graphics package, scaling of the y-axis is
wrong, causing symbols
2002 May 29
1
bug in xfig()?
I'm using (Linux version) xfig() within a function
and then simple matplot() and matline() plots.
Although I do not define any bg or fg default color,
sometimes all lines in the final fig file are green.
The same code works as (I) expected if I use
x11() or pdf().
This is what I'm doing:
I open 2 devs:
xfig()
dev.set(2)
layout(mat1)
xfig()
dev.set(3)
2009 Apr 27
1
problem with symbol function
Hi all,
I use the symbol functions to draw circles. But the argument lty does
not work on windows but works correctly on my macbook:
x <- -4:4
y <- -4:4
plot(x,y,type="n")
symbols(0, 0, add = TRUE, circles = 1, inches = 1, fg="black",
lty="solid")
symbols(0, 0, add = TRUE, circles = 1, inches = 2, fg="black",
lty="dashed")
The
2012 Mar 26
4
reading header in txt file and making histogram
Dear all
I am a BEGINNER and have R on my Mac. I saved my excel file as .txt file, I
have just one column with first row as the column name. My file when read by
R looks like this. After reading the table I try to make a histogram by
hist(dbh), it says object dbh not found. What am I doing wrong? thanks
dbh
1 11.53
2 16.05
3 7.36
4 16.05
5 8.66
6 12.74
7 22.93
8 7.55
9
2013 Jan 12
4
Drawing a dotted circle.
Hi,
I am trying to draw a dotted circle by using symbols command:
symbols(0, 0, circles = 1, inches = FALSE, fg = 'gray', lty=2)
But it gives me a solid line. I was just wondering whether am I making a
mistake?
Ved
[[alternative HTML version deleted]]
2006 Sep 14
1
EBAM ERROR
Dear RUsers,
I am new to R. I am learning how to use R. I am a PC user and run R on
windows. I would appreciate if some one could guide me on a few questions I
have:
1) I have 4 cel files (2 replicates for NORM and Disease resp). I have been
able to run siggenes on this dataset where I have 4 labels in the class file
groupsnhi.cl op-> (0,0,1,1) and my data has been read into datrmanhi after
2011 Mar 31
1
transparent grays?
Is there a grayscale equivalent to alpha levels in rgb?
Example: I have the following to make red transparent circles overlap
with previously plotted blue symbols.
symbols(x=sites$long,y=sites$lat,circles=log(sites$prop.nem
+1),add=T,inches=F,bg=rgb(red=1,green=0,blue=0,
alpha=0.5),fg=rgb(red=1,green=0,blue=0, alpha=0.5))
I'm having a hard time coming up with a grayscale equivalent.
2011 Apr 19
4
Simple question about symbols()
I'm new to R and i'm having some trouble with a bubble chart.
Basically I have 3 series (a,b,c), but the third one is a binnary variable
(assumes only 0 or 1 to the entire data).
How can I use these binnary information to make 2 different colours in a
bubble chart?. I.e., I'm using this code:
symbols(inv$a, inv$b, circles=radius, inches=0.35, fg="white",
bg="red",
2007 Aug 25
3
fill circles
Hi all,
I'm an R newbie,
I did this script to create a scatterplot using the "tree" matrix from
"datasets" package:
library('datasets')
with(trees,
{
plot(Height, Volume, pch=3, xlab="Height", ylab="Volume")
symbols(Height, Volume, circles=Girth/12, fg="grey", inches=FALSE,
add=FALSE)
}
)
I'd like to use the column Named
2004 Jul 01
2
y-axis of lattice panels not printing to paper
Greetings,
I am printing lattice plots from the R-interface to a printer, and although the y-axes of the left-most panels are visable on the screen, they are not present on the paper when there are multiple panels (ie, >1).
For example:
trellis.device(bg='white')
histogram(~dbh, data=diameter.df)
###print to a printer from the R-interface by clicking the print button on the
2009 Feb 17
2
creating a map
I'm trying to create a fairly basic map using R. What i want to get is the
map of the country with circles representing a count of students in each
state.
What I've done so far is as following -
map("state")
symbols(data1$count,circles=log(data1$count)*3,fg=col,bg=col,add=T,inches=F)
this gives me the map of the country, but one that's not populated by my
counts.
Does
2003 Jul 14
2
problem with coding for 'optim' in R
Hi, there
I am a graduate student new to coding in S who is hitting a bit of a wall
at present using an "optim" function. I am running into some troubles, and
was hoping someone might be able to recognize where I am going wrong.
As background: I have constructed a loop that carries out a 365-day
calculation for a mass-balance model. Basically, the model depends on 2
variables (p,
2007 Jan 17
1
How to annotate a graph with non-transparent math labels?
I do not know the precise language to describe the situation. But here
it is what I want to do.
I need to annotate a graph that contains two or more curves with labels
that contain math symbols. The label must go on top of the curve.
The problem is that when I annotate the plot, I can see the curve
behind the label. Here it is an example using a simple straight line.
x<-c(0,1)
2012 Nov 29
3
Label axis with strings instead of numbers
I have created a bubble plot in R using the following formula:
symbols(Data$Day.Number,Data$Team,circles=Data$Total.amount, inches=0.5,
fg="white",bg="red",xlab="Day Number",ylab="Team")
The data set is called Data, and I have the columns Day.Number, Team and
Total.amount.
The data is plotting fine, but where my y axis should have the names of each
team,
2011 Jul 22
1
3d plotting with cloud and wireframe
Hi,
I'm trying to plot an equation in two variables to get a feel
for sensitivity to its parameters. I've run expand.grid to get made-up
vectors of the combinations of the two independent variables, and am trying
to plot the output of the dependent, M, against both the dependent in a 3d
space.
t <- 0:100
DBH <- 10:100
TxDBH<-expand.grid(t,DBH)
time<-TxDBH[,1]
2013 Apr 06
1
Plotting a curve for a Holling Type III Functional Response
Hey,
So I have a scatter plot and I am trying to plot a curve to fit the data
based on a Holling Type III functional response. My function is this:
nll2<-function(a,b) {
conefun<-(a*DBH^2)/(b^2+DBH^2)
nlls2<-dnbinom(x=cones ,size=DBH, mu=conefun,log=TRUE)
-sum(nlls)
}
and my plot is this:
plot (DBH,cones)
DBH is on the x-axis and cones is on the y-axis. How do I get the curve
2007 Dec 12
1
How to plot the grid figure using R?
Now I have the forest plot data with x, y locations, and I measured the DBH for every indivicuals.
The data looks like that:
x=runif(100,0,100)
y=runif(100,0,100)
dbh=runif(100,1,100)
rdata=data.frame(x,y,dbh)
> rdata[1:5,]
x y dbh
1 99.5354145 1.412844 34.10112
2 0.8259361 87.737036 39.12914
3 6.5678613 65.699032 22.55990
4 67.2987881 72.053877 45.83978
5 2.2491372
2003 Nov 16
2
prevent conversion to factors in aggregate?
I've been trying to figure out how to prevent a column that is the result of
an aggregate function call so that I can use it in further calculations. For
example, I would like to aggregate the expf for the data.frame by sp
(character) and dbh (double d=rounded to integer) using the command:
> st2 <- aggregate( ntrs$expf, by=list(sp=ntrs$sp,dbh=ntrs$dbh), sum )
> st2$expf <- st2$x
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
Dear R-help,
Here's a simple example of nonlinear curve fitting where nls seems to get
the answer wrong on a very simple exponential fit (my R version 2.7.2).
Look at this code below for a very basic curve fit using nls to fit to (a)
a logarithmic and (b) an exponential curve. I did the fits using
self-start functions and I compared the results with a more simple fit
using a straight lm()
2012 Oct 03
1
Difficulties in trying to do a mixed effects model using the lmer function
Dear people of the help list
I am drying to analyze my data using the 'lmer' function and I keep having problems.
This is the model:
> fm1<-lmer(dbh~spec+scheme+(1|Plot),data=d, REML=FALSE).
I analyse tree size (dbh) of 3 different species (spec) and 3 planting schemes (scheme). I have 5 plots, which I hope to model as a random factor. (However, the subsequent output is based on