similar to: Very slow subsetting by name

Displaying 20 results from an estimated 400 matches similar to: "Very slow subsetting by name"

2010 Sep 08
0
Correction to vec-subset speed patch
I found a bug in one of the fourteen speed patches I posted, namely in patch-vec-subset. I've fixed this (I now see one does need to duplicate index vectors sometimes, though one can avoid it most of the time). I also split this patch in two, since it really has two different and independent parts. The patch-vec-subset patch now has only some straightforward (locally-checkable) speedups for
2005 Sep 30
3
Subscripting fails if name of element is "" (PR#8161)
Dear all, I resend this mail because it was blocked: I submitted a bug from the r-bug webpage and hypatia seems to block mail that is send from a different IP than that usually associated with the email. Looks like it is currently impossible to correctly submit bugs from the website. However, here is the original bug report: (PR#8161) Dear all, The following shows cases where accessing
2008 Nov 19
1
more efficient small subsets from moderate vectors?
This creates a named vector of length nx, then repeatedly draws a single sample from it. lkup <- function(nx, m=10000L) { tbl <- seq_len(nx) names(tbl) <- as.character(tbl) v <- sample(names(tbl), m, replace=TRUE) system.time(for(k in v) tbl[k], gcFirst=TRUE) } There is an abrupt performance degredation at nx=1000 > lkup(1000) user system elapsed 0.180
2004 Jun 15
1
Manova question.
Hi list, I'm attempting to re-create a Repeated Measures Compositional Analysis as described in the work by Aebischer et. al. (Ecology. 1993. 74(5): 1313-1325). In this paper they describe transitions of data into a log ratio difference matrix, from which they obtain two matrices using a monova routine. I am able to produce the second of the two matrices, but I'm having trouble
2013 Mar 13
2
merge datas
Hello all! I have a problem with R. I try to merge data like this: structure(c(2.1785, 1.868, 2.1855, 2.5175, 2.025, 2.435, 1.809, 1.628, 1.327, 1.3485, 1.4335, 2.052, 2.2465, 2.151, 1.7945, 1.79, 1.6055, 1.616, 1.633, 1.665, 2.002, 2.152, 1.736, 1.7985, 1.9155, 1.7135, 1.548, 1.568, 1.713, 2.079, 1.875, 2.12, 2.072, 1.906, 1.4645, 1.3025, 1.407, 1.5445, 1.437, 1.463, 1.5235, 1.609, 1.738, 1.478,
2013 Mar 12
5
extract values
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]>1820,]->x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007, 1.1795, 1.3855, 1.4065, 1.138, 1.514,
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964). month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009 1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920 2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2013 Apr 16
1
assistant
Dear Sir/Ma, I Adelabu.A.A, one of the R-users from Nigeria. When am running a coxph command the below error was generated, and have try some idea but not going through. kindly please assist: > cox1 <- coxph(Surv(tmonth,status) ~ sex + age + marital + sumassure, X) Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Ran out of iterations and did not
2000 Feb 17
2
"a.matrix[a.char.matrix]<- " crashes R (PR#447)
To wit: --- > junk <- array(3,c(10,3),dimnames=list(as.character(1:10),as.character(1:3))) > junk[cbind(as.character(1:5),as.character(c(1,2,3,2,3)))] <- 20 > > junk Process R segmentation violation (core dumped) at Wed Feb 16 15:57:49 2000 --- I know that the use of a ***character*** matrix is not documented for this context. Still, it should not crash R. In addition to
2005 Mar 16
2
how to draw xyplot figure like figure 4.18 of MASS (4th) ?
Dear All: Could you please tell me how I can draw figure formatted like figure 4.18 of MASS (4th) with the attached data set? Thanks Zhongming Yang --------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sample.txt Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050316/abfdb85e/sample.txt
2007 May 10
5
Segmentation fault on large index
I''m getting a segmentation fault on a large index (15GB). I''m running ferret 0.11.4 on OpenSuSE 10.2 with ruby 1.8.6. The segmentation fault appeared after I optimized the index, see further below for the error message I got before that. Ferret works perfectly on other (smaller) indexes. Is this a known issue, and if so, is there a workaround? --------------------- after
2015 May 03
4
can't disable tcp6 on centos 7
> > It's listening on both IPv6 and IPv4. Specifically, why is that a problem? The central problem seems to be that the monitoring host can't hit nrpe on port 5666 UDP. [root at monitor1:~] #/usr/local/nagios/libexec/check_nrpe -H puppet.mydomain.com CHECK_NRPE: Socket timeout after 10 seconds. It is listening on the puppet host on port 5666 [root at puppet:~] #lsof -i :5666
2007 Sep 28
2
simple matching with R
Hello! I am R beginner and I have a question obout a simple matching. I have to datasets that i read in with: MalVar29_37<-read.table("MalVar29_37.csv", sep = ";") FemVar29_37<-read.table("FemVar29_37.csv", sep = ";") They look like this and show binary variables: V1 V2 V3 V4 V5 V6 V7 V8 V9 1 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 1
2009 Sep 16
1
What is the difference between double quote (") and single quote (')?
Hi, According to my understand of the description in R-intro, double quote and single quote are the same. Can somebody confirm if this is the case? Regards, Peng
2017 Oct 01
0
Revert to R 3.2.x code of logicalSubscript in subscript.c?
Currently, in function 'logicalSubscript' in subscript.c, the case of no recycling is handled like the implentation of R function 'which'. It passes through the data only once, but uses more memory. It is since R 3.3.0. For the case of recycling, two passes are done, first to get number of elements in the result. Also since R 3.3.0, function 'makeSubscript' in subscript.c
2009 May 20
2
How to load data from Statistics Canada
We would like to load data from Statistics Canada (http://www.statcan.gc.ca/) using R, for example, Employment and unemployment rates. It seems to me that the tables are displayed in HTML. I was wondering if you know how to load these tables. Thanks, -james
2005 Jun 29
1
poly() in lm() leads to wrong coefficients (but correct residuals)
Dear all, I am using poly() in lm() in the following form. 1> DelsDPWOS.lm3 <- lm(DelsPDWOS[,1] ~ poly(DelsPDWOS[,4],3)) 2> DelsDPWOS.I.lm3 <- lm(DelsPDWOS[,1] ~ poly(I(DelsPDWOS[,4]),3)) 3> DelsDPWOS.2.lm3 <- lm(DelsPDWOS[,1]~DelsPDWOS[,4]+I(DelsPDWOS[,4]^2)+I(DelsPDWOS[,4]^3)) 1 and 2 lead to identical but wrong results. 3 is correct. Surprisingly (to me) the residuals
2012 May 23
0
gam (mgcv) vs. multiple regression breakpoint analysis: inconsistencies?
Dear useRs, I have a question with respect to fitting a non-linearity using gam (mgcv package, version 1.7-16). In a study I'm currently conducting, I'd like to find out if there is a breakpoint after which the effect of Age of Acquisition (AOA) of the second language changes. I.e. if the slope of AOA before the breakpoint (at a certain AOA) is different from the slope past the
2015 May 03
3
can't disable tcp6 on centos 7
hey all, I tried disabling tcp v6 on a C7 box this way: [root at puppet:~] #cat /etc/sysctl.conf # System default settings live in /usr/lib/sysctl.d/00-system.conf. # To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file # # For more information, see sysctl.conf(5) and sysctl.d(5). net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6
2006 May 11
2
greco-latin square
Hi, I am analyzing a repeated-measures Greco-Latin Square with the aov command. I am using aov to calculate the MSs and then picking by hand the appropriate neumerator and denominator terms for the F tests. The data are the following: responseFinger mapping.code Subject.n index middle ring little ---------------------------------------------------------------------------- 1 1