similar to: Code Optimization: print.data.frame + as.data.frame(head(x, n = options("max.print")))

Displaying 20 results from an estimated 6000 matches similar to: "Code Optimization: print.data.frame + as.data.frame(head(x, n = options("max.print")))"

2009 Oct 10
1
isFALSE
Hello, Just wondering why there is "isTRUE" and not "isFALSE". Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/BcPw : celebrating R commit #50000 |- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc `- http://tr.im/yw8E : New R package : sos -------------- next part -------------- An
2018 Mar 14
0
Possible Improvement to sapply
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>> on Tue, 13 Mar 2018 10:12:55 -0700 writes: > FYI, in R devel (to become 3.5.0), there's isFALSE() which will cut > some corners compared to identical(): > > microbenchmark::microbenchmark(identical(FALSE, FALSE), isFALSE(FALSE)) > Unit: nanoseconds > expr
2018 Mar 13
2
Possible Improvement to sapply
FYI, in R devel (to become 3.5.0), there's isFALSE() which will cut some corners compared to identical(): > microbenchmark::microbenchmark(identical(FALSE, FALSE), isFALSE(FALSE)) Unit: nanoseconds expr min lq mean median uq max neval identical(FALSE, FALSE) 984 1138 1694.13 1218.0 1337.5 13584 100 isFALSE(FALSE) 713 761 1133.53 809.5 871.5
2018 Mar 13
1
Possible Improvement to sapply
Could your code use vapply instead of sapply? vapply forces you to declare the type and dimensions of FUN's output and stops if any call to FUN does not match the declaration. It can use much less memory and time than sapply because it fills in the output array as it goes instead of calling lapply() and seeing how it could be simplified. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue,
2018 Mar 13
0
Possible Improvement to sapply
Quite possibly, and I?ll look into that. Aside from the work I was doing, however, I wonder if there is a way such that sapply could avoid the overhead of having to call the identical function to determine the conditional path. From: William Dunlap [mailto:wdunlap at tibco.com] Sent: Tuesday, March 13, 2018 12:14 PM To: Doran, Harold <HDoran at air.org> Cc: Martin Morgan <martin.morgan
2019 Aug 15
4
Feature request: non-dropping regmatches/strextract
A very common use case for regmatches is to extract regex matches into a new column in a data.frame (or data.table, etc.) or otherwise use the extracted strings alongside the input. However, the default behavior is to drop empty matches, which results in mismatches in column length if reassignment is done without subsetting. For consistency with other R functions and compatibility with this use
2019 Mar 02
1
stopifnot
A private reply by Martin made me realize that I was wrong about stopifnot(exprs=TRUE) . It actually works fine. I apologize. What I tried and was failed was stopifnot(exprs=T) . Error in exprs[[1]] : object of type 'symbol' is not subsettable The shortcut assert <- function(exprs) stopifnot(exprs = exprs) mentioned in "Warning" section of the documentation similarly fails
2012 May 20
2
Remus network buffering problem
Hi all, I have a following problem: - Remus network buffering doesn''t work. It seems to be because of no vif is reported by the function server.xend.domain on line 29 of /usr/local/lib/python2.7/dist-packages/xen/remus/vm.py (seen using pdb) : 27 if domid: 28 try: 29 self.dominfo = server.xend.domain(domid, ''all'') >
2010 Aug 10
4
Function to Define a Function
I am trying to define a general R function that has a function as the output that depends on the user's input arguments (this may make more sense by looking at the toy example below). My real use for this type of code is to allow a user to choose from many parameterizations of the same general model. My "issue" is that when I compile a package with this type of code in it I get a
2012 Apr 03
3
regression for poisson distributed data
Hello all, I would like to get parameter estimates for different models. For one of them I give the code in example. I am estimating the parameters (i,j and k) with the nls function, which sees the error distribution as normal, I would however like to do the same as nls with the assumption that the errors are poisson distributed. Is there a way to do this with R? Are there packages designed
2006 Jul 03
2
help a newbie with a loop
Hi, I am new in R and stumbled on a problem my (more experienced) friends can not help with with. Why isnt this code working? The function is working, also with the loop and the graph appears, only when I build another loop around it (for different values of p) , R stays in a loop? Can't it take more then 2 loops in one program? powerb<-function(x,sp2,a,b,b1,m) {
2012 Feb 10
4
qemu-xen qdisk performance
Hello, I''ve recently setup a Linux Dom0 with a 3.0.17 kernel and Xen 4.1.2, and since the 3.x series doesn''t have blktap support I''m using qdisk to attach raw images. I''ve been playing with small images, something like 1GB, and everything seemed fine, speed was not fantastic but it was ok. Today I''ve set up a bigger machine, with a 20GB raw hdd and the
2010 Oct 21
4
data.frame query
Hi All, Apologies for the simplicity of my question, but I would be grateful for any advice. Thanks I'm trying to put the output from a for loop into a data frame, however I have not been successful. The steps I have taken are: *R-code:* >for (k in 1:(nt-1-n0) ){ > n<- n0-1+k > lam=n/nt > Q=x[n] > output1<-data.frame(cbind(k,n,lam,Q)) > output1 > }
2019 Mar 05
2
stopifnot
Another possible shortcut definition: assert <- function(exprs) do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) After thinking again, I propose to use ??? ? ? stop(simpleError(msg, call = if(p <- sys.parent()) sys.call(p))) - It seems that the call is the call of the frame where stopifnot(...) is evaluated. Because that is the correct context, I
2008 Jan 29
2
Using Predict and GLM
Dear R Help, I read through the archives pretty extensively before sending this email, as it seemed there were several threads on using predict with GLM. However, while my issue is similar to previous posts (cannot get it to predict using new data), none of the suggested fixes are working. The important bits of my code: set.seed(644) n0=200 #number of observations
2012 Jun 05
1
- help with the predict function
Hi all, I would like to predict some values for an nls regression function (functional response model Rogers type II). This is an asymptotic function of which I would like to predict the asymptotic value I estimated the paramters with nls, but can't seem to get predictions for values of m choice...... This is my script: RogersII_N <-
2011 Mar 30
2
[PATCH] xenstore-stat v2
The entries in xenstore have permission attributes. The attributes can be easily altered by xenstore-chmod, however, I cannot find a easy way to see them. I''ve modified xenstore_client.c to raise a new utility. The utility checks the permission and makes an easy-look output. Please tell me any suggestions. Thanks. Signed-off-by: Frank Pan <frankpzh@gmail.com> ---
2019 Mar 13
2
llvm combines "ADD frameindex, constant" to OR
Hi all, I've been working on a backend of our architecture and noticed llvm performs following combining although one of operands is FrameIndex. Combining: t114: i64 = add FrameIndex:i64<0>, Constant:i64<56> Creating new node: t121: i64 = or FrameIndex:i64<0>, Constant:i64<56> ... into: t121: i64 = or FrameIndex:i64<0>, Constant:i64<56> This
2008 Oct 29
2
Help using tapply with multiple variables
Dear list, I have the function (as a simple example, which is actually part of a larger function) pres.test<-function(N0=N0, N1=N1) { dt<-5 r<-log(N1/N0)/dt r } which calculates the annual growth rates in a population Where N0 is the population classified into age intervals, say 5 years, at time=1995, and N1 is the population by 5 year age classes at time=2000.
2002 Aug 07
2
indexing matrices with dimnames?
I've got a covariance matrix that I'd like to index using the dimnames: > vcov1 n0 x0 s n1 n2 n0 82.43824759 1.839505e-02 -4.975196e-01 2.882394e+03 -2.615986e-01 x0 0.01839505 6.134010e-03 -7.695922e-04 -6.373946e+01 6.086321e-03 s -0.49751964 -7.695922e-04 9.638943e-03 3.406594e+02 -3.173671e-02 n1 2882.39407745