Displaying 20 results from an estimated 2000 matches similar to: "deleting rows with the same ID if any meet a condition"
2006 Jan 18
2
Display an Image on a Plane
Hi,
I am new to R and I would like to display an image on a plane in a 3D plot,
i.e. I would like to be able to specify a theta and a phi parameters like in
the function persp to display a 2D image on an inclined plane.
Regards,
vincent
[[alternative HTML version deleted]]
2006 Jan 18
2
Display an Image on a Plane
Hi,
I am new to R and I would like to display an image on a plane in a 3D plot,
i.e. I would like to be able to specify a theta and a phi parameters like in
the function persp to display a 2D image on an inclined plane.
Regards,
vincent
[[alternative HTML version deleted]]
2006 Oct 04
2
Suitability of R for Algorithm simulations
Greetings,
Sorry for the basic question, but I am trying to find out if R is a suitable platform for what I want to do...
I am interested in creating simulations of distributed algorithms (i.e. team formation, Byzantine Generals , P2P communication modeling, mobile networks) that would be represented in GUIs. I would like to be able to instantiate an object for each node in my simulated
2006 Jan 05
2
Suggestion for big files [was: Re: A comment about R:]
[ronggui]
>R's week when handling large data file. I has a data file : 807 vars,
>118519 obs.and its CVS format. Stata can read it in in 2 minus,but In
>my PC,R almost can not handle. my pc's cpu 1.7G ;RAM 512M.
Just (another) thought. I used to use SPSS, many, many years ago, on
CDC machines, where the CPU had limited memory and no kind of paging
architecture. Files did
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
2005 Apr 09
1
R-generated animation of a polynomiograph
Hi, people.
Two days ago, I sent to this list a little toy for exploring
polynomiographs (yet, the mathematical formulas were not polynomials
anymore, so the name is not really appropriate).
After studying R calls, expressions and functions a bit more, I gave
myself the homework of producing an animation out of my recent toy. The
resulting animation, and also the sources, are available at:
2007 Aug 29
1
Excel (off-topic, sort of)
Except for the ability to perform circular recalculation, I believe that the closest programming analogy to a spreadsheet is a functional programming language. Check out Haskell (or LISP or Erlang) to do what you describe.
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Fran?ois Pinard
Sent: Wednesday, August 29, 2007
2005 Aug 25
1
Attempting to recode elements contained in a list
Hello R-Masters,
I have a list 's' with three elements, as shown below. I want to recode a.a, a.a2, and a.a3 to NA if the value in a.a is less than 3.
I reivewed my Modern Applied Statistic Book, the online help and did some searching of R-help on the internet. I explored unlist and as.list.data.frame in an attempt to isolate the third element of the list s, but this was not helpful.
2006 May 15
2
Truncated labels in hist (PR#8864)
Hi, people. Executing the following command:
hist(rpois(100,5), labels=TRUE)
yields a graphic in which some labels are truncated (on an X11 device).
The truncated labels are those over the highest bars. The hist function
should ideally manage enough room for the labels, automatically.
(Specifying ylim solves my problem, but yet, hist could be frienlier.)
--please do not edit the
2007 Aug 16
4
Combine matrix
Hi R user,
I am new to R, and I have a very simple question for you. I have two matrix
A and B, with internally redundant rownames (but variables are different).
Some, but not all the rownames are shared among the two matrix. I want to
create a greater matrix that combines the previuos two, and has all the
possible combinations of matching rownames lines among matrix A and B.
looking for the
2007 Aug 10
4
help with counting how many times each value occur in each column
Dear list,
I have the following dataset and want to know how many times each value occur in each column.
>data
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] -100 -100 -100 0 0 0 0 0 0 -100
[2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100
[3,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100
[4,] -100 -100 -100 -100 -100 -100 -100 -100 -100
2004 Jun 06
4
Request help writing a function
I have been wrestling with this function for quite a while, and am not making headway.
1) I want to apply a function to the following columns of a dataframe:
myfunction. <- apply(ph5028[,c(83:107)],2,function(x) ...
2) Within each of the above columns there is a single numeric code, 1, 2 or 3 or an NA.
3) My goal is to determine the percent of time each person used a 2 code. So if a person
2007 Aug 27
1
R 2.5.1 - Rscript through tee
Hi, people.
I met a little problem for which someone might have a solution. Let's
say I have an executable file (named "pp.R") with this contents:
#!/usr/bin/Rscript
options(echo=TRUE)
a <- 1
Sys.sleep(3)
a <- 2
If I execute "./pp.R" at the shell prompt, the output shows the timely
progress of the script as expected. If I use "./pp.R | tee
2005 Nov 20
1
mapply() gives seg fault (PR#8332)
--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Hi, people. Wandering in R archives, and seeing the message attached
below, I noticed that:
mapply(rep,times=1:4, MoreArgs=42)
still segfaults on R 2.2.0, and thought I should be a good citizen and
report it, even if I do not have an actual problem
2003 Oct 07
3
Problem getting an ifelse statment to work
This is a "long" way; i.e., not necessarily efficient:
> qs2
[1] 2 1 1 4 4 4 1 1 1 4 2 4 3 1 4 3 3 2 4 3
> qs9
[1] 4 4 1 3 4 3 1 3 1 4 1 2 3 3 4 4 1 4 2 3
> decision <- function(a, b) {
+ if (a == 1 || b == 1) return(1)
+ if (a == 2 || b == 2) return(2)
+ if (a == 3 || b == 3) return(3)
+ if (a == 4 || b == 4) return(4)
+ NA
+ }
> mapply(decision,
2006 Jul 16
2
Matrices given to pt? [was: [R] for loops and counters]
Hi, people.
I was a bit intrigued by the message quoted below. Indeed, if pt() is
given a matrix, it returns a matrix. Should this feature be documented?
?pt speaks about "a vector of quantiles", and says nothing about the
type of what it returns.
The same might presumably apply to other distribution-related functions.
----- Forwarded message from Martyn Plummer <plummer at
2005 Jul 27
5
HOW to Create Movies with R with repeated plot()?
Dear R-helpers,
Is it possible to create a type of 'movie' in R based on the output of
several figures (e.g., jpegs) via the plot() function. I obtained dynamic
results with the plotting function and would like to save these as a movie
(e.g., avi or other formats)?
Regards,
Jan
_________________________________________________________________
Ir. Jan Verbesselt
Research
2006 Jun 27
3
how to rotate a triangle image(ZMAT) ?
Hello R users...
how to align this Zmat (triangle image) in X axis?
I would like that the triangle's base become in the X
axis and
the triangle's height become in the Y axis
Is there some trick for make this?
Thanks.
Cleber
######################## my test and try
f <- function(x,y){
z=1-x-y
z[ z < (-1e-15) ] <- NA
return( -100*x+0*y+100*z )
}
x = seq( 1, 0,
2006 Jun 08
3
Re-binning histogram data
Hi,
Short Version:
Is there a function to re-bin a histogram to new, broader bins?
Long version: I'm trying to create a histogram, however my input-data is
itself in the form of a fine-grained histogram, i.e. numbers of counts
in regular one-second bins. I want to produce a histogram of, say,
10-minute bins (though possibly irregular bins also).
I suppose I could re-create a data set as
2006 May 10
1
Mere chat on vectorisation matters
Hi, people. Allow me to chat a tiny bit on two vectorisation-related
matters, in the context of R. I'm curious about if the following ideas
have ever been considered, and rejected already.
First is about using the so-called Duff's device for partially unrolling
loops. I did not overly check in R sources, and am not familiar with
them anyway, but the only usage I saw is within