Displaying 20 results from an estimated 10000 matches similar to: "[Fwd: Re: vectorization of a data-aggregation loop]"
2005 Feb 01
1
vectorization of a data-aggregation loop
Hi
I have a simple question:
the following data.frame
id iwv type
1 1 1 a
2 1 2 b
3 1 11 b
4 1 5 a
5 1 6 c
6 2 4 c
7 2 3 c
8 2 10 a
9 3 6 b
10 3 9 a
11 3 8 b
12 3 7 c
shall be aggregated into the form:
id t.a t.b t.c
1 1 6 13 6
6 2 10 0 7
9 3 9 14 7
means for each 'type' (a, b, c) a
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
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.
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
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
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.
2001 May 09
1
Coding categorical -> dummy
Dear R-Users,
I have a data frame with several categorical variables. I want to create a
new data frame with dummy variables (with all levels).
I know the function model.matrix (see below) but it works only for one
categorical variable :
> tt <- c("a","a","b","a","c")
> tt <- factor(tt)
> model.matrix(~ tt - 1)
is there anyone who
2015 Mar 19
3
Familia *pply
Buenas a todos. Desde hace un tiempo estoy tratando de aplicar las
funciones de la familia *pply en todo lo que puedo, pero todavía no es
algo que me surja tan rápidamente o naturalmente al momento de los loops
como usar for().
Conozco las ventajas de usar estas funciones y por eso mi intento de
hacerme de ellas.
Por ejemplo en este problema:
data=matrix(rnorm(100*20),20,100)
2007 Aug 05
1
How does one use sip_autoreg
I've RTFM and Googled but can't seem to get sip_autoreg to work (or
perhaps I'm just completely missing the point of it).
(what I'd like to do is avoid having to put explicit entries for every
SIP phone into extensions.conf).
Asterisk is creating entries in the (virtual) context sip_autoreg:
asterisk*CLI> dialplan show sip_autoreg
[ Context 'sip_autoreg'
2009 Jul 20
0
No subject
/var/lib/asterisk/sounds/soundfile.alaw
/var/lib/asterisk/sounds/soundfile.wav
to go from alaw to mp3, first convert to wav, then use lame <options>
/var/lib/asterisk/sounds/soundfile.wav
/var/lib/asterisk/sounds/soundfile.mp3
sox looks like it can ogg/vorbis, but mine doesn't list mp3. You might fetch
the source for sox and see if it can do mp3; lame is probably
just as easy to obtain
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
2012 Jan 16
1
rho stat from a fasta sequence file
Hi all,
I have a sequence file (fasta format) and want to calculate the rho
statistics for dinucleotide abundance value on my data.. the code which I
use is (using seqinr library and current working directory)
seq_info<-read.fasta("gene.txt")
rho(seq_info[1],2)
but it yields only the dinucleotides, not their rho values, i.e,
> rho(seq_info[1],2)
aa ac ag at ca cc cg ct ga gc
2004 Aug 06
1
ices 0.2.2 does not reencode mp3s
Moritz Grimm wrote:
>
> Bolt Thrower wrote:
>
> > >From my ices.conf:
> > <Bitrate>64</Bitrate>
>
> > My mp3s are encoded with the following command:
> > /usr/local/src/lame3.86/lame -S -V 1 -b 128 -h -m j \
> > --tt "title" --ta "artist" --tl "album" \
> > --ty "year"
2013 Apr 01
0
[LLVMdev] proposed change to class BasicTTI and dual mode mips16/32 working
On 04/01/2013 12:31 PM, Chandler Carruth wrote:
> On Thu, Mar 28, 2013 at 12:22 PM, Nadav Rotem <nrotem at apple.com
> <mailto:nrotem at apple.com>> wrote:
>
> IMHO the right way to handle target function attributes is to
> re-initialize the target machine and TTI for every function (if
> the attributes changed). Do you have another solution in mind ?
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,
> >
2009 Aug 25
1
Filling in empty arrays/lists from using "paste" function
Dear R users,
I am trying to fill in arrays (5 different according to distinct "id")
from objects produced from arbitrary data set below.
a <-
2005 Oct 06
5
Interpolation in time
Can anybody help me write a code on the following data example, which
fills out all NA values by using a linear interpolation with the two
closest values?
Doy is day of year (%j).
Code example:
yr<-c(rep(2000,14))
doy<-c(16:29)
dat<-c(3.2,NA,NA,NA,NA,NA,NA,5.1,NA,NA,NA,NA,NA,4.6)
ta<-cbind(yr,doy,dat)
ta
yr doy dat
[1,] 2000 16 3.2
[2,] 2000 17 NA
[3,] 2000 18 NA
2005 Oct 31
0
Problem using reshape with missing values in idvar
Hello everybody,
I have been recently using reshape to convert "long" data to "wide"
data. Everything was going well until I reached some problematic
datasets. It has taken me a couple of weeks to finally figure out
what might be happening.
The problem is reproducible with test cases, and on two versions of R
(Windows 2.2.0 and x86-64 Fedora Core 3 R 2.2.0).
The data
2010 Apr 20
0
I figured it out!!
If you do not put a context in the beginning of the sip.conf file, the
default is, ta da, default in extensions.conf. Putting a context=testof
idea in sip.conf got things moving:
sip.conf
[general]
port=5060
bindaddr=0.0.0.0 ;10.8.0.34
*context=testofidea*
srvlookup=yes
disallow=all ;read somewhere you have to disallow everything first
allow=ulaw
allow=alaw
allow=gsm
dtmfmode=rfc2833 ;;
2004 Sep 10
0
FLAC to mp3 batch converter?
Here's an extremely quick-and-dirty Perl script I wrote to do just that.
This script depends on having the MP3::Info Perl module for ID3 tag
information, and assumes that you have lame set up. It will take a flac
file (or a wildcard) as an argument, decompress that file, and encode it
as a fairly high-bitrate VBR MP3.
I want to stress that this is just something I wrote for my needs, so