similar to: Running *slow*

Displaying 20 results from an estimated 7000 matches similar to: "Running *slow*"

2011 Sep 12
3
Solve your R problems
R-help is all about solving R problems. So here ya go: http://www.portfolioprobe.com/2011/09/12/solve-your-r-problems/ -- Patrick Burns pburns at pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno')
2013 Feb 28
2
Fortune?
I think the rule is that you can do anything as long as you don't complain. If you want to complain, you must follow the instructions. -- Jari Oksanen in Re: [Rd] Keeping up to date with R-devel -- Patrick Burns pburns at pburns.seanet.com twitter: @burnsstat @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of: 'Impatient R' 'The R
2014 Jan 03
1
wishlist: decreasing argument to is.unsorted
I've just realized that it could be handy to have a 'decreasing' argument in 'is.unsorted'. And I'm cheekily hoping someone else will implement it. It is easy enough to work around (with 'rev'), but would be less hassle with an argument. The case I have in mind uses 'is.unsorted' in 'stopifnot'. Pat -- Patrick Burns pburns at pburns.seanet.com
2012 Jul 17
3
complexity of operations in R
Hello! I am optimizing my code in R and for this I need to know a bit more about the internals. It would help tremendously if someone could link me to a page with O()-complexities of all the operations. In this particular case, I need something like a linked list with O(1) insertLast/First ability. I can't preallocate a vector since I do not know the final size of the list ahead of time. The
2013 Mar 02
3
if value is in vector, perform this function
Hi, I'm trying to set up R to run a simulation of two populations in which every 3.5 days, the initial value of one of the populations is reset to 1.5. I'm simulation an experiment we did in which we fed Daphnia populations twice a week with algae, so I want the initial value of the algal population to reset to 1.5 twice a week to simulate that feeding. I've use for loops and if/else
2011 Nov 11
3
Why does length("") == 1?
It seems obvious to me that the empty string "" is length 0. cheers Worik [[alternative HTML version deleted]]
2012 Jan 26
2
What does [[1]] mean?
I know that [] is used for indexing. I know that [[]] is used for reference to a property of a COM object. I cannot find any explanation of what [[1]] does or, more pertinently, where it should be used. Thank you. [[alternative HTML version deleted]]
2012 Mar 03
1
"Global" Variable in R
Dear all, I would like to ask you if there is a way to define a global variable in R? I am having a bunch of function and I think the easier would be to have a global function defined at some point... Would that be possible? Regards Alex [[alternative HTML version deleted]]
2012 Jun 30
2
incorrect number of subscripts on matrix
Hi, Wondering if anyone could help me out with this error.Im trying to fill a matrix with random numbers taken from an exponential distribution using a loop: x.3<-matrix(rep(0,3000),nrow=1000,byrow=T)for(i in 1:1000){x[i,]<-rexp(3,rate=2/3)} I get the error message: Error in x[i, ] <- rexp(3, rate = 2/3) : incorrect number of subscripts on matrix Any ideas??? Appreciate any thoughts.
2013 Mar 25
3
nested 'while' loops
Hi everyone, I'm using the following code to go over every element of a data frame (row wise). The problem I am facing is that the outer 'x' variable is not incrementing itself, thus, only one row of values is obtained, and the program does not proceed to the next row. This is the code: while(x<=coln) { while(y<=rown) { n<-as.numeric(df[[y]][x]);
2012 Mar 05
2
no partial matching of argument names after dots argument - why?
I noticed that the argument names after the dots argument are not partially matched. foo <- function(one, two, ...){ one + two } > foo(o=1, t=2) [1] 3 foo <- function(one, ..., two){ one + two } > foo(o=1, t=2) Fehler in one + two : 'two' fehlt Can someone explain me the reason for this behavior? THX Mark ???????????????????????????????????? Mark Heckmann Blog:
2010 Dec 23
2
R-way to doing this?
Dear friends, hope I could be able to explain my problem through following example. Please consider this: > set.seed(1) > input <- rnorm(10) > input [1] -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078 -0.8204684 0.4874291 0.7383247 0.5757814 -0.3053884 > tag <- vector(length=10) for(i in 1:10) # if there is any ****error**** in evaluating
2011 Jan 06
1
Calcuting returns
Dear R forum helpers,I have following datatrans <- data.frame(currency_transacted = c("EURO", "USD", "USD", "GBP", "USD", "AUD"), position_amt = c(10000, 25000, 20000, 15000, 22000, 30000))date <- c("12/31/2010", "12/30/2010", "12/29/2010", "12/28/2010", "12/27/2010",
2012 Sep 05
1
run EGARCH package on REXCEl
Hi, I have limited experience on R and recently started using REXcel. Although I have been able to run both simple functions (like mean etc) and some complex ones (like Principal Component analysis, PCA) using RExcel, I am facing some problems while running EGARCH model. For this I have downloaded the 'betategarch' package for R to run EGARCH with student t dist. Although the package has
2011 Dec 23
3
if statement problem
Hello, I want to do fisher test for the rows in data file which has value less than 5 otherwise chi square test .The p values from both test should be stored in one resulted file. but there is some problem with bold if statement. I don't know how implement this line properly. x = cbind(obs1,obs2,exp1,exp2) a = matrix(c(0,0,0,0), ncol=2, byrow =TRUE) #matrix with initialized values
2011 Aug 29
3
Basic question about re-writing for loop as a function
Hello- Sorry to ask a basic question, but I've spent many hours on this now and seem to be missing something. I have a loop that looks like this: mainmat=data.frame(matrix(data=0, ncol=92, nrow=length(predata$Words_MH))) for(i in 1:length(predata$Words_MH)){ for(j in 1:92){ mainmat[i,j]=ifelse(j %in% as.numeric(unlist(strsplit(predata$Words_MH[i], split=","))),
2012 Dec 15
3
How to speed up the for loop by releasing memeory
Dear list; How can I speed up the run of following code (illustrative) #======================================================================== con<-vector("numeric") for (i in 1:limit) { if(matched data for the ith item found) { if(i==1) {con<-RowOfMatchedData } else {con<-rbind(con,matchedData)} } }
2012 Nov 27
2
Books for fully understanding internal logics on some packages(quantmod, xts, zoo and chron)
Hello, I'm very interested in using financial time series data, but I'm a beginner of R programming. I'd like to fully understand internal logics on several time-series related packages such as quantmod, xts, zoo, chron, etc. So, I read some books, 'R Cookbook' and 'Art of R Programming' and another simple tutorials. But I still can't understand grammars of the
2013 Mar 08
2
Unexpected behaviour of apply()
Hello everyone, Considering the following code sample : ---- indexes <- function(vec) { vec <- which(vec==TRUE) return(vec) } mat <- matrix(FALSE, nrow=10, ncol=10) mat[1,3] <- mat[3,1] <- TRUE ---- Issuing apply(mat, 1, indexes) returns a 10-cell list, as expected. Now if I do: ---- mat[1,3] <- mat[3,1] <- FALSE apply(mat, 1, indexes) ---- I would expect a
2012 Apr 17
3
Can a matrix have 'list' as rows/columns?
After a lot of processing I get a matrix into M. I expected each row and column to be a vector. But it is a list. R-Inferno says... "Arrays (including matrices) can be subscripted with a matrix of positive numbers. The subscripting matrix has as many columns as there are dimensions in the array—so two columns for a matrix. The result is a vector (not an array) containing the selected