similar to: Efficiency of local functions

Displaying 20 results from an estimated 7000 matches similar to: "Efficiency of local functions"

2000 Feb 11
1
Creating efficiently a subset of a matrix
Dear R-helpers I have the following problem: given a m x n matrix A, I want to have just a m x k submatrix B, with B[i,] = A[i, offset[i] + 1:k], e.g. from > offset <- c(0, 0, 1) > a <- matrix(1:9, 3) > a [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 the submatrix b 1 4 2 5 6 9 I can do this with a for loop or with sapply > b <-
2000 Sep 04
2
problems with R COMPILE in make
Dear R helpers I have a problem with R COMPILE. While the Makefile consisting of the lines SOURCES = imageio.c procbase.c readargs.c regSegs.c goodiesPH.c \ generalAnalysis.c edgeAggregation.c utilities.alga.c \ cs.parametrizing.c tst.so: $(SOURCES) R SHLIB -o $@ $(SOURCES) works fine, the Makefile with the target replaced by imageio.o: imageio.c R COMPILE imageio.c results in
2000 Sep 04
2
problems with R COMPILE in make
Dear R helpers I have a problem with R COMPILE. While the Makefile consisting of the lines SOURCES = imageio.c procbase.c readargs.c regSegs.c goodiesPH.c \ generalAnalysis.c edgeAggregation.c utilities.alga.c \ cs.parametrizing.c tst.so: $(SOURCES) R SHLIB -o $@ $(SOURCES) works fine, the Makefile with the target replaced by imageio.o: imageio.c R COMPILE imageio.c results in
2000 Jan 17
1
How to change several elements of an array simultaneously?
I have a matrix `m' and two vectors `rs' and `cs'. I want to change m at the positions (rs[1], cs[1]), (rs[2], cs[2]), ... to 1. Obviously I can do that by > m[rs + (cs-1) * dim(m)[1]] <- 1 but I would just be interested whether I am missing a more "intuitive" way of doing that. Thanks in advance, Peter ____________________________________________________________
2001 Mar 26
1
Problems with R CMD COMPILE within Makefile (PR#885)
Dear R-developpers This concerns a problem I posted about half a year ago on the R-help list and to which I got some answer by Duncan Temple Lang (see below), but the basic problem still continues. Even though I managed a workaround which is sufficient for me Martin Maechler asked me to send a toy example of the problem to R-bugs. So that's what I try here. The following Makefile will not
2000 Oct 02
4
Debugging dynloaded C-code with gdb
Dear R users I have started to use gdb for debugging dynloaded C code as described in `Writing R Extensions'. Unfortunately I have run into several problems that I haven't been able to solve: - using `n': how comes that the same line of code appears up to three times (and inbetween the next line and maybe even the second next one?) - using `print' resp. `display': How
2000 Jan 13
0
problems with understanding behaviour of glm
Dear R users, I don't understand, what happens in glm in the following example (note that in S-Plus this example finishes with an almost perfect fit, but also 49 warnings): > fit.small <- glm(SKR.ein.aus ~ ., family = binomial, data = daten, maxit=100) Error in (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, : inner loop 2; can't correct step size In addition:
1999 Jul 12
2
how to find index of maximum?
Dear R-users, Is there a simple way to find the index of the maximum of a vector? Ex. 1 3 6 2 result: 3 Thanks for any help, Peter ____________________________________________________________ Peter Holzer phone: + 41 1 632 46 34 Seminar fuer Statistik, SOL F7 fax: + 41 1 632 10 86 (Sonneggstr. 33) <holzer at stat.math.ethz.ch> ETH (Federal
1999 Feb 10
1
problems with read.table
Dear R users, I have the following problem: I have a table in ASCII-format, separated with commas. I can read it as long as no field contains a comma itself. If one does, read.table doesn't function even though that field is double-quoted. Ex.: File "test.csv": Name,Strasse,PLZ Jsaac,Gossauerstrassee 29,9100 Roth-Bernasconi,"20, ch. des Fauvettes",1212 adressen <-
2005 May 13
4
Encryption
Hi All, I am using rsync to backup our office server to our Internet server (RHE). As an association for doctors we are looking at providing a backup service for their practices using rsync. As it would be patient data it would need to be encrypted. I have found a few options, namely esync wurt rsyncrypto Does anyone have experience with the above and perhaps like to recommend one? On the
1998 Sep 03
2
a nasty error
Dear R-developers The basic function seq doesn't work properly: > seq(1,6,by=3) [1] 1 4 7 Looking at the source code of seq.default I found that strange fuzz thing "+ 0.4". Taking that away the seq works fine. My question is: Why has this fuzz thing been added? If it was for some rounding problems I would suggest to replace "0.4" by something much smaller. Peter
2006 Jun 23
7
malloc small pieces of memory
Hi I have a Problem with wine. I have one Program, that allogaces many small pieces with "malloc()" in the memory. "many" means over 2 Mio, "small" means "from 8 to 128 bytes" in size. Running this Program on Windows gives me ~300MB Memory Usage (according to one of the values in the Tast manager). In Linux, "top" shows me a physical Usage of
2000 Jan 10
5
bug in glm (PR#397)
Dear R-team As I didn't get any answer to my bug-report last week I have taken the effort and extracted a minimal data set from my data (see below) where the following bug occurs: > glm(SKR.ein.aus ~ ., family = binomial, data = bugdata, na.action = na.omit) Error in names<-.default(*tmp*, value = ynames) : names attribute must be the same length as the vector In addition: Warning
2003 Apr 16
1
lmcompatibility question
Hello I was wondering if there is a parameter that can be set in order to be able to run samba and communicate with a windows domain controller which sets a registry key called lmcompatibility to 5. I am running samba 2.2.5, and realize I may need to upgrade to a newer version. Could you give me a heads up on this capability. Thank you! Erika Holzer
2014 Sep 01
1
Correlation Matrix with a Covariate
R Help - I'm trying to run a correlation matrix with a covariate of "age" and will at some point will also want to covary other variables concurrently. I'm using the "psych" package and have tried other methods such as writing a loop to extract semi-partial correlations, but it does not seem to be working. How can I accomplish this? library(psych) > set.cor(y =
2017 Apr 18
1
Centos 7 Samba3 to Samba4 Migration "Trust Relation Failed"
Hi. I'm testing my migration from my PDC running Centos 5.x Samba3+OpenLDAP. to Centos7 Samba4 OpenLDAP 2.4.40 I had move all my settings and the server has all my users, in console I see all my info. Now, I connect a test machine that was on the same domain but I'm getting the bad message went I try to login with a domain user: 'The trust relation between this workstation and the
2009 Mar 30
1
what is R equivalent of Fortran DOUBLE PRECISION ?
I noticed taht R cannot understand certain Fortran real constant formats. For instance: c14 <- as.double( 7.785205408500864D-02) Error: unexpected symbol in " c14 <- as.double( 7.785205408500864D" The above "D" is used in Fortran language to indicate the memory starage mode. That is for instructing Fortran compiler to store such a REAL constant in DOUBLE
2008 Sep 25
0
Please help me interpret these results (fitting distributions to real data)
I just thought of a useful metaphore for the problem I face. I am dealing with a problem in business finance, with two kinds of related events. However, imagine you have a known amount of carbon (so many kilograms), but you do not know what fraction is C14 (and thus radioactive). Only the C14 will give decay events (and once that event has occurred, the atom that decayed will never decay
2017 Feb 10
0
Special use case : "diff" file
Going with just rsync you would have to maintain a local backup as well then use --write-batch to make a diff file to also upload to your offsite storage. Outside of rsync maybe rdiff-backup can do this easier? On 02/10/2017 11:20 AM, Florent B wrote: > Hi everyone, > > Sorry if I don't use the right words, but I don't know how to call what > I need, and I don't know if
2000 Feb 16
2
Embedding samba...
Hi All, I am working on a port of Samba to the uClinux/ColdFire system. This is a port of Linux running on the Motorola ColdFire processors. These processors have no MMU, so no virtual memory. It also means that there is no true fork() call, only a vfork() type primitive is supported. Other than this the fact that there is no MMU is pretty transparent applications, it looks like any other Linux