similar to: vectorization of a data-aggregation loop

Displaying 20 results from an estimated 10000 matches similar to: "vectorization of a data-aggregation loop"

2005 Feb 02
0
[Fwd: Re: vectorization of a data-aggregation loop]
great! many thanks, Phil Cheers christoph Phil Spector wrote: > Christoph - > I think reshape is the function you're looking for: > >> tt <- data.frame(cbind(c(1,1,1,1,1,2,2,2,3,3,3,3), > + c(10,12,8,33,34,3,27,77,34,45,4,39), c('a', 'b', 'b', 'a', 'c', 'c', 'c', > + 'a', 'b', 'a',
2008 Jun 12
2
FIPS mode OpenSSH suggestion
Hi OpenSSH team, I find a url http://www.gossamer-threads.com/lists/openssh/dev/42808?do=post_view_threaded#42808, which provides unofficial patch for FIPS Capable OpenSSH. I try it and it seems working for some cases. (BTW, I also find that aes128-ctr, aes192-ctr and aes256-ctr ciphers can't work in FIPS mode properly. The fips mode sshd debug info is as following.
2013 Aug 12
1
openssh 6.2
To the openssh community; I have installed openssh 6.2 on my mac book pro and tried to ssh to a server and the ssh session hangs. The host server shows that a connection was established but I cannot return a prompt to indicate that I am connected to the server. Can someone advise? Thanks in advance ======>HOST SERVER [ALLOC133 /export/home/tinker] netstat -a |grep msp9022.XX.XXX.COM.ssh
2008 Oct 05
1
barchart for aggregated (sum) data in lattice?
Hi list, I have data in a dataframe t1, with a column for different amounts spent, a column what it was spent on, and a column with dates, from which I create a new column with months. Example: amount <- rep(c(10,20,30),3) what <- rep(c("food","books","cycling"),3) when <- c(rep("2008-09-05",5),rep("2008-10-07",4)) t1 <-
2011 Jul 28
3
Data aggregation question
Hi all, I'm working with a sizable dataset that I'd like to summarize, but I can't find a tool or function that will do quite what I'd like. Basically, I'd like to summarize the data by fully crossing three variables and getting a count of the number of observations for every level of that 3-way interaction. For example, if factors A, B, and C each have 3 levels (all of
2009 May 11
3
Looking for a quick way to combine rows in a matrix
I'm working with genotype data in a frequency table: > a=matrix(1:16, nrow=4) > rownames(a)=c("AA","AT","TA","TT") > a [,1] [,2] [,3] [,4] AA 1 5 9 13 AT 2 6 10 14 TA 3 7 11 15 TT 4 8 12 16 'AT' and 'TA' are essentially the same, and I'd like to combine (add) the rows to reflect
2012 Jun 08
2
[LLVMdev] Strong vs. default phi elimination and single-reg classes
On Thu, 7 Jun 2012 22:14:00 -0700 Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote: > > On Jun 7, 2012, at 7:31 PM, Hal Finkel wrote: > > > 112B BB#1: derived from LLVM BB %for.body, ADDRESS TAKEN > > Predecessors according to CFG: BB#0 BB#1 > > %vreg12<def> = PHI %vreg13, <BB#1>, %vreg11, > >
2011 Apr 30
1
More flexible aggregate / eval
Dear list, I would like to do some calculation using different grouping variables. My 'df' looks like this: # Some data set.seed(345) id <- seq(200,400, by=10) ids <- sample(substr(id,1,1)) group1 <- rep(1:3, each=7) group2 <- rep(1:2, c(10,11)) group3 <- rep(1:4, c(5,5,5,6)) df <- data.frame(id, ids, group1, group2, group3) df <- rbind(df, df, df) df$time <-
2015 Mar 21
2
Familia *pply
Muchas gracias a ambos Carlos y Jorge por las respuestas. Pido disculpas en la demora de respuesta, pero estuvo complicada la semana. La pregunta era un ejercicio de ejemplo para poder entender mejor los usos, creo que me armaré una guía en markdown con ejemplos varios para ir consultando cuando me salgan dudas de como usarlos. En realidad no importaba tanto si mejorara demasiado los tiempos
2017 Feb 20
2
second ssh connection for the first ssh request
Hi I changed sshd_config to run script, .profile for user cliuser like this: Match user cliuser ForceCommand . /home/cliuser/.profile cat /home/cliuser/.profile #!/bin/sh if [[ "$1" == "-c" ]]; then exit 5 fi trap 'exit' 1 2 3 4 15 ssh -tt secadmin at 127.0.0.1 -p 2024 exit Now, with this, i wanted connections to sshd coming on 2025 to go to 2024 for user
2015 Mar 19
2
Familia *pply
Hola Jorge, muchas gracias por tu pronta respuesta, no me di cuenta que el formateo podría causar problemas, envío de nuevo el código sin formatos. La idea básica es para un set de números de columnas (desordenados) y un set de numeros de fila el loop lo que hace es ir a la fila y columna correspondiente de data, tomar el valor y luego hacer la media sobre esos.
2005 Mar 22
1
List of tables rather than an extra dimension in the table or (l)apply(xtabs)
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am trying to process all the regions at the same time without using "for". So I need (think, I do) a list of matrices each structured according to the number of subregions within each region. So is there a
2003 May 14
2
how to include 'NA's in xtabs?
Hello! I have a dataset with NA's in some variables (factors), for example: $ P67 : Factor w/ 2 levels "-","+": NA 2 1 NA NA 2 1 1 2 NA ... I need to use 'xtabs' like xtabs(~x$P67) It works well and produces something like this: x$P67 - + 779 1318 but i want to compute NA's too, like this: x$P67 - + NA 779 1318 137 I am trying
2010 May 06
2
Problem with nested functions - functions nested too deeply in source code
Hi all! I¹m just implementing the Ullmann¹s algorithm for searching subgraph isomorphisms in graphNEL objects. The algorithm is running with smaller graphs, but when I¹m calling it i get an R error message saying that functions are nested too deeply in source code. I found out that the problem is in the so called refinement procedure of the algorithm which consists of 10 different functions,
2011 Jul 11
2
best way to aggregate / rearrange data.frame with different data types
Hi, I have a data.frame that looks like this: Subject <- c(rep(1,4), rep(2,4), rep(3,4)) y <- rnorm(12, 3, 2) gender <- c(rep("w",4), rep("m",4), rep("w",4)) comment <- c(rep("comment A",4), rep("comment B",4), rep("comment C",4)) data <- data.frame(Subject,y,gender,comment) data Subject y gender
2008 May 09
2
Tabulation of aggregated data.frame
Hi useRs! I would like to know how to make aggregated data.frame with aggregate() tabulated. For example, I run the following command to aggregate re with respect to group1 and group2. > (aggr <- with(final, aggregate(re, group1, group2, mean))) Group.1 Group.2 x 1 1992 15 0.16392 2 1993 15 0.15467 3 1994 15 0.15456 4 1995 15 0.15391
2009 May 29
1
data manipulation involving aggregate
hi all, I often have a data frame like this example data.frame(sq=c(1,1,1,2,2,3,3,3,3),area=c(1,2,3,1,2,3,1,2,3),habitat=c("garden","garden","pond","field","garden","river","garden","field","field")) for each "sq" I have multiple "habitat"s each with an associated "area". I
2016 May 23
2
data frame method for as.table()
Hello, Currently it's possible to convert an object of class table to a data frame with as.data.frame.table(), but there's no ready-made function, AFAIK, to do the reverse operation, i.e. conversion of a data frame to a table. Do you think it would be a good idea to add a data.frame method to as.table(), to allow such conversions? The idea is that if `x' is a table and `y <-
2009 Apr 24
2
argument 'exclude' in function xtabs
Dear all I was willing to use argument 'exclude' in function xtabs to remove some levels of factors (xtabs help page says '"exclude: a vector of values to be excluded when forming the set of levels of the classifying factors"). I tried: > mydata <- data.frame( treatment = c("B", "A", "C", "C", "B",
2003 Oct 07
2
Creating domain group using Samba 2.2.7
Hi all, Is there any way of creating an NT domain using Samba 2.2.7? The creatgroup option isn't available to me from rpcclient. Thanks, Caro