Displaying 20 results from an estimated 10000 matches similar to: "Bug in xy.coords() or documentation error?"
2001 May 04
1
scoping error in xy.coords (PR#932)
Hola!
> rm(list=ls(all=TRUE))
> x <- 1:20
> y <- 1+x+rnorm(x)
> xy.coords(y ~ x,NULL)
... expected output, correct, but when called from inside lowess:
> lowess(y ~ x)
Error in xy.coords(x, y) : x and y lengths differ
> debug(xy.coords)
> lowess(y ~ x)
debugging in: xy.coords(x, y)
... long listing deleted
if (is.language(x)) {
if (inherits(x,
2005 Dec 31
1
xy.coords
In ?xy.coords it says:
If 'y' is missing and 'x' is a
formula: of the form 'yvar ~ xvar'. 'xvar' and 'yvar' are used as
x and y variables.
list: containing components 'x' and 'y', these are used to define
plotting coordinates.
time series: the x values are taken to be 'time(x)' and the y
2012 Apr 01
1
Error in xy.coords(x, NULL, log = log) : (list) object cannot be coerced to type 'double'
Hi there,
When I run the code below I get the error
Error in xy.coords(x, NULL, log = log) :(list) object cannot be coerced to
type 'double'
Any tips how I can resolve this?
>
> library("waveslim")
>
> vols=read.csv(file="C:/Users/ocuk/My Documents/Abs Vol.csv", header=TRUE,
> sep=",")
> x<-c(vols[,1])
> #x
> #data(ibm)
>
2008 Oct 23
3
xy.coords in text
Hello,
I want to add text annotation about correlation on "pairs" plots. I
found that I could pass a function to the "panel" argument of pairs :
panel.annot <- function(x, y, ...) {
points(x, y, ...)
c <- cor.test(x, y)
legend("topleft", legend=substitute(rho == r, list(r=sprintf("%.2f",
c$estimate))), bty="n")
}
And then :
2006 Jun 04
4
xy.coords(MATRIX) bug in code or documentation (PR#8937)
Hi, people.
xy.coords() does not behave like its documentation says, when given some
matrices. ?xy.coords says:
If 'y' is 'NULL' and 'x' is a [...] formula [...] list [...]
time series [...] matrix with two columns [...]
In any other case, the 'x' argument is coerced to a vector and
returned as *y* component [...]
Now, consider this short
2007 Nov 20
1
xy.coords and log10
Is there a way to teach xy.coords, when given log="xy", or just "x"
or "y" separately, to do a decimal log10 instead of the natural log?
Cheers,
Alexy
2012 Jun 19
1
help with xy.coords(x,y)
i am working on the project to analyze hedge fund performance, i would
appreciate that if you guys could spare some time helping me out with the R
code. Thanks.
The senario is:
i applied BOXPLOT() to plot the performance of all hedge funds with 7
strategies.
And right now in this boxplot I need to plot the points of 30 individual
hedge funds from my portfolio. And I applied POINTS() and
2008 Jun 21
2
clicking on plot and recording XY coords
Dear all,
I need to run a interactive procedure where the user
will need click on the screen (over a XY plot)
and I need to record the XY coordinate which the
user clicked. Roughly I wrote a short code below.
You see that I suppose that the user will choose
four coordinates inside the region of intersection
between three segmentes. On each click, I would like to
record the position clicked in a
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
2005 Nov 15
0
plots in a matrix
Hi,
consider the following example:
I have a matrix like this:
spp.mds$points
[,1] [,2]
CLAP0 1.79703164 -11.66716182
CLAP30 3.87034797 -7.48168377
YBI0000 10.27538316 -3.32226184
YBI0100 0.58463806 -1.25748701
hir10000 5.82907036 -4.09695960
hir10016 -2.22113472 -4.86563557
gyn30000 5.14643671 -3.58706541
gyn30032 2.99552434 -6.21815132
...
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
2012 Feb 17
0
error with read.zoo, "Error in xy.coords(x, y) : (list) object cannot be coerced to type 'double'
I'm now trying to read.zoo in a rather long txt file with two columns:
date/time and value in kW e.g. 432.2189
The read.zoo function finally ran without errors but not sure it is correct.
I took the header off, and put in commas and added a " at the beginning and
" at the end.
z=read.zoo("Kevin-0-comma-ITPower.txt","%m/%d/%Y
2012 Jun 04
1
Plotting with Rgraphviz
Hi All,
After a lengthy battle just to get the package installed, I am not able to
actually use Rgraphviz to generate any plots. I tried just using the sample
code in the documentation
(http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/rgraphviz/)
and I get the following:
*> > library(Rgraphviz)
> test.matrix<-matrix(rep(c(0,1,0,0), 9), ncol=6, nrow=6)
>
2012 Oct 30
0
Error em plot.xy(xy.coords(x, y), type = type, ...) : objeto 'membros' não encontrado
Hi,
I'm trying to plot a map with the location of the stations that I am using
require(MASS)require(maps)
mapaBrasil <- read.table("BASE_BR.txt",sep="")
latlonRS <- read.csv2("coordenadas.txt",h=F,sep="")
png(filename="mapa_grupos.png",width=600,height=800)
# criating a map for RSmap(xlim=c(-80,-35),ylim=c(-45,10),
2011 Feb 21
2
(no subject)
What is plot.new? and how can i get it to work so i can load other data?
> library(splancs)
> area = 6*4
> lambda = 1.5
> N = rpois(1,lambda*area)
> u = runif(N,-2,4)
> v = runif(N,0,4)
> plot(u,v,asp=1)
> h = chull(u,v)
> h = c(h,h[1])
> plot(u[h],v[h],"1",asp=1)
Error in plot.xy(xy, type, ...) : invalid plot type '1'
>
2005 Aug 16
4
as.character and a formula
Dear list,
given this formula:
> fmla <- formula(y1 ~ spp1 + spp2 + spp3 + spp5)
> fmla[[3]]
spp1 + spp2 + spp3 + spp5
is this the intended behaviour of as.character:
> as.character(fmla[[3]])
[1] "+" "spp1 + spp2 + spp3" "spp5"
? Where does the extra "+" come from?
> as.character(fmla)
[1] "~"
2005 Aug 03
1
deparse(substitute(x)) and S3 methods
Dear List,
I have the following function:
coca <- function(x, ...)
{
if(is.null(class(x))) class(x) <- data.class(x)
UseMethod("coca", x)
}
and a default method
coca.default <- function(x, y, method = c("predictive", "symmetric"),
reg.method = c("simpls", "eigen"), weights =
NULL,
2005 Aug 02
1
problem using evaluating a formula
##data
y1 <- matrix(c(3,1,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1),
nrow = 5, byrow = TRUE)
y2 <- matrix(c
(3,0,10,3,3,0,0,1,1,0,0,0,0,0,1,0,1,0,0,2,1,0,1,1,0,2,1,1,4,1),
nrow = 5, byrow = TRUE)
y1 <- as.data.frame(y1)
y2 <- as.data.frame(y2)
rownames(y1) <- rownames(y2) <- paste("site", 1:5, sep = "")
colnames(y1) <-
2005 Apr 29
2
Automating plot labelling in custom function in lapply() ?
Dear List,
Consider the following example:
dat <- data.frame(var1 = rnorm(100), var2 = rnorm(100),
var3 = rnorm(100), var4 = rnorm(100))
oldpar <- par(mfrow = c(2,2), no.readonly = TRUE)
invisible(lapply(dat,
function(x) {
plot(density(x),
main = deparse(substitute(x))) }
)
)
2005 Apr 06
1
axis.Date problem, bug(?)
Dear List,
I have the following problem with axis.Date, here is an artificial example:
dates <- scan(what = "character")
"25/03/2000" "26/03/2000" "27/03/2000" "28/03/2000" "29/03/2000"
"30/03/2000" "31/03/2000" "01/04/2000" "02/04/2000" "03/04/2000"
"04/04/2000"