Displaying 20 results from an estimated 4000 matches similar to: "problem using identify() after plot()"
2008 Jun 26
2
stuck on making a line graph across time, with 4 categories
I can't seem to find just what I'm looking for in R help, Everitt and
Hothorn HSAUR, Murrell's book, or the R graphics gallery at
http://addictedtor.free.fr/graphiques/. Probably not looking
efficiently, but anyway,
If my data look like this:
> head(data)
cat startyear studentid
1 other 2001 12
2 UHS 2001 17
3 Lourdes 2001 10
4
2009 Jan 23
0
high values of my response variable get chopped off of lattice dotplots
I am trying the following lattice graphics code:
> library(lattice)
> attach(junk)
> summary(junk)
mean.barr variable value
Min. : 3.50 item15 :15 Min. :0.0000
1st Qu.: 9.50 item14 :14 1st Qu.:0.0000
Median :11.00 item16 :14 Median :0.0000
Mean :11.64 item1 : 0 Mean :0.6744
3rd Qu.:16.00 item2 : 0 3rd Qu.:1.0000
Max. :20.00 item3 :
2018 May 01
0
How would I color points conditional on their value in a plot of a time series
The ts method for plot() is quirky. You can use the default method:
plot(as.vector(time(ttt)), as.vector(ttt), type = "p", col=ifelse(ttt<8,
"black", "red"))
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, May 1, 2018 at 1:17 PM, Christopher W Ryan <cryan at binghamton.edu>
wrote:
> How would I color points conditional on their value in a plot
2018 May 01
2
How would I color points conditional on their value in a plot of a time series
Excellent! Worked like a charm. Thanks.
--Chris Ryan
On Tue, May 1, 2018 at 4:33 PM, William Dunlap <wdunlap at tibco.com> wrote:
> The ts method for plot() is quirky. You can use the default method:
>
> plot(as.vector(time(ttt)), as.vector(ttt), type = "p", col=ifelse(ttt<8,
> "black", "red"))
>
>
> Bill Dunlap
> TIBCO Software
2018 May 01
0
How would I color points conditional on their value in a plot of a time series
You may also want to check this out:
plot(ttt, type = "p")
points(ttt, col = ifelse(ttt < 8, "black", "red"))
Eivind K. Dovik
Bergen, NO
On Tue, 1 May 2018, Christopher W Ryan wrote:
> Excellent! Worked like a charm. Thanks.
>
> --Chris Ryan
>
> On Tue, May 1, 2018 at 4:33 PM, William Dunlap <wdunlap at tibco.com> wrote:
>
>> The
2012 Nov 14
2
aggrete data from combination
Dear R users,
A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I
want all diameters values for different combination of plots.
For example I want all d values for all posible combination, 100C2 (all d
values for plot 1 with all d values in the plot 2.......with all d values
from plot 1 with all d values from plot 100, ...... with all d values from
plot 99 with all d values
2013 Jun 12
1
Question on Simple Repeated Loops
Dear R-User,
Appreciate any helps. It looks simple, but I don't have a clue.
Given that I have a dataframe of tree population with three variables:
sp=species ,
d0=initial_size
grow=growth increment from initial size per year
How can I calculate the future growth increment of each tree for the next 3 years.
The following Rscript was written,
#----------
a0 <-
2011 Aug 30
3
having trouble extracting week from chron object
Running R 2.13.1 on Windows XP.
I would like to get week of the year (1-52) for each date.
library(chron)
dts <- dates(c("02/27/92", "02/27/92", "01/14/92","02/28/92", "02/01/92"))
dts
dts.chron <- as.chron(dts)
dts.chron
class(dts.chron)
# all of these component extractions work:
months(dts.chron)
weekdays(dts.chron)
years(dts.chron)
2018 May 01
2
How would I color points conditional on their value in a plot of a time series
How would I color points conditional on their value in a plot of a time
series. Something like this:
## demonstration data
ttt <- ts(rpois(12, lambda = 8), start = c(2000, 1), freq = 4)
ttt
plot(ttt, type = "p")
## doesn't work--all points the same color
plot(ttt, type = "p", col = ifelse(ttt < 8, "black", "red"))
## also doesn't work--all
2024 Sep 06
1
Fwd: effects() extractor for a quantile reqression object: error message
Apologies, forgot to copy R-help on this response.
Begin forwarded message:
From: Roger Koenker <rkoenker at illinois.edu>
Subject: Re: [R] effects() extractor for a quantile reqression object: error message
Date: September 6, 2024 at 8:38:47?AM GMT+1
To: "Christopher W. Ryan" <cryan at binghamton.edu>
Chris,
This was intended to emulate the effects component of lm()
2013 Jan 03
2
Sas by function in R
Hello,
It's an alternative to use SAS by function in R?
I want to plot d histograms by plot.from example bellow:
Thank you!
plot d
1 1 16.3
2 1 25.0
3 1 57.8
4 1 17.0
5 2 10.8
13 2 96.4
17 3 76.0
18 3 32.0
19 3 11.0
20 3 11.0
24 3 106.0
25 3 12.5
21 4 19.3
22 4 12.0
26 4 15.0
27 5 99.3
32 7 11.0
36
2009 May 13
4
matching period with perl regular expression
Hello,
I have several strings where I am trying to eliminate the period and
everything after the period, using a regular expression. However, I am
having trouble getting this to work.
> x = "wa.w"
> gsub(x, "\..*", "", perl=TRUE)
[1] ""
Warning messages:
1: '\.' is an unrecognized escape in a character string
2: unrecognized escape removed
2009 Apr 20
4
automatic exploration of all possible loglinear models?
Is there a way to automate fitting and assessing loglinear models for
several nominal variables . . . something akin to step or drop1 or add1
for linear or logistic regression?
Thanks.
--Chris
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY 13790
cryanatbinghamtondotedu
"If you want to build a ship, don't drum
2009 Nov 20
3
help me avoid nested for() loops!
Hi R folks,
I have a massive array (object name "points") in the following form
[,1] [,2]
[1,] 1369 22
[2,] 1370 22
[3,] 1368 23
[4,] 1369 23
[5,] 1370 23
[6,] 1371 23
(10080 rows truncated)
These represent pixel coordinates of interest in a jpeg image. I need
to find the distance from each point to all other points of interest.
The only way I can see to do this
2010 Aug 09
5
Drawing problem in Wine 1.3.0
Hi, I'm having a problem with black boxes and black widgets appearing in
Wine programs. See these two screenshots[0], [1] for examples. One
program is a Windows application, but the other is Winecfg. Any clues
what is wrong here? This is Wine 1.3.0 compiled on Debian squeeze.
Thanks,
Andrew Barr
[0] http://img843.imageshack.us/img843/5373/screenshotho.png
[1]
2008 Sep 09
2
isolate elements in vector that match one of many possible values
Hi all,
I want to get the index numbers of all elements of a vector which match any
of a long series of possible values. Say x <- c(1,2,3,4) and I want to know
which values are equal to 1, 2 or 4. I could do
which(x == 1 | x==2 | x==4)
[1] 1 2 4
This gets really ugly though, when the list of values of interest is really
long. Is there a nicer way to do this? Something akin to the MySQL
2024 Jan 06
0
Help request: Parsing docx files for key words and appending to a spreadsheet
Hi Tim
This is brilliant - thank you!!
I've had to tweak the basePath line a bit (I am on a Linux machine), but
having done that, the code works as intended. This is a truly helpful
contribution that gives me ideas about how to work it through for the
missing fields, which is one of the major sticking points I kept bumping
up against.
Thank you so much for this.
All the best
Andy
On
2013 Dec 24
2
Parallel computing: how to transmit multiple parameters to a function in parLapply?
Hi R-developers
In the package Parallel, the function parLapply(cl, x, f) seems to allow
transmission of only one parameter (x) to the function f. Hence in order to
compute f(x, y) parallelly, I had to define f(x, y) as f(x) and tried to
access y within the function, whereas y was defined outside of f(x).
Script:
library(parallel)
f <- function(x) {
z <- 2 * x + .GlobalEnv$y # Try to
2011 Dec 31
1
Histogram omitting/collapsing groups
I have two large datasets (156K and 2.06M records). Each row has the
hour that an event happened, represented by an integer from 0 to 23.
R's histogram is combining some data.
Here's the command I ran to get the histogram:
> histinfo <- hist(crashes$hour, right=FALSE)
Here's histinfo:
> histinfo
$breaks
?[1] ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 10 11 12 13 14 15 16 17 18 19 20 21
2009 Jun 30
4
conditional coloring of output text in console or in GUI
suppose I have some logical vector
x <- as.logical(c(0,0,0,1,0,0,1,1,0))
x
How would I make the words TRUE appear on the screen in a different
color from the words FALSE?
Thanks.
--Chris
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY 13790
cryanatbinghamtondotedu
"If you want to build a ship, don't drum