similar to: Dealing with 1000+ sequentially named vectors

Displaying 20 results from an estimated 20000 matches similar to: "Dealing with 1000+ sequentially named vectors"

2011 Jul 05
4
Create a data frame of all possible unique combinations of factors
Hello, I'm trying to create a data frame where each row has a unique combination of factors. I start with a vector of species like so: > 1> test <- c("A","B","C","D") > > 1> test > > [1] "A" "B" "C" "D" > To get all species combinations I have used expand.grid like this:
2012 Jan 21
2
sequentially summing up a elements of a vector
Hi, I have a somewhat abstract and tricky problem (at least for me). Perhaps someone here can help me: I would like to convert: x <- c(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0) into x <- c(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4) every 1 in x marks kind of a 'border' which is separated in different 'regions' in the
2018 Oct 26
1
Rmpfr: build vector sequentially -- c(.) not working
I've been asked in private, but am answering in public so others can comment / or find this answer in the future after a web search. This is about the package 'Rmpfr' (R interface to MPFR, the GNU C library for arbitrary precise numbers). > How can you build a vector of mpfr numbers sequentially? > Typically I would do something like the following (and try to > replace the
2004 Apr 08
1
Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply
First, here's the problem I'm working on so you understand the context. I have a data frame of travel activity characteristics with 70,000+ records. These activities are identified by unique chain numbers. (Activities are part of trip chains.) There are 17,500 chains. I use the chain numbers as factors to split various data fields into lists of chain characteristics with each element of
2012 Aug 24
6
updating elements of a vector sequentially - is there a faster way?
I would like to know whether there is a faster way to do the below operation (updating vec1). My objective is to update the elements of a vector (vec1), where a particular element i is dependent on the previous one. I need to do this on vectors that are 1 million or longer and need to repeat that process several hundred times. The for loop works but is slow. If there is a faster way, please let
2010 Mar 02
1
Output to sequentially numbered files... also, ideas for running R on Xgrid
Hello, I have some code to run on an XGrid cluster. Currently the code is written as a single, large job... this is no good for trying to run in parallel. To break it up I have basically taken out the highest level for-loop and am planning on batch-running many jobs, each one representing an instance of the removed loop. However, when it comes to output I am stuck. Previously the output was
2010 Aug 11
1
Adding points sequentially to multiple graphs in one window (device)
Dear R-help list: I have want seems to be a simple task, but can't find a solution. I tried querying the archives, but did not succeed. My goal is to set up two (or more) graphs in one graph window, and then during execution of a sequential algorithm add points sequentially to these graphs. The graphs have different scales / coordinates. I use the par(mfg...) command to switch between
2008 Nov 13
2
growing a list sequentially -- memory management
hello, i have something like: out<-list() for(i in 1:n){ data<-gen(...) #fixed size data out[[i]]<- fun(data) } > object.size(out[[1]]) 6824 In principle 1 GB should allow n = 1024^3/6824 = 157347? i have about 2GB are not taken by other processes. however, I can see the memory shrinking quite rapidly on my system monitor and have to stop the simulation after only n=300. why
2007 May 21
2
sequentially process a list
Hi dear R users, I'm a R beginner and I have a basic question about sequential treatments of lists. I have a time based (i.e. events are consecutive) list of values of a biological property. Like : time value 1 5 2 10 3 7 4 10 5 19 6 21 7 20 8 18 9 10 10 7 11 8 12 12 13 17 14 19 15 24 16 18 17 15 18
2011 Oct 18
1
How to read data sequentially into R (line by line)?
I have a data set like this in one .txt file (cols separated by !): APE!KKU!684! APE!VAL!! APE!UASU!! APE!PLA!1! APE!E!10! APE!TPVA!17122009! APE!STAP!1! GG!KK!KK! APE!KKU!684! APE!VAL!! APE!UASU!! APE!PLA!1! APE!E!10! APE!TPVA!17122009! APE!STAP!1! GG!KK!KK! APE!KKU!684! APE!VAL!! APE!UASU!! APE!PLA!1! APE!E!10! APE!TPVA!17122009! APE!STAP!1! GG!KK!KK! it contains over 14 000 000 records. Now
2010 Jan 12
1
Best way of dealing with Case-Sensitive Issues in Dovecot
In order to deal with case-sensitive issues, I am thinking to use the variable %L (adding it to my current configs --as suggested before by other users in this list) in the configuration files in this way: In Dovecot.conf: mail_location = maildir:/vmail/%Ld/%Ln/Maildir:INDEX=/indexes/%Ld/%Ln auth default: username_format: %Lu passdb: driver: sql args:
2015 Jul 15
2
How to dial extensions asynchronous-sequentially ?
Heya Rodrigo Not sure, but this expansion on Sammy's concept may help you achieve the delayed ring on the secondary extensions you were looking for. exten => _600.,1,Dial(PJSIP/${EXTEN}) exten => _600.,n,Hangup exten => _600.wait5,1,Wait(5) exten => _600.wait5,n,Dial(PJSIP/${EXTEN:0:4}) exten => _600.wait5,n,Hangup exten => 555,1,Dial(LOCAL/6001&LOCAL/6002.wait5)
2015 Jul 13
3
How to dial extensions asynchronous-sequentially ?
Hi. I my dialplan I have : same = n,Dial(PJSIP/6001,10) same = n,Dial(PJSIP/6002,30) same = n,Hangup() The extension 6002 will not be invited until the called party 6001 hangs up or until 10 seconds if nobody answers the call in 6001. How to call 6001 and immediately call 6002, having 2 phones ringing at same time, but without doing something like this : same =
2011 Feb 24
4
Running code sequentially from separate scripts (but not functions)
Hello! I am wondering if it's possible to run - in sequence - code that is stored in several R scripts. For example: Script in the file "code1.r" contains the code: a = 3; b = 5; c = a + b Script in the file "code2.r" contains the code: d = 10; e = d - c Script in the file "code3.r" contains the code: result=e/a I understand that I could write those 3 scripts
2010 May 12
3
summing items within a row
Hello, I am trying to figure out how to do a sum of items within a row. For example, I have a data frame something like this: A1 B1 ... A2 B2 ... 1 1 4 1 4 2 2 5 2 5 3 3 6 3 6 What I want, is for each row, to get A1 + A2, B1 + B2, etc. which would, perhaps, give me a vector something like this c(2, 8, ... 4, 10 ... 6, 12). Does anyone know of a simple
2005 Jan 19
2
Referencing objects within a loop
Dear List: It appears that simulating data where all dataframes are stored as a list will only work for relatively small analyses. Instead, it appears that creating N individual dataframes, saving them, and loading them when needed is the best way to save memory and make this a feasible task. As such, I now have a new(er) question with respect to dealing with individual files within a loop. To
2009 Jul 15
1
Averaging dataframes that are stored in a list
Dear R-helpers, I have a list containing 5000 elements, each element is a dataframe containing one ID column (identical over the 5000 dataframes) and 9 numeric variables, e.g. ID VAR1 VAR2 VAR3 ... VAR9 I would like to create a new dataframe containing the ID column and the mean values of the 9 numeric variables. So, the structure of this new dataframe would be identical to the structure of the
2015 Jul 13
3
RES: How to dial extensions asynchronous-sequentially ?
Hi SamyGo. Thank you for the replay. So, let me explain it better: I knew that I could use something like " same = n,Dial(PJSIP/6001&PJSIP/6002) ". While every extension (called phones) rings and before anyone answers, SIP 183 messages will be sent to Asterisk from callees. If a called phone answer, the others will be hanged up. It is ok for me. I want to connect the caller just
2015 Jul 13
2
RES: RES: How to dial extensions asynchronous-sequentially ?
Hi Sammy. After answering your last message (please, see my last message), I was thinking about conferences and my main objective. Conferences will not work well for my case, because I it will allows more than one called party answering the call. But, after one answers the call, I need cancel the others ringing callees. In this case, maybe the best thing to do is to let the called party sends
2012 Mar 08
1
binning dates by decade for simulated data
I have a simulated matrix of dates that I generated from a probability function. Each column represents a single iteration. I would like to bin each run _separately_ by decades and dump them into a new matrix where each column is the length of all decades a single run with the number dates binned by decade. I have successfully done this for a single vector of dates, but not for a matrix: