Hello, fellow R enthusiasts.
Ok, I've been racking my brain about this small issue, and between
searching the help archives and reading through the plot-related
documentation, I can't figure out how to achieve my desired endpoint
without some ugly, brute force coding.
What I would like to do is m
I have been looking around for packages that will do this but I am not
stumbling on the right one. I would like to make a 3d plot (hopefully
an interactive graphic (rgl maybe)) that is simply four 2d graphs
stacked next to each other traveling down river. site is the x-axis,
bas is the y-axis, an
On 17-Oct-08 17:59:55, Feldman, Ruben wrote:
> Hi,
> My data has time series for different variables and I want to predict
> "ctw" with the value of each other variable at that point in the
> series.
> I have run a logistic regression:
> logreg <- glm(ctw ~ age + OFICO + ... + CCombLTV, data=mydat
why not look at the zoo package it can deal with time irregular time
series. I have used it and I have been very happy.
On Wed, Oct 29, 2008 at 5:52 PM, Levy,Ilan [Ontario] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have several time series that I need to plot on the same plot.
> There are 3 problems
Hi,
i try to plot my graph into different device using x11(),
but when i do this comes up:
> x11(print(plot(A5e$ECAB,A5e$EXPEND,type='p',main='Per capita expenditure
> against economic
+ ability index without
outliners',xlab='ECAB',ylab='EXPEND',xlim=c(0,150),ylim=c(150,400),
+ col='red',col.axi
Yes you can automate it. The exact way would depend on how your data
is structured and what you want the graphs to look like. It is hard
to say without an example of the data and at least the command that
your are using to create a single plot.
On Thu, Nov 13, 2008 at 2:16 PM, <[EMAIL PROTECTED
11/13/2008 04:04 cc
PM EST"R help" <[EMAIL PROTECTED]>
Subject
on 11/13/2008 03:30 PM [EMAIL PROTECTED] wrote:
> Hi again,
>
> Yes you are right I should have included an example of the file
>
> It looks like this after reading in the data and using tapply I arrive at
> the following
>
>> Alt5rimc_mean
> A B C D
gt;
> [EMAIL PROTECTED]
> Office (305) 224 - 4282
> Fax (305) 224 - 4147
>
>
>
> "jim holtman"
> <[EMAIL PROTECTED]
> om> To
>
Hi,
I am using R 2.8.0 on Kubuntu 8.04.
My problem is that is can't get my postscript
output to work the same way as on screen output.
If I copy the device after plotting dev.print()
font sizes don't match and text sticks out of the figure margins.
When I use postscript() to create a new plotting
I am using density() to plot a density curves. However, one of my variables
is truncated at zero, but has most of its density around zero. I would like
to know how to plot this with the density function.
The problem is that if I do this the regular way density(), values near zero
automatically ge
My data is the following:
Time
Resistance
Temperature
5
2000
4
10
2200
8
15
2500
14
20
2900
20
25
3000
29
30
3100
38
35
3500
46
40
3800
47
45
3900
50
50
4000
51
I would like to create a scatter plot with Time on the x axis, Resistance on
the y axis
I am using the following construct and so far I am OK with it...
b<-barplot(data, ylim=c(0, max(data)+max(data)/20))
text(b,data+max(data)/30, data)
Thanks, for the comments.
-B
|-Original Message-
|From: hadley wickham [mailto:[EMAIL PROTECTED]
|Sent: Friday, October 26, 2007 11:47 AM
have a look at ?curve(), e.g.,
curve((1 + x^2) / pi, -15, 15)
I hope it helps.
Best,
Dimitris
Beetle wrote:
Hi Guys,
I'm a numbie to R.
I searched the forum for plotting pdf's of functions but couldn't find one
that explained my question.
I have been asked to plot the pdf fX(x) = 1/pi(1+x
but this is not a probability density function, since lim(abs(x)->
infty)=infty. But there is just a pair of brackets missing in Beetles post.
btw. homework?
Dimitris Rizopoulos schrieb:
have a look at ?curve(), e.g.,
curve((1 + x^2) / pi, -15, 15)
I hope it helps.
Best,
Dimitris
Beetle w
don't use the type argument. You are telling plot to plot points.
also please use dput() to make example code that can be cut and pasted
out of the email right into R, so that your problem is reproducible.
Stephen
On Wed, Apr 1, 2009 at 2:52 PM, Thomas Adams wrote:
> I have data that I read in
Hi,
Using R 2.8.0 on Windows,
I have a mathematical model written in C++, the model writes to file (.txt) a
set of numbers I want to plot in R.
The model iterates over about 10,000 runs, each time overwriting the old with
the new set of results to the output file.
I want to be able to continu
Hello Everyone-
I'm in the process of slowly learning R and am having a little bit of
trouble plotting an extra line onto a scatterplot. I'm sure the answer
is quite simple but I am stumped.
The code I am using is:
headways <- read.table("headways.csv", header=TRUE, sep=",",
na.strings="", d
I have: f <- ols( y1 ~ (rcs(x1,3) + rcs(x2,3) + rcs(x1,3) %ia% rcs(x2,3) ) )
Then I do: plot(f)
This plots y1 against x2 for a given value of x1.
Is there a way to make it *also* plot y1 against x1 for a given value of x2?
If not, I guess I can do coplot(y1 ~ x1 | x2).
Thanks in advance,
sp
Of Steve Murray
> Sent: Tuesday, May 05, 2009 9:52 AM
> To: r-help@r-project.org
> Subject: [R] Plotting pairs of bars
>
>
> Dear all,
>
> I have a matrix called combine86 which looks as follows:
>
> > combine86
> Sim Mean Obs Mean Sim Su
Thanks for the reply - the 'beside' argument certainly looks useful, although
I'm still not getting the output I'd hoped for.
By doing: barplot(combine86[,1:2], beside = TRUE, las = 1,
xlab=rownames(combine86))
...I get all the bars for the 'Sim Mean' column plotted on the left side of the
gra
Steve Murray wrote:
Thanks for the reply - the 'beside' argument certainly looks useful, although
I'm still not getting the output I'd hoped for.
By doing: barplot(combine86[,1:2], beside = TRUE, las = 1,
xlab=rownames(combine86))
...I get all the bars for the 'Sim Mean' column plotted on the
Jim and all,
Thanks for the suggestion, however, I get the following error:
> barplot(t(combine86[,1:2], beside = TRUE, las = 1))
Error in t(combine86[, 1:2], beside = TRUE, las = 1) :
unused argument(s) (beside = TRUE, las = 1)
I've looked up ?t and cannot see any extra arguments that I sho
Steve Murray-3 wrote:
>
>
> Jim and all,
>
> Thanks for the suggestion, however, I get the following error:
>
>> barplot(t(combine86[,1:2], beside = TRUE, las = 1))
> Error in t(combine86[, 1:2], beside = TRUE, las = 1) :
> unused argument(s) (beside = TRUE, las = 1)
>
> I've looked up ?
Steve Murray wrote:
Jim and all,
Thanks for the suggestion, however, I get the following error:
barplot(t(combine86[,1:2], beside = TRUE, las = 1))
Error in t(combine86[, 1:2], beside = TRUE, las = 1) :
unused argument(s) (beside = TRUE, las = 1)
I've looked up ?t and cannot see a
re
> Sent: Wednesday, May 13, 2009 5:59 PM
> To: r-help@r-project.org
> Subject: [R] plotting multiple data sources
>
> hi,
>
> Excuse me asking three questions in a row for a day, but I had
> collected those questions
> as I'm still experimenting with R.
> This
K F Pearce wrote:
Hello everyone,
(This is my second question posted today on the R list).
and you have still not read the posting guide?
It asks you to "provide commented, minimal, self-contained, reproducible
code" which also means that you need to tell which packages you are using.
I
one way is the following:
x <- seq(-2, 2, len = 11)
y1 <- 2*x^2 + 3*x + 1
y2 <- - 2*x^2 - 3*x + 1
plot(x, y1, type = "l", col = "red", ylim = range(y1, y2))
lines(x, y2, col = "blue")
I hope it helps.
Best,
Dimitris
njhuang86 wrote:
Hi. Sorry if this question might have already been asked.
I am trying to come up with a way of shading-in a grid for a simple pattern
So far I can draw a square where I want but I cannot seem to draw a complete
grid. I am just drawing them along the diagonal!!
Clearly I am missing something simple but what?
Any suggestions gratefully accepted.
Exam
I did something very similar in ggplot2 about a year ago. Use the
unique sampling location from the species count data (rownames) as a
factor column, and then use that in a geom_color or geom_shape add on
to qplot
untested:
library ggplot2
a <- metaMDS(foo, k=3)
b <- rownames(foo)
d <- data.fram
You can do this in lattice:
library(lattice)
df = data.frame(val = rnorm(100), group = rep(c('x', 'y'), each = 50))
qqmath(~val, groups = group, data = df)
Hope that helps,
Greg
njhuang86 wrote:
Hi all,
Does anyone know how to plot overlapping qqnorm plots on the same window?
Suppose I have
njhuang86 wrote:
Hi all,
Does anyone know how to plot overlapping qqnorm plots on the same
window?
Suppose I have data in the vector x and y:
qqnorm(x)
lines(qqnorm(y))
I though these two lines will do the job... However, lines doesn't
seem to
work. Anyways, thanks in advance!
E.g.:
On 02/07/2008 8:47 PM, Rory Winston wrote:
Hi all
I have a question about correct usage of persp(). I have a simple neural
net-based XOR example, as follows:
library(nnet)
xor.data <- data.frame(cbind(expand.grid(c(0,1),c(0,1)), c(0,1,1,0)))
names(xor.data) <- c("x","y","o")
xor.nn <- nnet(o ~
Great! Thanks for the advice.
Cheers
Rory
--Original Message--
From: Duncan Murdoch
To: Rory Winston
Cc: r-help@r-project.org
Sent: 3 Jul 2008 05:08
Subject: Re: [R] Plotting Prediction Surface with persp()
On 02/07/2008 8:47 PM, Rory Winston wrote:
> Hi all
>
> I have a quest
Hi,
I'm trying to plot multiple lines on one plot. I have a data frame raw,
and i want to plot raw$date on the x-axis and raw$theta, raw$vega,
raw$delta, and a few others on the y-axis, with a legend. However, I'm not
sure what the scale of those data sets are, and I don't know which one will
ha
Greetings!
I was wondering how to plot multiple equation on the same plot with the
data?
So if I have three equations:
1.y= 2.31X + -2.2
2.y= 2.27X^2 + 5.63X + 0.52
3.y= -1.53X^3 + 1.92X^2 + -4.72X + 4.57
and a datafram or a 2D matrix. I would also like the equations in different
colors,
Hello,
I'm new to R (using it since about two weeks),
but absolutely a fan of it from the beginning on. :-)
Best tool for working with data I found. :-)
I tried using the fft() and other funcitons for
analysing time series.
What I would be glad to have, would be a
convenient way to display the
?par
see the 'xpd' argument; e.g. you may use legend(..., xpd = NA)
or use the 'lattice' package
Regards,
Yihui
--
Yihui Xie <[EMAIL PROTECTED]>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main
On 9/18/08, David Scott <[EMAIL PROTECTED]> wrote:
>
> I have a data set concerning ferritin levels in blood. There are three
> relevant columns for this question, ferritin (continuous), score (ordered,
> from 0 to 8) and gender. There is a good linear relationship between
> log(ferritin) and scor
On Thu, 18 Sep 2008, Deepayan Sarkar wrote:
On 9/18/08, David Scott <[EMAIL PROTECTED]> wrote:
I have a data set concerning ferritin levels in blood. There are three
relevant columns for this question, ferritin (continuous), score (ordered,
from 0 to 8) and gender. There is a good linear rela
Hello,
I am trying to generate a confidence interval (90 or 95%) of a regression
line. This is primarily just for illustration on a scatter plot (i.e. I am
trying to make this
http://www.ast.cam.ac.uk/~rgm/scratch/statsbook/graphics/anima4.gif).
I have been trying to use the predict.lm function,
Thanks to all those of you who answered my question about how to save a plot
to a file.
But now I have another problem. That is I wish to see / examine the plot on
the screen in advance of saving it to a file. If I launch X11() or pdf() or
Poscript() the plot does not appear on my screen .. So I ha
Dear R-help,
I am looking for a function that will plot error bars in x- or y-direction (or
both), the same as the Gnuplot function 'plot' can achieve with:
plot "file.dat" with xyerrorbars,...
Rsite-searching led me to the functions 'errbar' and 'plotCI' in the Hmisc,
gregmisc, and plotri
Hello,
I have a set of data which I currently represent graphically on a plot. To
do that, I use the embedded functions from the graphics package (symbols,
rect, etc.) However, I would like to use static jpeg images to represent the
data if possible. Here's my progress so far:
1. Used the rimage
Johannes Graumann wrote:
> Dear all,
>
> As you can see from the attachment I'm using R to automatically annotate
> peptide fragmentation mass spectra, which are represented by impulse plots.
> I'd like to poll you on approaches of how to deal as generally as possible
> with the two biggest annota
Jim,
I finally got back to this implementation of mine and dude, this function is
amazing! Thank you so much!
Joh
On Saturday 05 January 2008 11:42:30 Jim Lemon wrote:
> Johannes Graumann wrote:
> > Dear all,
> >
> > As you can see from the attachment I'm using R to automatically annotate
> > p
I have a set of Monte Carlo simulation results for a Quick Response
Freight Model that I am currently preparing summary graphs. I want to
show three things on the graphs; the model forecast, an approximate
exponential best fit line, and a smooth line through mean+sd and mean-sd
data points.
As yo
Hi Silvia,
>> What I need is exactly what I get using biplot (pca.object) but for other
>> axes.
You need to look at ?biplot.prcomp (argument: choices=)
## Try
biplot(prcomp(USArrests), choices=c(1,2)) ## plots ax1 and ax2
biplot(prcomp(USArrests), choices=c(1,3)) ## plots ax1 and ax3
On Fri, 18 Jan 2008, Silvia Lomascolo wrote:
>
> Hi R-community,
> I am doing a PCA and I need plots for different combinations of axes (e.g.,
> PC1 vs PC3, and PC2 vs PC3) with the arrows indicating the loadings of each
> variables. What I need is exactly what I get using biplot (pca.object) but
I'm an R newbie and am trying to plot 3 vectors, say a,b,c. I have
downloaded 3 R manuals and searched your forum. There are plenty of X vs Y
examples, but cannot find how to plot 3, or more vectors one one graph. I'm
sure I overlooked something.
Thanks for any help.
CHV
--
View this message i
Hi all,
As I understand the zoo package will aggregate dates and times, but
unclear how to tackle this problem.
I need to accomplish the following:
1. Generate a scatter plot of bat activity with dates on the X-axis
and time on the Y-axis.
include sunset and sunrise curves as an added part
?plot.default
plot(x <- rnorm(47), type = "p", main = "plot(x, type = \"p\")", col =
c("dark red","blue"))
If you plan to have a system for the coloring, you need to get the
values sequence-aligned with the colors. This just colors every other
point "blue".
--
David Winsemius
On Jan 20,
t; -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Georg Ehret
> Sent: Tuesday, January 20, 2009 10:23 AM
> To: r-help
> Subject: [R] plotting points with two colors
>
> Dear Miss R,
> I am trying to plot a
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
What does you data look like? You could use 'split' and then examine
the data in each range to count the number missing. Would have to
have some actual data to suggest a solution.
On Sun, Jan 25, 2009 at 8:30 PM, Shreyasee wrote:
> Hi,
>
> I have imported one dataset in R.
> I want to calculate
Hi Jim,
The dataset has 4 variables (dos, patientinformation1, patientinformation2,
patientinformation3).
In dos variable ther are months (May 2006 to March 2007) when the surgeries
were formed.
I need to calculate the percentage of missing values for each variable
(patientinformation1, patientinf
Here is an example of how you might approach it:
> dos <- seq(as.Date('2006-05-01'), as.Date('2007-03-31'), by='1 day')
> pat1 <- rbinom(length(dos), 1, .5) # generate some data
> # partition by month and then list out the number of zero values (missing)
> tapply(pat1, format(dos, "%Y%m"), functi
Hi Jim,
I need to calculate the missing values in variable "patientinformation1" for
the period of May 2006 to March 2007 and then plot the graph of the
percentage of the missing values over these months.
This has to be done for each variable.
The code which you have provided, calculates the missi
YOu can save the output of the tapply and then replicate it for each
of the variables. The data can be used to plot the graphs.
On Sun, Jan 25, 2009 at 9:38 PM, Shreyasee wrote:
> Hi Jim,
>
> I need to calculate the missing values in variable "patientinformation1" for
> the period of May 2006 to
Hi Jim,
I tried the code which u provided.
In place of "dos" in command "pat1 <- rbinom(length(dos), 1, .5) # generate
some data"
I added "patientinformation1" variable and then I gave the command for
"tapply" but its giving me the following error:
*Error in tapply(pat1, format(dos, "%Y%m"), fun
do:
str(dos)
str(patientinformation1)
They must be the same length for the command to work: must be a one to
one match of the data.
On Sun, Jan 25, 2009 at 10:23 PM, Shreyasee wrote:
> Hi Jim,
>
> I tried the code which u provided.
> In place of "dos" in command "pat1 <- rbinom(length(dos), 1,
Hi Jim,
I run the following code
*ds <- read.csv(file="D:/Shreyasee laptop data/ASC Dataset/Subset of the ASC
Dataset.csv", header=TRUE)
> attach(ds)
> str(dos)*
I am getting the following message:
*Factor w/ 12 levels "-00-00","6-Aug",..: 6 6 6 6 6 6 6 6 6 6 ...*
Thanks,
Shreyasee
On
>From your original posting:
> I tried the code which u provided.
> In place of "dos" in command "pat1 <- rbinom(length(dos), 1, .5) # generate
> some data"
> I added "patientinformation1" variable and then I gave the command for
> "tapply" but its giving me the following error:
>
> Error in tapp
> I added "patientinformation1" variable and then I gave the command for
> "tapply" but its giving me the following error:
>
> Error in tapply(pat1, format(dos, "%Y%m"), function(x) sum(x == 0)) :
> arguments must have same length
seems like you added patientinformation1, but still use pat1 i
Hi Jim
r-help-boun...@r-project.org napsal dne 26.01.2009 15:44:32:
> >From your original posting:
>
> > I tried the code which u provided.
> > In place of "dos" in command "pat1 <- rbinom(length(dos), 1, .5) #
generate
> > some data"
> > I added "patientinformation1" variable and then I gave
On 14/04/2008 6:56 PM, Enrico Rossi wrote:
> Hello,
>
> If I make a plot, say something simple like
>
> plot( runif(100) )
>
> then the origin (0,0) is not at the bottom-left corner of the box
> surrounding the plot. The axis limits are "padded" slightly. This is
> ordinarily a good feature, bec
---
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Enrico Rossi
Gesendet: Monday, April 14, 2008 6:57 PM
An: r-help@r-project.org
Betreff: [R] Plotting with exact axis limits
Hello,
If I make a plot, say something simple like
plot( runif(10
ithin the bounding box. Style "d" (direct)
> specifies that the current axis should be used on subsequent plots. (Only
> "r" and "i" styles are currently implemented)
>
> Cheers,
> Daniel
>
>
> -
> cuncta strict
#Install library rgl
#here is the function which you need to run first:
rgl.plot3d<-function(z, x, y, cols="red",axes=T,new=T)
{xr<-range(x)
x01<-(x-xr[1])/(xr[2]-xr[1])
yr<-range(y)
y01<-(y-yr[1])/(yr[2]-yr[1])
zr<-range(z)
z01<-(z-zr[1])/(zr[2]-zr[1])
if(new) rgl.clear()
if(axes)
Hi,
I have a histogram of an array of numbers.
hist(v,10)
How can I plot a function, say a semi circle,
curve(sqrt(2.25-x*x), -1.5,1.5)
in the same graph?
Thank you
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
htt
Does something like this do it for you:
x <- read.table(textConnection(" V1 V2
1 1 160.54%
2 1 201.59%
3 1 18.45%
4 1 179.03%
5 1 274.37%
6 1 0.00%
7 1 24.52%
8 1 39.17%
9 3 43.72%
10 1 53.06%
11 1 64.97%
12 1 79.84%
13 1 98.08%
14 1 115.32%
15 1 127.96%
16
x <- read.table(textConnection(" V1 V2
1 1 160.54%
2 1 201.59%
3 1 18.45%
4 1 179.03%
5 1 274.37%
6 1 0.00%
7 1 24.52%
8 1 39.17%
9 3 43.72%
10 1 53.06%
11 1 64.97%
12 1 79.84%
13 1 98.08%
14 1 115.32%
15 1 127.96%
16 1 155.38%
17 1 157.25%
18 1 193.17%
jiho.han wrote:
hello, useRs~
suppose i have a matrix as follows:
itemcategory sub-category
A 1 11
B 1 12
C 1 12
D 2 21
E 2 22
i like to draw
Oops, you will need:
library(prettyR)
to run the barhier function.
Jim
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commente
"red")
Thanks,
Sachin
- Original Message
From: Jorge Ivan Velez <[EMAIL PROTECTED]>
To: Sachin J <[EMAIL PROTECTED]>
Sent: Tuesday, May 13, 2008 11:33:56 AM
Subject: Re: [R] Plotting Frequency Distribution in R
Hi Sachin,
Is this what you want?
df<-"V1
try this:
x <- matrix(runif(15, 100, 300), ncol=3)
plot(x[,1], x[,2], type='l')
points(x[5,1], x[5,2], pch=17, cex=3, col='red') # plot point #5
On Fri, May 23, 2008 at 8:50 AM, Jason Lee <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a data table matrix,"data" which looks like below:-
> V1
Hi
I tried and it is not what im looking ..
I basically issue plot(data$"V1",data$"V2") as the matrix have the two
headers..But essentially what I would like is relabel or somehow
differentiate row 5 from the rest of the points on the graph.
In other words, I wanted to see all the points but at
>
>
> From: "Jason Lee" <[EMAIL PROTECTED]>
> Date: May 23, 2008 10:06:18 AM EDT
> To: r-help@r-project.org
> Subject: [R] Fwd: Advise in R- plotting graphs
>
>
> Hi
>
> I tried and it is not what im looking ..
>
> I basically issue plot(da
e
plot(V1,V2, col=ifelse( (1:length(V1)) == 5, "red","black") )
or
plot(V1,V2, pch=ifelse( (1:length(V1)) == 5, 1,2) )
--
View this message in context:
http://www.nabble.com/Advise-in-R--plotting-graphs-tp17424911p17452851.html
Sent from the R help mailing list archive at Nab
Hi,
I am trying to plot multiple lines on one plot such that all lines are of
the same color (black) and continuous. I need to distinguish these multiple
plots from each other by using different symbols (I am using pch=). However,
all my lines are broken on both sides of the symbols. This unfortuna
Try this:
ix <- seq(1, nrow(example.df), 5)
with(example.df[ix,], {
plot(DSR1 ~ StartDate, type = "b", ylim = c(0.3, 0.9))
points(DSR2 ~ StartDate, type = "b", pch = 3)
})
On Wed, Feb 20, 2008 at 6:57 PM, Jessi Brown <[EMAIL PROTECTED]> wrote:
> Hello, fellow R enthusiasts.
>
> Ok, I've be
Try this:
library(lattice)
xyplot(DSR1 + DSR2 ~ StartDate, example.df, type = "b", pch = c(1, 3),
subset = seq(1, nrow(example.df), 5))
On Wed, Feb 20, 2008 at 8:57 PM, Jessi Brown <[EMAIL PROTECTED]> wrote:
> Thanks for the ideas so far, Gabor and Phil.
>
> I was hoping to find a solution that
Thanks for the ideas so far, Gabor and Phil.
I was hoping to find a solution that didn't depend on building another
data frame, but if that's the easiest way, I can certainly do it
through that route. At least your solutions involve fewer lines of
code than I had devised for extracting the desired
Hi,
this might also work for You:
> points(example.df$StartDate[ (row(example.df)%%5)==0 ],
example.df$DSR2[ (row(example.df)%%5)==0 ], type="p", pch=3)
> points(example.df$StartDate[ (row(example.df)%%5)==0 ],
example.df$DSR2[ (row(example.df)%%5)==0 ], type="p", pch=3)
Kind regads,
Kimmo
Je
Hi,
sorry, the correct commands should look like this:
> plot(example.df$StartDate[ (row(example.df)%%5)==0 ], example.df$DSR1[
(row(example.df)%%5)==0 ], type="p", ylim=c(0.3,0.9))
> points(example.df$StartDate[ (row(example.df)%%5)==0 ],
example.df$DSR2[ (row(example.df)%%5)==0 ], type="p", pc
Here's a similar variant on what has been proposed, but is simpler. It
relies on the fact that plot() doesn't need a ~.
a<-1:100
b<-seq(1,length(a),5)
plot(1:20, a[1:b])
Alternately, if you were using a data frame, as long as you knew the column
names, you could do something like
plot(my.dat
ssi Brown
> Sent: Wednesday, February 20, 2008 6:57 PM
> To: Gabor Grothendieck
> Cc: r-help@r-project.org
> Subject: Re: [R] plotting every ith data point?
>
> Thanks for the ideas so far, Gabor and Phil.
>
> I was hoping to find a solution that didn't depend on
the comma seperated file is 37Mb, and I get the below message:
it is zoo object read in this way:
# chron
> library(chron)
> fmt.chron <- function(x) {
+chron(sub(" .*", "", x), gsub(".* (.*)", "\\1:00", x))
+ }
> z1 <- read.zoo("all.csv", sep = ",", header = TRUE, FUN = fmt.chron)
and then t
Sorry if this is an FAQ, but I haven't found the answer (yet)...
I'm trying to plot each row of a simple numeric matrix in a separate
panel using the layout features of lattice, but can't make it work -
help would be appreciated!
Example:
> m <- matrix(seq(1:20), nrow=4)
> m
[,1] [,
ens Swanton0822
Verzonden: maandag 10 november 2008 2:45
Aan: r-help@r-project.org
Onderwerp: [R] plotting graph in different device
Hi,
i try to plot my graph into different device using x11(),
but when i do this comes up:
> x11(print(plot(A5e$ECAB,A5e$EXPEND,type='p',main='Per
Default kernel density estimation is poorly suited for this sort of
situation.
A better alternative is logspline -- see the eponymous package -- you
can
specify lower limits for the distribution as an option.
url:www.econ.uiuc.edu/~rogerRoger Koenker
email[EMAIL PROTECTED
Another option
mydata <- rnorm(10)
mydata <- mydata[mydata>0]
plot(density(c(mydata, -mydata), from=0))
If you want the area under the curve to be one, you'll need to double the
density estimate
dx <- density(c(mydata, -mydata), from=0)
dx$y <- dx$y * 2
plot(dx)
Chris
Jeroen Ooms wrote:
thank you, both solutions are really helpful!
--
View this message in context:
http://www.nabble.com/plotting-density-for-truncated-distribution-tp20684995p20703469.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
Hi list,
Well, this time Ive a doubt with mapping generation.
I was already able to read and plot shapefiles, plot point on this map. All
this without any problems, but now I want to do something that I think, only
Golden Software Surfer is capable of.
I would like to plot a kriging result on t
basically something along these lines:
plot(Time, Resistance, bty='c')
par(new=TRUE)
plot(Time, Temperature, axes=FALSE, ylab='', xlab='')
axis(4)
On 10/12/07, Keith Cox <[EMAIL PROTECTED]> wrote:
> My data is the following:
>
>
>
>
> Time
>
> Resistance
>
> Temperature
>
>
> 5
>
> 2000
>
> 4
>
>
i want to make survival plots for a coxph object using survfit
function. mod.phm is an object of coxph class which calculated results
using columns X and Y from the DataFrame. Both X and Y are
categorical. I want survival plots which shows a single line for each
of the categories of X i.e. '4' and
andrew@lshtm.ac.uk wrote:
I want to be able to continuously plot the output from the model in R
each time a new run generates data.
From the C++ program, run the R script that plots the data. Something
like this:
system("Rscript myplotter.R");
That assumes Rscript is in the PA
) to the plot."
I hope this helps,
John
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On
> Behalf Of Tony Laidig
> Sent: May-01-09 4:14 PM
> To: r-help@r-project.org
> Subject: [R] Plotting extra lines on scatter
On May 2, 2009, at 4:09 PM, x wrote:
I have: f <- ols( y1 ~ (rcs(x1,3) + rcs(x2,3) + rcs(x1,3) %ia%
rcs(x2,3) ) )
Then I do: plot(f)
This plots y1 against x2 for a given value of x1.
Is there a way to make it *also* plot y1 against x1 for a given
value of x2?
Are you using the Design
Hi useR's
I have created a simple map of the world using the following code:
m <- map(xlim=c(-180,180), ylim=c(-90,90))
map.axes()
I then create a grid of dimension 36x72 using the code:
map.grid(m, nx=72, ny=36, labels=FALSE, col="black")
This gives 2592 grid cells. In a separate data set of
201 - 300 of 485 matches
Mail list logo