Displaying 20 results from an estimated 20000 matches similar to: "Find value in vector (or matrix)"
2003 Dec 17
1
Session log file...
Hi all,
I tried to save a complete log of a R session we had in a seminar
today... but I didn't succeed.
1) R | tee session.log
This saves both input and output, but I do get the cursor key escape
sequences from editing (cursor-up to get last command etc) instead of
the actual command line executed.
2) savehistory
Gets commands only, not the output
3) sink
Gets output, without the
2003 Feb 20
3
outliers/interval data extraction
Dear R-users,
I have two outliers related questions.
I.
I have a vector consisting of 69 values.
mean = 0.00086
SD = 0.02152
The shape of EDA graphics (boxplots, density plots) is heavily distorted
due to outliers. How to define the interval for outliers exception? Is
<2SD - mean + 2SD> interval a correct approach?
Or should I define 95% (or 99%) limit of agreement for data interval,
2003 Nov 21
3
plot map of areas
Hi all,
Given a number of points (x,y) in a plane, I'd like to plot a map of
polygons, so that
1) each polygon contains exactly one point
2) the polygon defines the area for which this specific point is
closer than any other point.
It's a bit like a map of areas "influenced" by that point, and it's
obviously a matter of intersecting the perpendicular bisectors
2003 Nov 25
2
R recursion depth and stack size
Hi all,
I am playing around with latin squares, and wrote a recursive function
that searches for valid combinations.
Apart from the fact that there are very many, I run into troubles
beginning with size 10x10 because the recursion depth becomes too large
(max of 10x9-1=89 in this case).
Why is this a problem? Isn't there enough space allocated to the stack?
Can this be increased? The
2006 Dec 18
2
Error compiling on HP-UX
Dear all,
I hope this is the right mailing list for my question -- I felt that this was
too technical for R-help.
I am trying to compile R-2.4.0 on a HP-UX system:
./configure
MAKE=gmake --prefix=$HOME --without-x --without-tcltk --disable-R-profiling --without-readline --disable-multibyte
R is now configured for ia64-hp-hpux11.23
Source directory: .
Installation directory:
2003 Oct 22
2
plotmath question: y'
Hi all,
I wonder how to correctly write the following expression (it's the axis
label in a plot command):
ylab=expression(y' == y - bar(y) )
Somehow the single quote in y' is causing the problems, I guess because
it is interpreted as a quote...
Does it have to be escaped? But how?
Thanks for your help
Pascal
2005 Dec 06
2
figure with inset
I am trying to plot a figure within a figure (an inset that shows a closeup of
part of the data set). I have searched R-help and other sources but not found a
solution.
What I would like to do is
(1) produce a plot
(2) specify a window that will be used for the next plot (in inches or using the
coordinate system of the plot produced in (1)
(3) overlay a new plot in the window specified under (2)
2003 Dec 08
1
Add row to data frame
Hi all,
is there an easy way to build up a data frame by sequentially adding
individual rows? The data frame consists of numeric and character
columns. I thought of rbind, but I ended up with numeric values for the
character columns.
Pascal
2003 Nov 05
3
converting column to factor *within* a data frame
Hi all,
I repeatedly encounter the following problem: After importing a data set
into a data frame, I wish to set a column with numeric values to be a
factor, but can't figure out how to do this. Also, I do not wish to
write as.factor(x) all the time. I can create a new vector with x <-
factor(x), but the new vector resides outside the attached data frame.
Pascal
> attach(ngrad)
2003 Nov 29
2
Indexing ANOVA table
Hi all,
I'd like to extract a value from an ANOVA table, but experience the following
problem:
### This works:
> s.pseudo <- summary(aov(m ~ block + mix*graz,data=split1))
> s.pseudo
Df Sum Sq Mean Sq F value Pr(>F)
block 2 1114.66 557.33 4.4296 0.04192 *
mix 1 6.14 6.14 0.0488 0.82956
graz 2 1.45 0.72 0.0057 0.99427
mix:graz
2003 Nov 20
2
Increment element of vector and efficiency
Hi all,
Thanks for the incredibly quick help with the "%in%"...
There's a second question, though: I'd like to increment an element of a
vector if a certain event occurs, e.g.
count[event] <- count[event] + 1; # works, but...
Is this efficient? I wonder whether R needs to subset the count vector
on both sides of the assignment operator (i.e., twice), or
2008 Sep 23
5
xyplot problem
Hi all,
I am trying to produce some panels with dots in an X/Y plane where the
diameter of the dots indicates a Z value (like e.g. earthquake maps where dot
sizes indicate magnitudes and X/Y the location).
This works fine with xyplot, e.g.:
xyplot(1:3~1:3,cex=1:3,pch=16)
However, when I do this with a panel variable, e.g.:
x<-rep(1:3,5)
y <- rep(1:3,5)
sz <- rep(1:5,each=3)
grp
2004 Jun 10
1
Compiling under SuSE 9.1 (PR#6965)
Full_Name: Pascal
Version: 1.9.0
OS: GNU/Linux
Submission from: (NULL) (212.152.21.2)
In order to compile under SuSE 9.1, I needed to change
#define NeedFunctionPrototypes 0
to
#define NeedFunctionPrototypes 1
in line 29 of src/modules/X11/dataentry.c;
/* don't use X11 function prototypes (which tend to ...): */
#define NeedFunctionPrototypes 1
#include <X11/X.h>
HTH
Pascal
2011 Dec 19
2
nlrob problem
Dear all,
I am not sure if this mail is for R-help or should be sent to R-devel
instead, and therefore post to both.
While using nlrob from package 'robustbase', I ran into the following
problem:
For psi-functions that can become zero (e.g. psi.bisquare), weights in
the internal call to nls can become zero. Example:
d <- data.frame(x=1:5,y=c(2,3,5,10,9))
d.nlrob <-
2009 Jan 07
2
NA and NaN question
Hi all,
I ran into a problem in some of my code that could be traced back to 'mean'
sometimes returning NA and sometimes NaN, depending on the value of na.rm:
> mean(c())
[1] NA
> mean(c(NA),na.rm=T)
[1] NaN
However, I don't understand the reasoning behind this and would appreciate and
explanation.
I understand that the mean of an empty vector is not definied, but I
2003 Nov 23
1
coplot row separatot line
Hi all,
I could not find a way to add the dashed horizontal separator line to the top
panel of a coplot (the one indicating which panel belongs to which range of the
given variable a in y~x | a).
This line should separate the ranges plotted in a row of panels in the panel
matrix below (hmmm, hope this is reasonably clear). I like it because it
enhances readability.
I'll try a sketch:
>
2003 Dec 16
16
mailing list for basic questions - preliminary sum up
Dear R-user,
I already received quite a lot of replies to this mail and like to do a
preliminary sum up.
A few were sceptical about the use of such a beginner mailing list.
The arguments were that people starting with R will only stay subscribed for
a short time
until they reached the R-help "level" and therefore only beginner will teach
beginner how to
use R.
But as far
2004 Jan 16
1
error message in plot(aov-object) -- repost
Hi all,
I posted this question several days ago, but did not get any answer
until now. Since I still have no clue about the source of this error
message, I repost a description of the problem including some code:
A student at our institute fitted an aov model, and got the following
error message:
> plot(p.aov)
Hit <Return> to see next plot:
Hit <Return> to see next plot:
2003 Dec 11
1
nested aov: plot available?
Hi all,
I wonder whether, for an anova with multiple error strata, it is possible to
produce the same diagnostoc plots than with a single-stratum anova.
I can extract the residuals for each stratum with e.g.
> resid(split1.aov[["block:plot"]])
> resid(split1.aov[["Within"]])
and then produce qqnorm plots etc manually, but is it possible to get all the
plots
2012 Jan 06
1
lme model specification problem (Error in MEEM...)
Dear all,
In lme, models in which a factor is fully "contained" in another lead to
an error. This is not the case when using lm/aov.
I understand that these factors are aliased, but believe that such
models make sense when the factors are fitted sequentially. For example,
I sometimes fit a factor first as linear term (continuous variable with
discrete levels, e.g. 1,2,4,6), and