Displaying 20 results from an estimated 8000 matches similar to: "overlaying plots"
2002 Jul 23
3
Aggregate: assembling the "by" part on the fly
Dear R users,
I'm having trouble using aggregate() and would
greatly appreciate your advice. I am using R 1.5.1
on Windows 2000.
I want to call my function in the following way
extract.data(x=dat[, "Age", "Year"])
where extract.data() uses aggregate() to count the number
of cases for each combination of "Age" and "Year".
I've defined
2002 Jul 17
9
problem formatting data frames
Dear R-guRus:
I have a problem with the format of my data in R.
Let's say I have a HUGE text table which consists of columns of
numerical data, separated by tabs, but in some places rows of text
(error messages, etc) are inserted in between rows of numerical data.
Because the data file is so huge and because I have thousands of these
files, it's unpractical to try and go thru these
2002 Jun 26
3
Help with concatenation and arrays
Dear R-guRus:
I have 2 questions
1) I have 2 variables, e.g. x<-5; y<-"Char"
How do I create a new variable which would have both these values in a
string (e.g. "5Char", or "5 Char", etc ) ??
2) if i have an array x[1:100], and I do x[x==345.123], how do I get
position j in the array of those x[j] which are equal to 345.123 ?
Thank you very much,
Vlad.
2003 Apr 22
7
Subject: Eliminate repeated components from a vector
X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
Reply-To: fjmolina at lbl.gov
FCC: /home/f/.xemacs/mail/sent
Does anyone know how I can eliminate repeated elements from a vector?
2003 Oct 02
3
indexing a vector
Dear All:
I'd like to know how to sort and then index a vector of floats by several
levels in R.
For example
>x<-rnorm(100)
> MyLevels<-quantile(x,probs=c(0,.5,1))
> MyLevels
0% 50% 100%
-2.11978442 -0.03770613 2.00186397
next i want to replace each x[i] in x by 1,2,3 or 4 depending on which
quantile that x[i] falls. How do I do that in a
2003 Feb 26
3
multiple plot overlay - dataframe
I hope you could help me with this. I have a dataframe
with 5 columns, the first column determining the X
values, and the rest four determining four separate Y
vectors. How can I plot them on the same graph,
overlaying each other?
Thanks.
Elena Zheleva
2003 Oct 28
2
R performance on Unix
Hi
I'm observing a huge difference in the performance speed of R on Windows and
Unix, even though I know that my Unix machine is much more powerful than my
Win machine.
In particular, any character processing task is very time consuming on Unix.
strptime(x,"%H:%M:%S") is about 10 times slower on Unix for vector x of the
length of ~ 500. read.table() also is very slow. is there
2001 Aug 14
2
RODBC connection - mixed data types
Dear R users
I use R (1.3.0) Windows version usually with connection to Excel
sheets via RODBC Version: 0.8-2. Everything is OK until I use mixed
data types (numeric and character) in one column.
In that case I will get a particular column of data frame with NA's.
Example
vzorek lpas apas
NA 51.240 20.26
NA 51.340 20.42
NA 49.770 22.05
RB 12 49.840 19.30
RB 12 49.880
2003 May 20
3
plot POSIX class and identify
Hallo all
just a small question I did not find an answer in help pages.
Is it possible to use identify() after plotting with plot.POSIX to
label points and/or to find out some points?
Thanks a lot.
Best regards
Petr Pikal
petr.pikal at precheza.cz
p.pik at volny.cz
2002 Jan 24
5
aggregate, by tapply
Dear R users
I searched some sources but i did not find an answer.Please give
me some hint to following problem.
I would like to compute a summary statistic for some vector for
different factor levels. I know I can use tapply or aggregate but I
do not know if there is a way how to use function with several
(two) variable input (like weighted.mean).
I wrote a simple a function for factor
2003 Oct 28
1
strptime command in R
Hello all:
I have a column of times in format
x
"16:30:00"
"16:30:03"
"16:59:00"
etc
which I need to convert into time variables and do some operations on.
I do the command y<-strptime(x,"%H:%M:%S"). This executes almost istantly (for
a column x of length 1000 in Windows, but in Unix, where I run my production
jobs, this takes over 4 minutes. I
2003 May 02
3
question about image command
Hello,
I have a question about image command. When you draw a image plot, and
let's say we use gray scale. then how can I generate a little bar next to
the plot which shows the grey levels and the values which corresponds to
the grey level? ( it doesn't matter whether I am using grey level or not.
It could be just any colors...)
The only way that I can do right now is overlaying
2003 Sep 04
2
laplace transform
Dear users,
is anybody of you aware of a R command to perform laplace transform or
even its inversion?
Thank you very much.
Luca
2003 Jul 24
3
trellis plot question
Greetings,
Does anyone know how to get an id number in the little header
above each individual plot within a trellis plot? The default
seems to be to print the word id and add a line indicating on
a linear scale where the current id sits.
Thanks in advance for any help you can send,
Suzette
=================================
Suzette Blanchard, Ph.D.
Research Scientist
Frontier Science
2003 Jul 22
3
R and C++ compared with only C++
My computer is a pentium 4 running at 2.4 GHz.
My R is 1.7.1
I have written a program in R that calls C++. The program spends most of the
time in C++ ( > 90% ). R basically deals with output and input.
How slower can this be compared with the program I would get from rewriting
everything in C++?
Thank you.
2005 Jan 14
2
Help in Overlaying of 2 Plots on the same Device.
I'm trying to overlay a density plot on a previously plotted histogram. However, i need to use the same axis as of the 1st(histogram) plot to plot the second. My second plot is creating its own axis and causing my plot to extend the entire histogram instead of getting a subplot on a portion of the histogram. I tried 'fig' and 'new' parameters with no luck.
Thanks in advance.
2003 Aug 21
5
graphic widow overwrite
Hi,
I am running a loop to plot multiple plots. In s-plus,
it shows multiple pages in the graphic window to allow
checking on each plot. but in R, the next plot always
overwrite the previous one, so i can only have the
last plot produced, is there a way to have multiple
pages in the graphic window just like S-plus does?
Thanks
2002 Sep 19
5
how to use if statement in function correctly
Dear all
I try to persuade if statement in my function to work as I want (but I am not very
successful:(
My question is why my function with if statement is evaluated correctly in case of
atomic variables and incorrectly in case of vector variables.
Here is an example:
#function with if statement
fff <- function(otac,sklon)
{
test <- (otac *
2003 Feb 21
2
how to chage values in data frame to NA iside a function
Dear all
I have a function in which I would like to change some values to NA according to
some condition.
dropout<-function(y, nahr=FALSE,...) {
<some stuff for computing an index>
if (nahr) y[index]<<-NA
invisible(index)
}
in case y is a vector all works OK but if it is a part of data frame by calling
dropout(df$y) or dropout(df[,number]) no change is done.
Please can you
2001 Oct 18
1
tapply problem
Hello everybody.
I have a question that has stumped me and the usual "apply" tricks
don't seem to work. I run a course where each student's performance
is marked by one or more assessors.
I have a data frame containing students' names, assessors' names and
their marks, arranged as follows:
ID student assessor Q1A Q1B Q1C Q2A Q2B Q3
1 2152833