similar to: Rprof causing R to crash

Displaying 20 results from an estimated 2000 matches similar to: "Rprof causing R to crash"

2011 Feb 17
1
cv.glmnet errors
Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5, nfolds=2) The error i get is: Error in if (outlist$msg != "Unknown error") return(outlist) : argument is of
2009 Jun 12
1
Rprof loses all system() time
Rprof seems to ignore all time spent inside system() calls. E.g., this simple example actually takes about 10 seconds, but Rprof thinks the total time is only 0.12 seconds: > Rprof("sleep-system.out") ; system.time(system(command="sleep 10")) ; Rprof(NULL) user system elapsed 0.000 0.004 10.015 > summaryRprof("sleep-system.out")$by.total
2007 Mar 31
1
Probem with argument "append" in "Rprof"
Hello, Appending information to the profiler's output seems to generate problems. Here is a small example of code : <code r> require(boot) Rprof( memory.profiling = TRUE) Rprof(NULL) for(i in 1:2){ Rprof( memory.profiling = TRUE, append = TRUE) example(boot) Rprof(NULL) } </code> The problem is that the file Rprof.out contains more than once the header information: $ grep
2001 Oct 23
2
Possible bug, Rprof() and scan(pipe()) (PR#1140)
This looks like a bug? Unable to use scan(pipe()) while profiling. I have no idea whether this version of R violates the "do not use `Rprof' in an executable built for profiling" warning in ?Rprof. Thanks -Don > version _ platform powerpc-apple-darwin1.4 arch powerpc os darwin1.4 system powerpc, darwin1.4 status Patched major 1 minor 3.1 year
2002 Jun 11
2
Puzzled by what Rprof is telling me
I am using Rprof() to help find ways to improve performance. I found a function whose total seconds and self seconds were large. I replaced it with something else. The something else had a small number of total seconds and self seconds. But the total time did not decrease. I don't understand how that could be, and would appreciate any suggestions. Thanks -Don Details, unfortunately
2002 Jul 19
1
Rprof and setMethod conflict?
I noticed this oddity about R profiling and setMethod. First, I "test out" Rprof. > require(methods) Loading required package: methods [1] TRUE > > Rprof("test.out") > data.frame("a") X.a. 1 a > Rprof(NULL) So far, so good. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1]
2003 Jul 15
1
Rprof
I find it difficult to find Rprof using the usual search tools... could I suggest that it be cross-referenced to profile Rprofile Profile to make this easier? url: www.econ.uiuc.edu/~roger/my.html Roger Koenker email rkoenker@uiuc.edu Department of Economics vox: 217-333-4558 University of Illinois fax: 217-244-6678 Champaign, IL 61820
2005 Jul 21
3
Rprof fails in combination with RMySQL
Dear R community, I tried to optimized my R code by using Rprof. In my R code I'm using MySQL database connections intensively. After a bunch of queries R fails with the following error message: Error in .Call("RS_MySQL_newConnection", drvId, con.params, groups, PACKAGE = .MySQLPkgName) : RS-DBI driver: (could not connect mylogin@mydatabase on dbname "myDB"
2007 Nov 24
2
unexpected result from reshape
Hi all. I have unexpected reshape results on datasets with certain variable names. Here a reproducible example: d <- matrix(seq_len(7*7), 1, 7*7) vnames <- c('acc','ppeGross','CF','ROA','DeltaSales','invTA','DeltaRevDeltaRec') varying <- unlist(lapply(vnames, paste, 1:7, sep='.')) d <- data.frame(d) names(d) <- varying
2002 Nov 16
1
using the function "expression" with "paste" in a plot
Hi, I noticed that paste and expression in the following manner does not produce the desired result. vnames=c("pi","y","delta") vx=vn=3 m=16 # mydata any matrix that takes for the following form mydata=array(somedata,c(m,vn,vx)) # producing plots for (j in 1:vx){ for (i in 1:vn) { plot(mydata, type="l", main=expression(paste("Effect of",
2018 May 03
4
adding overall constraint in optim()
Hi ? This is giving me a headache. I?m trying to do a relatively simple optimization ? actually trying to approximate the output from the Excel Solver function but at roughly 1000x the speed. ? The optimization parameters look like this. The only trouble is that I want to add a constraint that sum(wgt.vect)=1, and I can?t figure out how to do that in optim. Mo.vect <-
2006 Sep 04
3
Subsetting vectors based on condition
Hello, I have a question regarding subsetting of vectors. Here's an example of what I'm trying to do: vect.1 <- c(76,195, 290, 380) vect.2 <- c(63, 95, 133, 170, 215, 253, 285, 299, 325, 375) I would like to subset vect.2 so that it has the same length as vect.1, and its numbers are the first corresponging higher value compared to vect.1. The output should be: final.output =
2008 Jun 09
1
Cross-validation in R
Folks; I am having a problem with the cv.glm and would appreciate someone shedding some light here. It seems obvious but I cannot get it. I did read the manual, but I could not get more insight. This is a database containing 3363 records and I am trying a cross-validation to understand the process. When using the cv.glm, code below, I get mean of perr1 of 0.2336 and SD of 0.000139. When using a
2004 May 13
0
Rprof ignores top-level computation (PR#6883)
Full_Name: John Garvin Version: 1.9.0 OS: Linux Submission from: (NULL) (128.42.129.78) This may or may not technically be a bug, but it's certainly an annoyance. Rprof only takes into account computation that occurs inside functions. If a time-consuming operation occurs outside a function, it doesn't record the time it takes. Consider this program 'array.r': Rprof() foo <-
2018 May 06
1
adding overall constraint in optim()
Hi Michael, A few comments 1. To add the constraint sum(wgt.vect=1) you would use the method of Lagrange multipliers. What this means is that in addition to the w_i (the components of the weight variables) you would add an additional variable, call it lambda. Then you would modify your optim.fun() function to add the term lambda * (sum(wgt.vect - 1) 2. Are you sure that you have defined
2018 May 03
0
adding overall constraint in optim()
You can't -- at least as I read the docs for ?optim (but I'm pretty ignorant about this, so maybe there's a way to tweak it so you can). See here: https://cran.r-project.org/web/views/Optimization.html for other R optimization capabilities. Also, given your credentials, the r-sig-finance list might be a better place for you to post your query. Cheers, Bert Bert Gunter
2018 May 03
2
adding overall constraint in optim()
Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > On May 3, 2018, at 3:01 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > You can't -- at least as I read the docs for ?optim (but I'm pretty > ignorant
2010 Sep 23
0
R CMD Rprof --help suggestion
Hi, >From reading ?Rprof, I checked R CMD Rprof --help and learned that there are options to specify the min % to print. This is currently (R-devel r52975) displayed with the --help option as --min%total minimum % to print for 'by total' --min%self minimum % to print for 'by self' So I tried R CMD Rprof --min%total 5 and got an error. After looking at
2018 May 04
0
adding overall constraint in optim()
On Thu, May 3, 2018 at 2:03 PM, Michael Ashton <m.ashton at enduringinvestments.com> wrote: > Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > I'm very confused by these statements. Most of the "finance tools"
1999 Sep 02
1
count of factors
Hello, I was used to count how many times every factor is found the following way : (assuming 'vect' is a vector of factors) tapply(vect,vect,length) but recently I experienced weird results with this In fact, my command line was tapply(ORGMORE[[1]][vect],ORGMORE[[1]][vect],length) where - 'vect' is a vector of indices - 'ORGMORE[[1]]' is a slightly long vector of