similar to: stacking vectors of unequal length

Displaying 20 results from an estimated 10000 matches similar to: "stacking vectors of unequal length"

2004 Apr 02
3
Doing SQL GROUP BY in R
I want a list of the number of times some factor levels appear together, similar to the following SQL statement: SELECT A, B, COUNT(C) FROM TBL GROUP BY A, B How do I do that with a data.frame in R? Thanks, Jesper Frickmann Statistician, Quality Control Novozymes North America Inc. 77 Perry Chapel Church Road Franklinton, NC 27525 USA Tel. +1 919 494 3266 [[alternative HTML version deleted]]
2008 Apr 16
1
segments() with zero-length arguments (PR#11192)
Uwe Ligges suggested I post this on R-bugs as a wishlist item with a proposed patch. R considers zero-length arguments to segments() to be an error. I would like R to allow this and to return without an error. It occurs naturally in settings like valid <- c(FALSE, FALSE, FALSE) segments(x0[valid], y0[valid], x1[valid], y1[valid]) For what it may be worth, S-Plus does not consider
2012 Apr 07
6
Drawing a line in xyplot
i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]), median(mortality[type==2])), lwd=5,col=2) lines ( c(3-0.375,3.375) , c ( median(mortality[type==3]),
2017 Jun 19
1
arrows: no vectors for "code" and "angle" parameters
I was teaching new R users to make some fun graphs. I had some arrows examples worked up we came across a problem. The arrows function ignores 2nd and following elements of vectors given as code an angle. Would you please consider 1) allowing vectors for code and angle, or 2) returning an error or warning when user mistakenly supplies a vector for those parameters? When code like this is
2009 Jun 19
1
Drawing dendrogram
Dear all, I would like to draw a dendrogram and mark some parts/branches (by using "segments") including their labels. If I draw it without specifying the length of x axix, I am able to do that (as in My dendrogram 1 of the following codes). However, if I want to specify the x axix, I am not able to draw marking line (by using "segments") including labels (as in My dendrogram
2000 Nov 26
5
Another good optimization (for PPC only, though)
Using the PPC frsqrte and fres instructions, I got the percentage time take in the smoothing code in _vp_compute_mask() down from 13.64% to 1.88% of the running time. In my local copy of Vorbis I have a fast_math.[hc] in vorbis/lib and have a _fast_sqrt() inline in fast_math.h. If anyone else wants to try it out, it follows. I can currently encode my test file (the first 15 seconds of
2017 Apr 26
3
Store unswitch
Thanks, Looks like inst combine do the job On Tue, Apr 25, 2017 at 9:36 PM, Davide Italiano <davide at freebsd.org> wrote: > On Tue, Apr 25, 2017 at 9:24 PM, Hongbin Zheng via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Hi, > > > > Is there a pass in LLVM that can optimize: > > > > if (x) > > a[i] = y0; > > else > >
2002 Jun 17
3
Error bars.
There was an inquiry on this list recently about plotting some simple error bars on a graph. Now Splus has a function (error.bar --- originally written by Sue Clancy of DMS, CSIRO, I believe) to do this job virtually at the touch of a key. (Well a few keys. :-) ) The error.bar function is written completely in raw S --- no calls to ``.Internal'' or anything like that. So it would be
2005 Mar 29
2
matching vectors against vectors
Hi all. I have a re-occuring typical problem that I don't know how to solve efficiently. The situation is the following: I have a number of data-sets (A,B,C,...) , consisting of an identifier (e.g. 11,12,13,...,20) and a measurement (e.g. in the range 100-120). I want to compile a large table, with all availabe identifiers in all data-sets in the rows, and a column for every
2008 Feb 09
2
shortest distance between two point pattern
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080208/bf7b4696/attachment.pl
2012 Apr 27
4
To make a graph for 4 functions
lets say I have these function and I want to have a graph on them y0=x^2 y1=x^3 Then I say this x=seq(0,10,length.out=100) plot(x,y0,y1,type="l") but R does not give me a graph. How would you do it? -- View this message in context: http://r.789695.n4.nabble.com/To-make-a-graph-for-4-functions-tp4592941p4592941.html Sent from the R help mailing list archive at Nabble.com.
2017 Dec 13
0
Add vectors of unequal length without recycling?
Without recycling you would get: u <- c(10, 20, 30) u + 1 #[1] 11 20 30 which would be pretty inconvenient. (Note that the recycling rule has to make a special case for when one argument has length zero - the output then has length zero as well.) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Dec 12, 2017 at 9:41 PM, Maingo via R-help <r-help at r-project.org> wrote:
2006 Oct 15
4
Hide line ends behind unfilled circles?
Dear r-helpers, xx <- c(0.000, 0.210, 0.714, 0.514, 1.000, 0.190, 0.590, 0.152) yy <- c(0.000, 0.265, 0.256, 0.521, 0.538, 0.761, 0.821, 1.000) aa <- c(19, 19, 19, 21, 19, 21, 21, 21) x0 <- xx[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)] y0 <- yy[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)] x1 <- xx[c(2, 3, 3, 4, 6, 4, 5, 5, 6, 7, 7, 7, 8, 8)] y1 <- yy[c(2, 3, 3, 4, 6, 4, 5,
2005 May 05
3
documenation for arrows() is backwards (PR#7839)
Full_Name: Michael Hoffman Version: 2.1.0 OS: Linux (Fedora Core 3, kernel 2.6.11-1.14_FC3) Submission from: (NULL) (193.62.199.8) help(arrows) says: """ arrows(x0, y0, x1, y1, length = 0.25, angle = 30, code = 2, col = par("fg"), lty = NULL, lwd = par("lwd"), xpd = NULL) ... If 'code=2' an arrowhead is drawn at
2017 Apr 26
2
Store unswitch
Hi, Yes, I can see why that would not work. The sinking algorithm in SimplifyCFG isn't particularly clever. In particular it can't reason about memory ordering and aliasing. In unswitch1(), it can identify that the stores correlate because the correlating stores appear in the same relative source order. In unswitch2() they have been permuted, and the algorithm cannot deal with this. This
2009 Oct 02
1
suggest enhancement to segments and arrows to facilitate horizontal and vertical segments
I suggest a simple enhancement to segments() and arrows() to facilitate drawing horizontal and vertical segments -- set default values for the second x and y arguments equal to the first set. This is handy, especially when the expressions for coordinates are long. Compare: Segments: < function (x0, y0, x1 = x0, y1 = y0, col = par("fg"), lty = par("lty"), --- > function
2010 Dec 13
3
curve
Hi All, I generated 5000 samples using the following script test<- rnorm(5000,1000,100) test1 <- subset(test, subset=(test > 1100)) d <- density(test) plot(d, main="Density of production") abline(v=mean(test1) I wanted to do the following but faced difficulties 1. to shade or color (blue) the curve using the criterion that any
2005 May 20
1
bootstrapping vectors of unequal length
Dear R Help List, I have a vector of n and a vector of n-1 and I want to use boot() to bootstrap the ratio of their respective medians. I want to eventually use boot.ci() to generate confidence intervals. Because the vectors are not equal in length, I tried a few things, but have yet to be successful. Try 1: > x <- runif(20) > > y <- c(runif(19), NA) > > median(x) [1]
2002 Aug 15
2
complex splits
Hi everyone, I'm having trouble figuring out how to split a dataframe more than once. Let's say I have a dataframe d with a certain column called splitcol composed of four possible ordinal values. The same dataframe has two other columns, col1 and col2, that have one of two possible values each. I'd like to split d$splitcol based on col1 and col2 so I can report frequencies of the
2013 Sep 19
3
lattice: double y - problem changing axis color after doubleYScale
Hi, I have had some troubles using doubleYScale. No matter what I try, I cant manage to change the color of the y-axis in the end. I have to produce a black and white plot. There is also something I do not understand regarding fontfamilyj="serif" when using it in: strip=strip.custom() Maybe someone has a better idea for defining which line and dots belong to which y-axis when not using