Displaying 6 results from an estimated 6 matches for "tf3".
Did you mean:
f3
2010 Nov 19
3
Converting matrix data to a list
Hi, I've looked through the posts but couldn't find a solution to this. I'd be
really grateful if someone could help,
I'd like to convert a data file of mutual information that is formatted as
a matrix:
TF1 TF2 TF3 TF200...
Gene1 0.0 0.2 0.2
Gene2 1.4 0.0 2.8
Gene3 0.3 0.6 1.7
Gene6000....
To a list:
Gene1 TF1 0.0
Gene1 TF2 0.2
Gene1 TF3 0.2
Gene2 TF1 1.4
Gene2 TF2 0.0
Gene2 TF3 2.8
Gene3 TF1 0.3
Gene3 TF2 0.6
Gene3 TF3 ...
2017 Jun 04
0
New var
...else( 400 <= DFM$D & DFM$D < 500, 1, ifelse( DFM$D < 400, -1, 0 ) )
# brute force method with ordered factor
DFM$tf1 <- ifelse( "[0,100)" == DFM$bin, 1, 0 )
DFM$tf2 <- ifelse( "[100,200)" == DFM$bin, 1, ifelse( "[100,200)" < DFM$bin, 0, -1 ) )
DFM$tf3 <- ifelse( "[200,300)" == DFM$bin, 1, ifelse( "[200,300)" < DFM$bin, 0, -1 ) )
DFM$tf4 <- ifelse( "[300,400)" == DFM$bin, 1, ifelse( "[300,400)" < DFM$bin, 0, -1 ) )
DFM$tf5 <- ifelse( "[400,500)" == DFM$bin, 1, ifelse( "[400,500...
2017 Jun 04
2
New var
...M$D < 500, 1, ifelse( DFM$D < 400, -1,
> 0 ) )
> # brute force method with ordered factor
> DFM$tf1 <- ifelse( "[0,100)" == DFM$bin, 1, 0 )
> DFM$tf2 <- ifelse( "[100,200)" == DFM$bin, 1, ifelse( "[100,200)" <
> DFM$bin, 0, -1 ) )
> DFM$tf3 <- ifelse( "[200,300)" == DFM$bin, 1, ifelse( "[200,300)" <
> DFM$bin, 0, -1 ) )
> DFM$tf4 <- ifelse( "[300,400)" == DFM$bin, 1, ifelse( "[300,400)" <
> DFM$bin, 0, -1 ) )
> DFM$tf5 <- ifelse( "[400,500)" == DFM$bin, 1, if...
2017 Jun 03
2
New var
Thank you all for the useful suggestion. I did some of my homework.
library(data.table)
DFM <- read.table(header=TRUE, text='obs start end
1 2/1/2015 1/1/2017
2 4/11/2010 1/1/2011
3 1/4/2006 5/3/2007
4 10/1/2007 1/1/2008
5 6/1/2011 1/1/2012
6 10/5/2004 12/1/2004',stringsAsFactors = FALSE)
DFM
DFM$D =as.numeric(difftime(as.Date(DFM$end,format="%m/%d/%Y"),
2017 Jun 04
0
New var
...M$D < 500, 1, ifelse( DFM$D < 400, -1,
> 0 ) )
> # brute force method with ordered factor
> DFM$tf1 <- ifelse( "[0,100)" == DFM$bin, 1, 0 )
> DFM$tf2 <- ifelse( "[100,200)" == DFM$bin, 1, ifelse( "[100,200)" <
> DFM$bin, 0, -1 ) )
> DFM$tf3 <- ifelse( "[200,300)" == DFM$bin, 1, ifelse( "[200,300)" <
> DFM$bin, 0, -1 ) )
> DFM$tf4 <- ifelse( "[300,400)" == DFM$bin, 1, ifelse( "[300,400)" <
> DFM$bin, 0, -1 ) )
> DFM$tf5 <- ifelse( "[400,500)" == DFM$bin, 1, if...
2004 Apr 13
1
Your message to seminar has been rejected
...nlY4h7idmjfg5N4MRXOiKJRCoObKmIoZvCyUyl4smQRYxykIRBnK9TbZQE9
pX4CMixOVearvKR3YpWI1X+yYn9a5lTgsKxzMRXbIeWg1r/4rQSAS2MRVFD5
5vSxIP3JVcm1fWRfGoENf4b83nYc97wENx9S8Or48yLfOb2E8OgYcidtqDAL
VB4Nllma13mbGBXUjVSWi3VmK0DrDimPR/btVbXlaYWZwo/quiXEgREusghR
mXvle2Sd7AFGha2ChcCW/FZAPSA2eplnP22V1ORB/Ol2X3LtzaUBmNkp+Tf3
ONd+VItALu69irAeohY0IuuvOa8t7Jb5tFV5ghfGBF8QpUl2Ohhe2bptSzNs
kxcz+Degj/MLBjKNJiuw5Qw+VDkClcvveyni06yrIRjwkh/ELT71G49cDqQH
Xy2csJKbt1w1Ql1wrXVtpizj8vL6SO1Eo8Zukif7/VTajaFqBfqJWa6TjOhx
GcgrGg6rsZRawg1Gb9C7+QkyUK+LVImHG1LwCOCtHRZiJ17imMTDqHabG4pF
/UKr3/lVVnVUU3NookMSKhET+pMlMddPKY39fAiFcHdXtx7LYkvQ6kn...