Displaying 20 results from an estimated 6000 matches similar to: "plot(x) in 2.7.0 (with y=NULL) proposed code correction"
2008 Mar 09
2
[patch] add=TRUE in plot.default()
Hi all,
As long as I've used R, add=TRUE hasn't worked in contexts like this:
f <- function(x) x^2
X <- seq(0, 1, by=1/4)
plot(f, col="blue")
plot(X, f(X), col="red", type="l", add=TRUE)
I attached a fix for version 2.6.2.
Cheers,
Andrew
-------------- next part --------------
diff --git a/src/library/graphics/R/plot.R
2008 Sep 04
0
patch for graphics/R/plot.R that fixes incorrect tick positions
As I haven't got any replies to my earlier posts about incorrect tick
positions in plot and matplot, here is the simplest patch to correct
this issue (it fixes both plot with xlim/ylim and matplot). The plot.R
was unchanged between 2.7 and current R-devel. It would be great if the
patch could be (tested and) applied to both the current patched and the
current devel versions.
70,71c70,71
<
2009 Aug 31
0
xy.coords assumes lists will have x and y components, but doesn't check (PR#13936)
Full_Name: Richard Calaway
Version: 2.9.2
OS: Mac OS X 10.5.3
Submission from: (NULL) (65.47.30.18)
Here's my sessionInfo():
> sessionInfo()
R version 2.9.2 (2009-08-24)
i386-apple-darwin8.11.1
locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Currently, if you pass a list
2008 Sep 03
1
ugly plots with xlim/ylim exceeding data range (changed since R2.6.1)
The behaviour of the plot function when used with xlim/ylim and the
matplot function as in the following simple example changed between
R2.6.1 and 2.7.0+ producing ugly plots in the new versions. In case of
plot it looks like the pretty function is called with wrong arguments
(i.e. range of supplied data rather than values of xlim and ylim):
m = matrix(c(-0.033, 0.009, 0.064, 0.050, 0.097,
2000 Feb 02
0
Bugs and comments. (PR#410)
Hi,
Here are a few errors I found as well as a few comments.
1) In the man page of par:
lty: The line type. Line types can either be specified
as an integer (0=blank, 1=solid, 2=dashed, 3=dot-
ted, 4=dotdash, 5=longdash, 6=twodash) or as one
of the character strings `"blank"', `"solid"',
2004 May 06
1
plot(hist.default(1:10,plot=F)) error.
Hi!
How to find out which plot function is used when i call
plot(hist.default(1:10,plot=F)) and all works fine ?
The reason why I would like to know it is that after loading some self written R functions
> plot(hist.default(1:10,plot=F))
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
> traceback()
5: stop("x and y lengths differ")
4: xy.coords(x, y,
2008 Sep 04
1
Building a time series.
I have a need to build a time series and there are a couple of aspects about the time series object that are confusing me. First it seems that ts.union is not doing what I would expect. For example:
x0 <- rep(0,10)
x1 <- rep(1,10)
xt0 <- ts(x0, frequency=10)
xt1 <- ts(x1, frequency=10)
st2 <- ts.union(xt0, xt1)
> xt2
Time Series:
Start = c(1, 1)
End = c(1, 10)
Frequency = 10
2005 Oct 03
1
Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ
I am currently trying to use R to construct a regression model to
explain output based on temperature. I have combined my output and temp
data into a notepad file. there is no problem with loading the data into
R.
> data.df
output temp
1 850 17
2 849 17
3 905 17
4 925 17
5 1043 19
6 1104 20
7 1097 18
8 979 19
9 926 18
10 1133 18
~~
~~
240 1124
2006 Mar 16
0
Having trouble with plot.survfit and fun="cloglog"
I'm having trouble getting fun="cloglog" to work with plot on
a survfit object. Here are the data I used for the commands
that follow.
days status
2 0
2 0
5 1
9 0
14 1
16 0
16 0
17 0
29 1
30 0
37 1
37 0
39 1
44 0
44 0
58 0
60 1
67 1
68 1
82 1
82 1
86 0
86 0
89 1
93 0
97 1
100 0
100 0
100 0
> library(survival)
Loading required package: splines
> eg1.km <-
2011 Oct 06
0
TCGA expression data: plotting ....
Hi,
I am new to R.
I am trying to figure out how to graph expression data from the TCGA
database.
If I understand correctly the expression data I have downloaded is from a
microarray using the AgilentG4502A.
I've had trouble reading into R in the level I, level II, and the gene
expression analysis data using
>dat<-read.table("C:\\file.txt", header=T, row.names=1)
for
2004 Jan 04
0
termplot; failure to subset non-dataframe carriers (PR#6327)
termplot() does not carry subsetting over to carriers that
are in the environment but not in the data frame. This
generates a "subscript out of bounds" error.
> data(ToothGrowth)
> logdose <- log(ToothGrowth$dose)
> tooth.lm <- lm(len ~ logdose, data=ToothGrowth)
> termplot(tooth.lm) ## Works fine
> toothVC2.lm <- lm(len ~ poly(dose,2),
2008 Apr 22
1
graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC
Following my previous post on S3 method despatch, I put debug messages
in the code of Axis, Axis.default and plot.default in graphics/R/axis.R
and graphics/R/plot.R to print the class of x, at and y on plot. After
recompiling R, what I see is that x *lost* its class attribute (at least
for classes not known to 'graphics') in Axis, called directly from
plot.default and this could be the
2009 Aug 07
3
How do I plot a line followed by two forecast points?
Good day all,
I'm trying to plot a continuous line plot, which is followed by two
forecast points eg. one forecast point is 12 months out, and another
24 months out from the last date of the line plot.
In my attempts so far, the second plot (the forecast points) is scaled
against a new axis scale, thus the two plots are not directly
comparable (I need the forecast points to be scaled
2004 Jul 13
2
help with as.function
HI, sorry but i don't understand how to make a function with as.function()
formula<-"2+3*x"
formu<-as.symbol(formula)
> formu
2+3*x
formul<-as.function(alist(x=,formu))
curve(formul,1,5,col="blue")
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
> typeof(formul)
[1] "closure"
and not plot the curve function, Why?
2010 Jan 09
2
Plotting numeric values against non numeric items
Hi i want do a line graph.
My y axis contains numeric values. My x axis contains non numeric
statements.
This is what i want the graph to look like.
When i try to plot this graph on R it comes up with the following error
message:
"Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by
2009 Jun 11
2
Tables without names
A table without names displays like a vector:
> unname(table(2:3))
[1] 1 1 1
and preserves the table class (as with unname in general):
> dput(unname(table(2:3)))
structure(c(1L, 1L), .Dim = 2L, class = "table")
Does that make sense? R is not consistent in its treatment of such unname'd
tables:
In plot, they are considered erroneous input:
>
2008 Dec 28
1
cox regression warning/error messages
Hello,
I am hoping for some advice regarding warning/error messages I
received when running a Cox regression
# message 1 - obtained while creating a plot of residuals
> plot (NV.zph, main = "groupNUSM - UNFIT", var= 'groupNUSM')
Warning messages:
1: In approx(xx, xtime, seq(min(xx), max(xx), length.out = 17)[2 * :
collapsing to unique 'x' values
2: In
2008 Oct 20
2
error message when plotting survival curves
I am trying to plot survival curves using the following code as an example:
>rs1799964.coxph<-(coxph(Surv(sassurvmonths,status)~age+stage+rs1799964_TNFA,method="efron"))
>plot(rs1799964.coxph,lyt=c(1,3),xlab="Survival in Months",ylab="Proportion
Surviving")
I am gettingthe following error message:
>Error in xy.coords(x, y, xlabel, ylabel, log) :
2010 Feb 27
1
Bug in ecdf? Or what am I missing?
x <- c(6.6493705109108, 7.1348436721241, 8.76886994525624,
6.12907548096037, 6.88379118678109, 7.17841879427688,
7.90737237492867, 7.1207373264833, 7.82949407630692,
6.90411547316105)
plot(ecdf(x), log="x")
It does the plot fine, but complains:
Warning message:
In xy.coords(x, y, xlabel, ylabel, log) :
1 x value <= 0 omitted from logarithmic
2008 Mar 23
2
(no subject)
Is there any way to use more than one color or shape in the same plot. I would like to make the points different colors for various levels of a variable. I have tried a simple 'if' statement in the plot command, but I get an error message. Here is what I have tried and the error message I get: > plot(test, if(test[,1]<8) col="steelblue2" else col="wheat2")Error