Re: [R] faster execution of for loop in Fishers test

2019-02-11 Thread Patrick (Malone Quantitative)
Point 1 confirmed. It's an exhaustive permutation test.

On 2/11/19, 8:46 PM, "R-help on behalf of Bert Gunter" 
 wrote:

1. I believe Fisher's exact test is computationally intensive and takes a
lot of time for large structures, so I would say what you see is what you
should expect! (As I'm not an expert on this, confirmation or contradiction
by those who are would be appreciated).

2. Your second question on how to select results based on values in another
vector/column is very basic R. So it appears that you need to spend some
time with an R tutorial or two to learn the basics (unless I have
misinterpreted).

3. Please do not repost further. No one is obligated to respond to your
posts. Following the posting guide, which you appear to have done,
increases the likelihood, but is of course no guarantee.

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Feb 11, 2019 at 5:28 PM Adrian Johnson 
wrote:

> Dear group,
>
> I have two large matrices.
>
> Matrix one: is 24776 x 76 (example toy1 dput object given below)
>
> Matrix two: is 12913 x 76 (example toy2 dput object given below)
>
> Column names of both matrices are identical.
>
> My aim is:
>
> a. Take each row of toy2 and transform vector into UP (>0)  and DN (
> <0 ) categories. (kc)
> b  Test association between kc and every row of toy1.
>
> My code, given below, although this works but is very slow.
>
> I gave dput objects for toy1, toy2 and result matrix.
>
> Could you suggest/help me how I can make this faster.  Also, how can I
> select values in result column that are less than 0.001 (p < 0.001).
>
> Appreciate your help. Thank you.
> -Adrian
>
> Code:
>
> 
===
>
>
>
> result <- matrix(NA,nrow=nrow(toy1),ncol=nrow(toy2))
>
> rownames(result) <- rownames(toy1)
> colnames(result) <- rownames(toy2)
>
> for(i in 1:nrow(toy2)){
> for(j in 1:nrow(toy1)){
> kx = toy2[i,]
> kc <- rep('NC',length(kx))
> kc[ kx >0] <- 'UP'
> kc[ kx <=0 ] <- 'DN'
> xpv <- fisher.test(table(kc,toy1[j,]),simulate.p.value = TRUE)$p.value
> result[j,i] <- xpv
> }
> }
>
>
> 
===
>
>
>
> 
===
>
>
> > dput(toy1)
> structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
> -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1), .Dim = c(10L, 7L), .Dimnames = list(c("ACAP3",
> "ACTRT2", "AGRN", "ANKRD65", "ATAD3A", "ATAD3B", "ATAD3C", "AURKAIP1",
> "B3GALT6", "C1orf159"), c("a", "b", "c", "d", "e", "f", "g")))
>
>
>
> > dput(toy2)
> structure(c(-0.242891119688613, -0.0514058216682132, 0.138447212993773,
> -0.312576648033122, 0.271489918720452, -0.281196468299486,
> -0.0407160143344565,
> -0.328353812845287, 0.151667836674511, 0.408596843743938,
> -0.049351944902924,
> 0.238586287349249, 0.200571558784821, -0.0737604184858411,
> 0.245971526254877,
> 0.24740263959845, -0.161528943131908, 0.197521973013793,
> 0.0402668125708444,
> 0.376323735212088, 0.0731550871764204, 0.385270176969893, 
0.28953042756208,
> 0.062587289401188, -0.281187168932979, -0.0202298984561554,
> -0.0848696970309447,
> 0.0349676726358973, -0.520484215644868, -0.481991414222996,
> -0.00698099201388211,
> 0.135503878341873, 0.156983081312087, 0.320223832092661, 0.34582193394074,
> 0.0844455960468667, -0.157825604090972, 0.204758250510969,
> 0.261796072978612,
> -0.19510450641405, 0.43196474472874, -0.211155577453175,
> -0.0921641871215187,
> 0.420950361292263, 0.390261862151936, -0.422273930504427,
> 0.344653684951627,
> 0.0378273248838503, 0.197782027324611, 0.0963124876309569,
> 0.332093167080656,
> 0.128036554821915, -0.41338065859335, -0.409470440033177,
> 0.371490567256253,
> -0.0912549189140141, -0.247451812684234, 0.127741739114639,
> 0.0856254238844557,
> 0.515282940316031, -0.25675759521248, 0.333943163209869, 
0.604141413840881,
> 0.0824942299510931, -0.179605710473021, -0.275604207054643,
> -0.113251154591898,
> 0.172897837449258, -0.329808795076691, -0.239255324324506), .Dim = c(10L,
> 7L), .Dimnames = list(c("chr5q23", "chr16q24", "chr8q24", "chr13q11",
> 

Re: [R] faster execution of for loop in Fishers test

2019-02-11 Thread Bert Gunter
1. I believe Fisher's exact test is computationally intensive and takes a
lot of time for large structures, so I would say what you see is what you
should expect! (As I'm not an expert on this, confirmation or contradiction
by those who are would be appreciated).

2. Your second question on how to select results based on values in another
vector/column is very basic R. So it appears that you need to spend some
time with an R tutorial or two to learn the basics (unless I have
misinterpreted).

3. Please do not repost further. No one is obligated to respond to your
posts. Following the posting guide, which you appear to have done,
increases the likelihood, but is of course no guarantee.

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Feb 11, 2019 at 5:28 PM Adrian Johnson 
wrote:

> Dear group,
>
> I have two large matrices.
>
> Matrix one: is 24776 x 76 (example toy1 dput object given below)
>
> Matrix two: is 12913 x 76 (example toy2 dput object given below)
>
> Column names of both matrices are identical.
>
> My aim is:
>
> a. Take each row of toy2 and transform vector into UP (>0)  and DN (
> <0 ) categories. (kc)
> b  Test association between kc and every row of toy1.
>
> My code, given below, although this works but is very slow.
>
> I gave dput objects for toy1, toy2 and result matrix.
>
> Could you suggest/help me how I can make this faster.  Also, how can I
> select values in result column that are less than 0.001 (p < 0.001).
>
> Appreciate your help. Thank you.
> -Adrian
>
> Code:
>
> ===
>
>
>
> result <- matrix(NA,nrow=nrow(toy1),ncol=nrow(toy2))
>
> rownames(result) <- rownames(toy1)
> colnames(result) <- rownames(toy2)
>
> for(i in 1:nrow(toy2)){
> for(j in 1:nrow(toy1)){
> kx = toy2[i,]
> kc <- rep('NC',length(kx))
> kc[ kx >0] <- 'UP'
> kc[ kx <=0 ] <- 'DN'
> xpv <- fisher.test(table(kc,toy1[j,]),simulate.p.value = TRUE)$p.value
> result[j,i] <- xpv
> }
> }
>
>
> ===
>
>
>
> ===
>
>
> > dput(toy1)
> structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
> -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1), .Dim = c(10L, 7L), .Dimnames = list(c("ACAP3",
> "ACTRT2", "AGRN", "ANKRD65", "ATAD3A", "ATAD3B", "ATAD3C", "AURKAIP1",
> "B3GALT6", "C1orf159"), c("a", "b", "c", "d", "e", "f", "g")))
>
>
>
> > dput(toy2)
> structure(c(-0.242891119688613, -0.0514058216682132, 0.138447212993773,
> -0.312576648033122, 0.271489918720452, -0.281196468299486,
> -0.0407160143344565,
> -0.328353812845287, 0.151667836674511, 0.408596843743938,
> -0.049351944902924,
> 0.238586287349249, 0.200571558784821, -0.0737604184858411,
> 0.245971526254877,
> 0.24740263959845, -0.161528943131908, 0.197521973013793,
> 0.0402668125708444,
> 0.376323735212088, 0.0731550871764204, 0.385270176969893, 0.28953042756208,
> 0.062587289401188, -0.281187168932979, -0.0202298984561554,
> -0.0848696970309447,
> 0.0349676726358973, -0.520484215644868, -0.481991414222996,
> -0.00698099201388211,
> 0.135503878341873, 0.156983081312087, 0.320223832092661, 0.34582193394074,
> 0.0844455960468667, -0.157825604090972, 0.204758250510969,
> 0.261796072978612,
> -0.19510450641405, 0.43196474472874, -0.211155577453175,
> -0.0921641871215187,
> 0.420950361292263, 0.390261862151936, -0.422273930504427,
> 0.344653684951627,
> 0.0378273248838503, 0.197782027324611, 0.0963124876309569,
> 0.332093167080656,
> 0.128036554821915, -0.41338065859335, -0.409470440033177,
> 0.371490567256253,
> -0.0912549189140141, -0.247451812684234, 0.127741739114639,
> 0.0856254238844557,
> 0.515282940316031, -0.25675759521248, 0.333943163209869, 0.604141413840881,
> 0.0824942299510931, -0.179605710473021, -0.275604207054643,
> -0.113251154591898,
> 0.172897837449258, -0.329808795076691, -0.239255324324506), .Dim = c(10L,
> 7L), .Dimnames = list(c("chr5q23", "chr16q24", "chr8q24", "chr13q11",
> "chr7p21", "chr10q23", "chr13q13", "chr10q21", "chr1p13", "chrxp21"
> ), c("a", "b", "c", "d", "e", "f", "g")))
> >
>
>
> > dput(result)
> structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.532733633183408,
> 0.511244377811094, 0.528235882058971, 0.526736631684158, 0.51424287856072,
> 0.530734632683658, 0.513243378310845, 0.533233383308346, 0.542228885557221,
> 0.517241379310345, 0.532733633183408, 0.521739130434783, 0.529235382308846,
> 0.530234882558721, 0.548725637181409, 0.525737131434283, 0.527236381809095,
> 0.532733633183408, 0.530234882558721, 0.520739630184908, 0.15592203898051,
> 0.142928535732134, 0.140929535232384, 0.15092453773113

[R] faster execution of for loop in Fishers test

2019-02-11 Thread Adrian Johnson
Dear group,

I have two large matrices.

Matrix one: is 24776 x 76 (example toy1 dput object given below)

Matrix two: is 12913 x 76 (example toy2 dput object given below)

Column names of both matrices are identical.

My aim is:

a. Take each row of toy2 and transform vector into UP (>0)  and DN (
<0 ) categories. (kc)
b  Test association between kc and every row of toy1.

My code, given below, although this works but is very slow.

I gave dput objects for toy1, toy2 and result matrix.

Could you suggest/help me how I can make this faster.  Also, how can I
select values in result column that are less than 0.001 (p < 0.001).

Appreciate your help. Thank you.
-Adrian

Code:
===



result <- matrix(NA,nrow=nrow(toy1),ncol=nrow(toy2))

rownames(result) <- rownames(toy1)
colnames(result) <- rownames(toy2)

for(i in 1:nrow(toy2)){
for(j in 1:nrow(toy1)){
kx = toy2[i,]
kc <- rep('NC',length(kx))
kc[ kx >0] <- 'UP'
kc[ kx <=0 ] <- 'DN'
xpv <- fisher.test(table(kc,toy1[j,]),simulate.p.value = TRUE)$p.value
result[j,i] <- xpv
}
}

===


===


> dput(toy1)
structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1), .Dim = c(10L, 7L), .Dimnames = list(c("ACAP3",
"ACTRT2", "AGRN", "ANKRD65", "ATAD3A", "ATAD3B", "ATAD3C", "AURKAIP1",
"B3GALT6", "C1orf159"), c("a", "b", "c", "d", "e", "f", "g")))



> dput(toy2)
structure(c(-0.242891119688613, -0.0514058216682132, 0.138447212993773,
-0.312576648033122, 0.271489918720452, -0.281196468299486, -0.0407160143344565,
-0.328353812845287, 0.151667836674511, 0.408596843743938, -0.049351944902924,
0.238586287349249, 0.200571558784821, -0.0737604184858411, 0.245971526254877,
0.24740263959845, -0.161528943131908, 0.197521973013793, 0.0402668125708444,
0.376323735212088, 0.0731550871764204, 0.385270176969893, 0.28953042756208,
0.062587289401188, -0.281187168932979, -0.0202298984561554, -0.0848696970309447,
0.0349676726358973, -0.520484215644868, -0.481991414222996,
-0.00698099201388211,
0.135503878341873, 0.156983081312087, 0.320223832092661, 0.34582193394074,
0.0844455960468667, -0.157825604090972, 0.204758250510969, 0.261796072978612,
-0.19510450641405, 0.43196474472874, -0.211155577453175, -0.0921641871215187,
0.420950361292263, 0.390261862151936, -0.422273930504427, 0.344653684951627,
0.0378273248838503, 0.197782027324611, 0.0963124876309569, 0.332093167080656,
0.128036554821915, -0.41338065859335, -0.409470440033177, 0.371490567256253,
-0.0912549189140141, -0.247451812684234, 0.127741739114639, 0.0856254238844557,
0.515282940316031, -0.25675759521248, 0.333943163209869, 0.604141413840881,
0.0824942299510931, -0.179605710473021, -0.275604207054643, -0.113251154591898,
0.172897837449258, -0.329808795076691, -0.239255324324506), .Dim = c(10L,
7L), .Dimnames = list(c("chr5q23", "chr16q24", "chr8q24", "chr13q11",
"chr7p21", "chr10q23", "chr13q13", "chr10q21", "chr1p13", "chrxp21"
), c("a", "b", "c", "d", "e", "f", "g")))
>


> dput(result)
structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.532733633183408,
0.511244377811094, 0.528235882058971, 0.526736631684158, 0.51424287856072,
0.530734632683658, 0.513243378310845, 0.533233383308346, 0.542228885557221,
0.517241379310345, 0.532733633183408, 0.521739130434783, 0.529235382308846,
0.530234882558721, 0.548725637181409, 0.525737131434283, 0.527236381809095,
0.532733633183408, 0.530234882558721, 0.520739630184908, 0.15592203898051,
0.142928535732134, 0.140929535232384, 0.150924537731134, 0.160419790104948,
0.139430284857571, 0.152923538230885, 0.146426786606697, 0.149425287356322,
0.145427286356822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.282358820589705,
0.293853073463268, 0.262868565717141, 0.290854572713643, 0.276861569215392,
0.288855572213893, 0.282358820589705, 0.292853573213393, 0.286356821589205,
0.271364317841079, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1), .Dim = c(10L, 10L), .Dimnames = list(c("ACAP3",
"ACTRT2", "AGRN", "ANKRD65", "ATAD3A", "ATAD3B", "ATAD3C", "AURKAIP1",
"B3GALT6", "C1orf159"), c("chr5q23", "chr16q24", "chr8q24", "chr13q11",
"chr7p21", "chr10q23", "chr13q13", "chr10q21", "chr1p13", "chrxp21"
)))

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread Val
Thank you very much Jeff, Goran and David  for your help.


On Mon, Feb 11, 2019 at 6:22 PM Jeff Newmiller  wrote:
>
> N <- 8 # however many times you want to do this
> ans <- lapply( seq.int( N )
>   , function( n ) {
>   idx <- sample( nrow( mydat ) )
>   mydat[ idx[ seq.int( which( 40 < cumsum( mydat[ idx, 
> "count" ] ) )[ 1 ] ) ], ]
> }
>   )
>
>
> On Mon, 11 Feb 2019, Val wrote:
>
> > Sorry Jeff and David  for not being clear!
> >
> > The total sample size should be at least 40, but the selection should
> > be based on group ID.  A different combination of Group ID could give
> > at least  40.
> > If I select  group G1   with 25  count and  G2  and with 15  counts
> > then   I can get  a minimum of 40  counts.   So G1 and G2 are
> > selected.
> > G1  25
> > G2  15
> >
> > In another scenario, if G2, G3 and G4  are  selected  then the total
> > count will be 58 which is  greater than 40. So G2 , G3 and G4  could
> > be selected.
> > G2 15
> > G3 12
> > G4 31
> >
> > So the restriction is to  find group IDs  that give a minim of  40.
> > Once, I reached a minim of 40 then stop selecting group  and output
> > the data..
> >
> > I am hope this helps
> >
> >
> >
> >
> > On Mon, Feb 11, 2019 at 5:09 PM Jeff Newmiller  
> > wrote:
> >>
> >> This constraint was not clear in your original sample data set. Can you 
> >> expand the data set to clarify how this requirement REALLY works?
> >>
> >> On February 11, 2019 3:00:15 PM PST, Val  wrote:
> >>> Thank you David.
> >>>
> >>> However, this will not work for me. If the group ID selected then all
> >>> of its observation should be included.
> >>>
> >>> On Mon, Feb 11, 2019 at 4:51 PM David L Carlson 
> >>> wrote:
> 
>  First expand your data frame into a vector where G1 is repeated 25
> >>> times, G2 is repeated 15 times, etc. Then draw random samples of 40
> >>> from that vector:
> 
> > grp <- rep(mydat$group, mydat$count)
> > grp.sam <- sample(grp, 40)
> > table(grp.sam)
>  grp.sam
>  G1 G2 G3 G4 G5
>  10  9  5 13  3
> 
>  
>  David L Carlson
>  Department of Anthropology
>  Texas A&M University
>  College Station, TX 77843-4352
> 
> 
>  -Original Message-
>  From: R-help  On Behalf Of Val
>  Sent: Monday, February 11, 2019 4:36 PM
>  To: r-help@R-project.org (r-help@r-project.org)
> >>> 
>  Subject: [R] Select
> 
>  Hi all,
> 
>  I have a data frame  with tow variables  group and its size.
>  mydat<- read.table( text='group  count
>  G1 25
>  G2 15
>  G3 12
>  G4 31
>  G5 10' , header = TRUE, as.is = TRUE )
> 
>  I want to select   group ID randomly (without replacement)  until
> >>> the
>  sum of count reaches 40.
>  So, in  the first case, the data frame could be
> G4 31
> 65 10
> 
>  In other case, it could be
>    G5 10
>    G2 15
>    G3 12
> 
>  How do I put sum of count variable   is  a minimum of 40 restriction?
> 
>  Than k you in advance
> 
> 
> 
> 
> 
> 
>  I want to select group  ids randomly until I reach the
> 
>  __
>  R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>  https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide
> >>> http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
> >>>
> >>> __
> >>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >>> https://stat.ethz.ch/mailman/listinfo/r-help
> >>> PLEASE do read the posting guide
> >>> http://www.R-project.org/posting-guide.html
> >>> and provide commented, minimal, self-contained, reproducible code.
> >>
> >> --
> >> Sent from my phone. Please excuse my brevity.
> >
>
> ---
> Jeff NewmillerThe .   .  Go Live...
> DCN:Basics: ##.#.   ##.#.  Live Go...
>Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
> /Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
> ---

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread Jeff Newmiller

N <- 8 # however many times you want to do this
ans <- lapply( seq.int( N )
 , function( n ) {
 idx <- sample( nrow( mydat ) )
 mydat[ idx[ seq.int( which( 40 < cumsum( mydat[ idx, "count" ] 
) )[ 1 ] ) ], ]
   }
 )


On Mon, 11 Feb 2019, Val wrote:


Sorry Jeff and David  for not being clear!

The total sample size should be at least 40, but the selection should
be based on group ID.  A different combination of Group ID could give
at least  40.
If I select  group G1   with 25  count and  G2  and with 15  counts
then   I can get  a minimum of 40  counts.   So G1 and G2 are
selected.
G1  25
G2  15

In another scenario, if G2, G3 and G4  are  selected  then the total
count will be 58 which is  greater than 40. So G2 , G3 and G4  could
be selected.
G2 15
G3 12
G4 31

So the restriction is to  find group IDs  that give a minim of  40.
Once, I reached a minim of 40 then stop selecting group  and output
the data..

I am hope this helps




On Mon, Feb 11, 2019 at 5:09 PM Jeff Newmiller  wrote:


This constraint was not clear in your original sample data set. Can you expand 
the data set to clarify how this requirement REALLY works?

On February 11, 2019 3:00:15 PM PST, Val  wrote:

Thank you David.

However, this will not work for me. If the group ID selected then all
of its observation should be included.

On Mon, Feb 11, 2019 at 4:51 PM David L Carlson 
wrote:


First expand your data frame into a vector where G1 is repeated 25

times, G2 is repeated 15 times, etc. Then draw random samples of 40
from that vector:



grp <- rep(mydat$group, mydat$count)
grp.sam <- sample(grp, 40)
table(grp.sam)

grp.sam
G1 G2 G3 G4 G5
10  9  5 13  3


David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352


-Original Message-
From: R-help  On Behalf Of Val
Sent: Monday, February 11, 2019 4:36 PM
To: r-help@R-project.org (r-help@r-project.org)



Subject: [R] Select

Hi all,

I have a data frame  with tow variables  group and its size.
mydat<- read.table( text='group  count
G1 25
G2 15
G3 12
G4 31
G5 10' , header = TRUE, as.is = TRUE )

I want to select   group ID randomly (without replacement)  until

the

sum of count reaches 40.
So, in  the first case, the data frame could be
   G4 31
   65 10

In other case, it could be
  G5 10
  G2 15
  G3 12

How do I put sum of count variable   is  a minimum of 40 restriction?

Than k you in advance






I want to select group  ids randomly until I reach the

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide

http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Sent from my phone. Please excuse my brevity.




---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread Val
Sorry Jeff and David  for not being clear!

The total sample size should be at least 40, but the selection should
be based on group ID.  A different combination of Group ID could give
 at least  40.
If I select  group G1   with 25  count and  G2  and with 15  counts
then   I can get  a minimum of 40  counts.   So G1 and G2 are
selected.
G1  25
G2  15

In another scenario, if G2, G3 and G4  are  selected  then the total
count will be 58 which is  greater than 40. So G2 , G3 and G4  could
be selected.
 G2 15
 G3 12
 G4 31

So the restriction is to  find group IDs  that give a minim of  40.
Once, I reached a minim of 40 then stop selecting group  and output
the data..

I am hope this helps




On Mon, Feb 11, 2019 at 5:09 PM Jeff Newmiller  wrote:
>
> This constraint was not clear in your original sample data set. Can you 
> expand the data set to clarify how this requirement REALLY works?
>
> On February 11, 2019 3:00:15 PM PST, Val  wrote:
> >Thank you David.
> >
> >However, this will not work for me. If the group ID selected then all
> >of its observation should be included.
> >
> >On Mon, Feb 11, 2019 at 4:51 PM David L Carlson 
> >wrote:
> >>
> >> First expand your data frame into a vector where G1 is repeated 25
> >times, G2 is repeated 15 times, etc. Then draw random samples of 40
> >from that vector:
> >>
> >> > grp <- rep(mydat$group, mydat$count)
> >> > grp.sam <- sample(grp, 40)
> >> > table(grp.sam)
> >> grp.sam
> >> G1 G2 G3 G4 G5
> >> 10  9  5 13  3
> >>
> >> 
> >> David L Carlson
> >> Department of Anthropology
> >> Texas A&M University
> >> College Station, TX 77843-4352
> >>
> >>
> >> -Original Message-
> >> From: R-help  On Behalf Of Val
> >> Sent: Monday, February 11, 2019 4:36 PM
> >> To: r-help@R-project.org (r-help@r-project.org)
> >
> >> Subject: [R] Select
> >>
> >> Hi all,
> >>
> >> I have a data frame  with tow variables  group and its size.
> >> mydat<- read.table( text='group  count
> >> G1 25
> >> G2 15
> >> G3 12
> >> G4 31
> >> G5 10' , header = TRUE, as.is = TRUE )
> >>
> >> I want to select   group ID randomly (without replacement)  until
> >the
> >> sum of count reaches 40.
> >> So, in  the first case, the data frame could be
> >>G4 31
> >>65 10
> >>
> >> In other case, it could be
> >>   G5 10
> >>   G2 15
> >>   G3 12
> >>
> >> How do I put sum of count variable   is  a minimum of 40 restriction?
> >>
> >> Than k you in advance
> >>
> >>
> >>
> >>
> >>
> >>
> >> I want to select group  ids randomly until I reach the
> >>
> >> __
> >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
> >__
> >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
> --
> Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread Göran Broström




On 2019-02-11 23:35, Val wrote:

Hi all,

I have a data frame  with tow variables  group and its size.
mydat<- read.table( text='group  count
G1 25
G2 15
G3 12
G4 31
G5 10' , header = TRUE, as.is = TRUE )



How about

x <- sample(1:5)

total <- mydat$count[x[1]]
i <- 1
while (total < 40){
i <- i + 1
total <- total + mydat$count[x[i]]
}

print(mydat$group[x[1:i]])

Göran



I want to select   group ID randomly (without replacement)  until  the
sum of count reaches 40.
So, in  the first case, the data frame could be
G4 31
65 10

In other case, it could be
   G5 10
   G2 15
   G3 12

How do I put sum of count variable   is  a minimum of 40 restriction?

Than k you in advance






I want to select group  ids randomly until I reach the

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread Jeff Newmiller
This constraint was not clear in your original sample data set. Can you expand 
the data set to clarify how this requirement REALLY works?

On February 11, 2019 3:00:15 PM PST, Val  wrote:
>Thank you David.
>
>However, this will not work for me. If the group ID selected then all
>of its observation should be included.
>
>On Mon, Feb 11, 2019 at 4:51 PM David L Carlson 
>wrote:
>>
>> First expand your data frame into a vector where G1 is repeated 25
>times, G2 is repeated 15 times, etc. Then draw random samples of 40
>from that vector:
>>
>> > grp <- rep(mydat$group, mydat$count)
>> > grp.sam <- sample(grp, 40)
>> > table(grp.sam)
>> grp.sam
>> G1 G2 G3 G4 G5
>> 10  9  5 13  3
>>
>> 
>> David L Carlson
>> Department of Anthropology
>> Texas A&M University
>> College Station, TX 77843-4352
>>
>>
>> -Original Message-
>> From: R-help  On Behalf Of Val
>> Sent: Monday, February 11, 2019 4:36 PM
>> To: r-help@R-project.org (r-help@r-project.org)
>
>> Subject: [R] Select
>>
>> Hi all,
>>
>> I have a data frame  with tow variables  group and its size.
>> mydat<- read.table( text='group  count
>> G1 25
>> G2 15
>> G3 12
>> G4 31
>> G5 10' , header = TRUE, as.is = TRUE )
>>
>> I want to select   group ID randomly (without replacement)  until 
>the
>> sum of count reaches 40.
>> So, in  the first case, the data frame could be
>>G4 31
>>65 10
>>
>> In other case, it could be
>>   G5 10
>>   G2 15
>>   G3 12
>>
>> How do I put sum of count variable   is  a minimum of 40 restriction?
>>
>> Than k you in advance
>>
>>
>>
>>
>>
>>
>> I want to select group  ids randomly until I reach the
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread Val
Thank you David.

However, this will not work for me. If the group ID selected then all
of its observation should be included.

On Mon, Feb 11, 2019 at 4:51 PM David L Carlson  wrote:
>
> First expand your data frame into a vector where G1 is repeated 25 times, G2 
> is repeated 15 times, etc. Then draw random samples of 40 from that vector:
>
> > grp <- rep(mydat$group, mydat$count)
> > grp.sam <- sample(grp, 40)
> > table(grp.sam)
> grp.sam
> G1 G2 G3 G4 G5
> 10  9  5 13  3
>
> 
> David L Carlson
> Department of Anthropology
> Texas A&M University
> College Station, TX 77843-4352
>
>
> -Original Message-
> From: R-help  On Behalf Of Val
> Sent: Monday, February 11, 2019 4:36 PM
> To: r-help@R-project.org (r-help@r-project.org) 
> Subject: [R] Select
>
> Hi all,
>
> I have a data frame  with tow variables  group and its size.
> mydat<- read.table( text='group  count
> G1 25
> G2 15
> G3 12
> G4 31
> G5 10' , header = TRUE, as.is = TRUE )
>
> I want to select   group ID randomly (without replacement)  until  the
> sum of count reaches 40.
> So, in  the first case, the data frame could be
>G4 31
>65 10
>
> In other case, it could be
>   G5 10
>   G2 15
>   G3 12
>
> How do I put sum of count variable   is  a minimum of 40 restriction?
>
> Than k you in advance
>
>
>
>
>
>
> I want to select group  ids randomly until I reach the
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Select

2019-02-11 Thread David L Carlson
First expand your data frame into a vector where G1 is repeated 25 times, G2 is 
repeated 15 times, etc. Then draw random samples of 40 from that vector:

> grp <- rep(mydat$group, mydat$count)
> grp.sam <- sample(grp, 40)
> table(grp.sam)
grp.sam
G1 G2 G3 G4 G5 
10  9  5 13  3


David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352


-Original Message-
From: R-help  On Behalf Of Val
Sent: Monday, February 11, 2019 4:36 PM
To: r-help@R-project.org (r-help@r-project.org) 
Subject: [R] Select

Hi all,

I have a data frame  with tow variables  group and its size.
mydat<- read.table( text='group  count
G1 25
G2 15
G3 12
G4 31
G5 10' , header = TRUE, as.is = TRUE )

I want to select   group ID randomly (without replacement)  until  the
sum of count reaches 40.
So, in  the first case, the data frame could be
   G4 31
   65 10

In other case, it could be
  G5 10
  G2 15
  G3 12

How do I put sum of count variable   is  a minimum of 40 restriction?

Than k you in advance






I want to select group  ids randomly until I reach the

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Select

2019-02-11 Thread Val
Hi all,

I have a data frame  with tow variables  group and its size.
mydat<- read.table( text='group  count
G1 25
G2 15
G3 12
G4 31
G5 10' , header = TRUE, as.is = TRUE )

I want to select   group ID randomly (without replacement)  until  the
sum of count reaches 40.
So, in  the first case, the data frame could be
   G4 31
   65 10

In other case, it could be
  G5 10
  G2 15
  G3 12

How do I put sum of count variable   is  a minimum of 40 restriction?

Than k you in advance






I want to select group  ids randomly until I reach the

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Question about bindata lib in high dimensions

2019-02-11 Thread إيمان إسماعيل محمد
even I tried to use another library mipfp to generate multivariate Bernoulli
*using the following:*
> p.joint <- ObtainMultBinaryDist(corr = corr_mat[1:10,1:10], marg.probs =
probs[1:10])
*it Shows:*
Problematic pairs:
 row col
[1,]  10   9
[2,]   9  10
Warning messages:
1: In Corr2PairProbs(corr, marg.probs) :
  Correlation exceeds constrains set by marg.probs, i.e. pair.proba[i, j]
<= marg.probs[i]

2: In Ipfp(seed = seed, target.list = target.list, target.data =
target.data,  :
  Missing values allowed in the target margins.
 Computation of the covariance matrices set to FALSE!
3: In Ipfp(seed = seed, target.list = target.list, target.data =
target.data,  :
  IPFP did not converged after 1000 iteration(s)!
This migh be due to 0 cells in the seed, maximum number
of iteration too low or tolerance too small

*and even if I fix the problematic pair (9,10) with the following:*

> corr_mat[9,10]=runif(1,max = min(probs[9],probs[10]),min  =
max(0,probs[10]+probs[9]-1))
> corr_mat[9,10]
[1] 0.8551618
> corr_mat[10,9]=0.8551618

*it still give me the same error.*

> p.joint <- ObtainMultBinaryDist(corr = corr_mat[1:10,1:10], marg.probs =
probs[1:10])
Problematic pairs:
 row col
[1,]  10   9
[2,]   9  10
Warning messages:
1: In Corr2PairProbs(corr, marg.probs) :
  Correlation exceeds constrains set by marg.probs, i.e. pair.proba[i, j]
<= marg.probs[i]

2: In Ipfp(seed = seed, target.list = target.list, target.data =
target.data,  :
  Missing values allowed in the target margins.
 Computation of the covariance matrices set to FALSE!
3: In Ipfp(seed = seed, target.list = target.list, target.data =
target.data,  :
  IPFP did not converged after 1000 iteration(s)!
This migh be due to 0 cells in the seed, maximum number
of iteration too low or tolerance too small
Could anyone help me please?

‪On Mon, 11 Feb 2019 at 13:10, ‫إيمان إسماعيل محمد‬‎ <
emanismail...@gmail.com> wrote:‬

> *Here Sample of Code for 10 variables:*
> > probs_10 = probs[1:10]
> > probs_10
>  [1] 9.795272e-01 9.331778e-01 6.764349e-01 9.884067e-02 9.52e-05
> 3.499417e-03 2.380556e-05 9.826457e-01 9.628633e-01 8.874949e-01
> > corr_mat_10 = corr_mat[1:10,1:10]
> > corr_mat_10
>[,1] [,2] [,3] [,4]
> [,5]  [,6]  [,7]  [,8]  [,9]   [,10]
>  [1,]  1.00  0.540258943  0.209031764  0.047879233 -6.750092e-02
> 0.0085672057  7.053822e-04  0.7840635867  0.6694665745  0.40604770
>  [2,]  0.5402589429  1.0  0.386910326  0.088622750 -3.646798e-02
> -0.0454879132  1.305637e-03  0.4929722619  0.6613106007  0.61159373
>  [3,]  0.2090317635  0.386910326  1.0  0.229052428 -1.410984e-02
> -0.0434598161 -7.054666e-03  0.1909793458  0.2831488805  0.49337866
>  [4,]  0.0478792330  0.088622750  0.229052428  1.0 -3.231892e-03
> -0.0101705338 -1.615888e-03  0.0434012259  0.0646190283  0.11766286
>  [5,] -0.0675009217 -0.036467977 -0.014109837 -0.003231892  1.00e+00
> -0.0005782943 -4.761395e-05 -0.0734320072 -0.0496901947 -0.02740859
>  [6,]  0.0085672057 -0.045487913 -0.043459816 -0.010170534 -5.782943e-04
> 1.00  8.233515e-02  0.0078752345  0.0095061395 -0.03886223
>  [7,]  0.0007053822  0.001305637 -0.007054666 -0.001615888 -4.761395e-05
> 0.0823351499  1.00e+00  0.0006484086  0.0009582161  0.00173719
>  [8,]  0.7840635867  0.492972262  0.190979346  0.043401226 -7.343201e-02
> 0.0078752345  6.484086e-04  1.00  0.6766830516  0.37325133
>  [9,]  0.6694665745  0.661310601  0.283148881  0.064619028 -4.969019e-02
> 0.0095061395  9.582161e-04  0.6766830516  1.00  0.55158959
> [10,]  0.4060477004  0.611593731  0.493378657  0.117662862 -2.740859e-02
> -0.0388622278  1.737190e-03  0.3732513255  0.5515895878  1.
> > library(bindata)
> > r <- rmvbin(10,margprob = probs_10, bincorr = corr_mat_10)
> Not all probabilities are between 0 and 1.
> Error in Element ( 1 , 5 ): Admissible values are in [ 0 ,
> 9.524867284e-05 ].
> Error in Element ( 1 , 7 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 3 , 7 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 4 , 7 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 5 , 7 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 6 , 7 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 7 , 3 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 7 , 4 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 7 , 5 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 7 , 6 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 7 , 8 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
> Error in Element ( 7 , 9 ): Admissible values are in [ 0 ,
> 2.3805556216821e-05 ].
>

Re: [R] Difficulty with "\\" in string functions....

2019-02-11 Thread Bernard
Simple when you know how!

Thanks

Sent from mobile device - please excuse any spelling mistakes.



-- Original Message --

From: William Dunlap
To: Bernard McGarvey
Cc: Ivan Krylov, r-help@r-project.org
Sent: February 11, 2019 at 4:29 PM
Subject: Re: [R] Difficulty with "\\" in string functions

You can also avoid the issue by using the basename and dirname functions.

>Fname1<- "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis Input Data 
>Example WorkBook.xlsx"
>basename(Fname1)
[1] "QT Analysis Input Data Example WorkBook.xlsx"
>dirname(Fname1)
[1] "D:/Data/OneDrive/ISTA Documents/QT_App"


Use normalizePath if you need to convert those / to \ on Windows.

Bill Dunlap
TIBCO Software
wdunlaptibco.com(http://tibco.com)

On Mon, Feb 11, 2019 at 12:26 PM Bernard 
McGarveymailto:mcgarvey.bern...@comcast.net)>wrote:
> Brilliant! Thanks a million Ivan.
> 
> Lion Bernard McGarvey
> 
> 
> Director, Fort Myers Beach Lions Foundation, Inc.
> 
> 
> Retired (Lilly Engineering Fellow).
> 
> 
> >On February 11, 2019 at 3:13 PM Ivan 
> >Krylovmailto:krylov.r...@gmail.com)>wrote:
> >
> >
> >On Mon, 11 Feb 2019 15:01:16 -0500 (EST)
> >Bernard 
> >McGarveymailto:mcgarvey.bern...@comcast.net)>wrote:
> >
> >>Now I try to split it using
> >>
> >>
> >>str_split(Fname1,"\\")
> >>
> >>
> >>but this returns an error
> >>
> >>
> >>Error in stri_split_regex(string, pattern, n = n, simplify =
> >>simplify, : Unrecognized backslash escape sequence in pattern.
> >>(U_REGEX_BAD_ESCAPE_SEQUENCE)
> >
> >This happens because the second parameter of str_split is by default a
> >regular expression, and a backslash has a special meaning in regular
> >expressions: when preceding other characters, it may change the way
> >they are interpreted. (For example, w means a literal "w"
> >character, while \w means "any alphanumeric character". On the
> >other hand, [ starts a character group, but \[ means just an opening
> >square bracket.) See ?regex for more info on that.
> >
> >Since you want a literal backslash, you need to escape it with another
> >backslash: \\
> >
> >But to write a string literal of a double-backslash in R, you need to
> >escape both backslash characters, each with their own backslash: ""
> >
> >## fname<- "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis
> >Input Data Example WorkBook.xlsx"
> >## message("")
> >\\
> >## str_split(fname, "")
> >[[1]]
> >[1] "D:"
> >[2] "Data"
> >[3] "OneDrive"
> >[4] "ISTA Documents"
> >[5] "QT_App"
> >[6] "QT AnalysisInput Data Example WorkBook.xlsx"
> >
> >You can also avoid all layers of the backslash hell (except the first)
> >if you choose to split by fixed strings instead of regular expressions
> >by using stringr::fixed:
> >
> >## str_split(fname, fixed("\\"))
> >
> >--
> >Best regards,
> >Ivan
> 
> __
> R-help@r-project.org(mailto:R-help@r-project.org)mailing list -- To 
> UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Difficulty with "\\" in string functions....

2019-02-11 Thread William Dunlap via R-help
You can also avoid the issue by using the basename and dirname functions.

> Fname1 <- "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis Input
Data Example WorkBook.xlsx"
> basename(Fname1)
[1] "QT Analysis Input Data Example WorkBook.xlsx"
> dirname(Fname1)
[1] "D:/Data/OneDrive/ISTA Documents/QT_App"

Use normalizePath if you need to convert those / to \ on Windows.

Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Mon, Feb 11, 2019 at 12:26 PM Bernard McGarvey <
mcgarvey.bern...@comcast.net> wrote:

> Brilliant! Thanks a million Ivan.
>
> Lion Bernard McGarvey
>
>
> Director, Fort Myers Beach Lions Foundation, Inc.
>
>
> Retired (Lilly Engineering Fellow).
>
>
> > On February 11, 2019 at 3:13 PM Ivan Krylov 
> wrote:
> >
> >
> > On Mon, 11 Feb 2019 15:01:16 -0500 (EST)
> > Bernard McGarvey  wrote:
> >
> > > Now I try to split it using
> > >
> > >
> > > str_split(Fname1,"\\")
> > >
> > >
> > > but this returns an error
> > >
> > >
> > > Error in stri_split_regex(string, pattern, n = n, simplify =
> > > simplify, : Unrecognized backslash escape sequence in pattern.
> > > (U_REGEX_BAD_ESCAPE_SEQUENCE)
> >
> > This happens because the second parameter of str_split is by default a
> > regular expression, and a backslash has a special meaning in regular
> > expressions: when preceding other characters, it may change the way
> > they are interpreted. (For example, w means a literal "w"
> > character, while \w means "any alphanumeric character". On the
> > other hand, [ starts a character group, but \[ means just an opening
> > square bracket.) See ?regex for more info on that.
> >
> > Since you want a literal backslash, you need to escape it with another
> > backslash: \\
> >
> > But to write a string literal of a double-backslash in R, you need to
> > escape both backslash characters, each with their own backslash: ""
> >
> > ## fname <- "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis
> > Input Data Example WorkBook.xlsx"
> > ## message("")
> > \\
> > ## str_split(fname, "")
> > [[1]]
> > [1] "D:"
> > [2] "Data"
> > [3] "OneDrive"
> > [4] "ISTA Documents"
> > [5] "QT_App"
> > [6] "QT AnalysisInput Data Example WorkBook.xlsx"
> >
> > You can also avoid all layers of the backslash hell (except the first)
> > if you choose to split by fixed strings instead of regular expressions
> > by using stringr::fixed:
> >
> > ## str_split(fname, fixed("\\"))
> >
> > --
> > Best regards,
> > Ivan
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Difficulty with "\\" in string functions....

2019-02-11 Thread Bernard McGarvey
Brilliant! Thanks a million Ivan.

Lion Bernard McGarvey


Director, Fort Myers Beach Lions Foundation, Inc.


Retired (Lilly Engineering Fellow).


> On February 11, 2019 at 3:13 PM Ivan Krylov  wrote:
> 
> 
> On Mon, 11 Feb 2019 15:01:16 -0500 (EST)
> Bernard McGarvey  wrote:
> 
> > Now I try to split it using
> > 
> > 
> > str_split(Fname1,"\\")
> > 
> > 
> > but this returns an error
> > 
> > 
> > Error in stri_split_regex(string, pattern, n = n, simplify =
> > simplify, : Unrecognized backslash escape sequence in pattern.
> > (U_REGEX_BAD_ESCAPE_SEQUENCE)
> 
> This happens because the second parameter of str_split is by default a
> regular expression, and a backslash has a special meaning in regular
> expressions: when preceding other characters, it may change the way
> they are interpreted. (For example, w means a literal "w"
> character, while \w means "any alphanumeric character". On the
> other hand, [ starts a character group, but \[ means just an opening
> square bracket.) See ?regex for more info on that.
> 
> Since you want a literal backslash, you need to escape it with another
> backslash: \\
> 
> But to write a string literal of a double-backslash in R, you need to
> escape both backslash characters, each with their own backslash: ""
> 
> ## fname <- "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis
> Input Data Example WorkBook.xlsx"
> ## message("")
> \\
> ## str_split(fname, "")
> [[1]]
> [1] "D:" 
> [2] "Data"   
> [3] "OneDrive"   
> [4] "ISTA Documents" 
> [5] "QT_App" 
> [6] "QT AnalysisInput Data Example WorkBook.xlsx"
> 
> You can also avoid all layers of the backslash hell (except the first)
> if you choose to split by fixed strings instead of regular expressions
> by using stringr::fixed:
> 
> ## str_split(fname, fixed("\\"))
> 
> -- 
> Best regards,
> Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Difficulty with "\\" in string functions....

2019-02-11 Thread Ivan Krylov
On Mon, 11 Feb 2019 15:01:16 -0500 (EST)
Bernard McGarvey  wrote:

> Now I try to split it using
> 
> 
> str_split(Fname1,"\\")
> 
> 
> but this returns an error
> 
> 
> Error in stri_split_regex(string, pattern, n = n, simplify =
> simplify, : Unrecognized backslash escape sequence in pattern.
> (U_REGEX_BAD_ESCAPE_SEQUENCE)

This happens because the second parameter of str_split is by default a
regular expression, and a backslash has a special meaning in regular
expressions: when preceding other characters, it may change the way
they are interpreted. (For example, w means a literal "w"
character, while \w means "any alphanumeric character". On the
other hand, [ starts a character group, but \[ means just an opening
square bracket.) See ?regex for more info on that.

Since you want a literal backslash, you need to escape it with another
backslash: \\

But to write a string literal of a double-backslash in R, you need to
escape both backslash characters, each with their own backslash: ""

## fname <- "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis
Input Data Example WorkBook.xlsx"
## message("")
\\
## str_split(fname, "")
[[1]]
[1] "D:" 
[2] "Data"   
[3] "OneDrive"   
[4] "ISTA Documents" 
[5] "QT_App" 
[6] "QT AnalysisInput Data Example WorkBook.xlsx"

You can also avoid all layers of the backslash hell (except the first)
if you choose to split by fixed strings instead of regular expressions
by using stringr::fixed:

## str_split(fname, fixed("\\"))

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Difficulty with "\\" in string functions....

2019-02-11 Thread Bernard McGarvey
I am using the file.choose() function to choose a file from the dialog box and 
once I get it, I want to be able to split the full name into the folder part 
and the file name part. So for example, when I have closed the file choose 
dialog, the name for the file I get is


Fname1
[1] "D:\\Data\\OneDrive\\ISTA Documents\\QT_App\\QT Analysis Input Data Example 
WorkBook.xlsx"


where the "\\" is used to split the folder and sub-folder and file names. R see 
this "\\" as a single \ backslash character.


Now I try to split it using


str_split(Fname1,"\\")


but this returns an error


Error in stri_split_regex(string, pattern, n = n, simplify = simplify, :
Unrecognized backslash escape sequence in pattern. (U_REGEX_BAD_ESCAPE_SEQUENCE)


I know its got something to do with the \\ because it is treated as a single 
backslash character. But replacing the str_split with


str_split(Fname1,"\")


does not work either. 


Any ideas on how I can handle the \\ and split the full name into its pieces?



Lion Bernard McGarvey

Director, Fort Myers Beach Lions Foundation, Inc.

Retired (Lilly Engineering Fellow).



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Help needed with my code for merging multiple xls files from google drive

2019-02-11 Thread Jeff Newmiller
Your example is not reproducible [1][2][3], you are reposting a copy of an 
email in a fresh thread (instead of replying to the first one), and you are 
using HTML email format on a text-only mailing list (what you see is really not 
what we see). Please read the Posting Guide to find out what the basic 
conventions are for using this mailing list. If you make the reader's job too 
hard they are going to ignore you.

Regarding your question... you don't seem to be executing your code one line at 
a time in order to debug it... you can also try executing just the read_xls 
function with one of the elements of the inputfiles variable to confirm whether 
read_xls is the problem (I think so) or whether lapply is the problem (seems 
unlikely). You should read the examples in the googledrive package... I suspect 
that the readxl package is not designed to handle google docs, but there is an 
as_dribble function in googledrive that may be useful for getting data out of 
it.

[1] 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html (read the 
vignette)

On February 11, 2019 5:11:29 AM PST, Ross Molden  
wrote:
>Hi guys,
>
>I am trying to merge a list of .xls files in google drive. I have now
>managed to create a list of all the files I need, but for some reason I
>still can't manage to merge them, this is the code I have so far:
>
>library(googledrive) inputfiles <- drive_ls(path = "Email It In",
>pattern = "*PDOL_dataexport", n_max = 50)
>
>library(readxl) df.list<- lapply(inputfiles,function(x) read_xls(x))
>library(dplyr) consolidated_data<-bind_rows(df.list)
>
>The second part of the code throws up the following error: 
>
>Error: path must be a string 
>
>I must be entering the path (inputfiles) incorrectly for lapply, can
>someone please help?
>
>Thank in advance!
>Ross
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help needed with my code for merging multiple xls files from google drive

2019-02-11 Thread Ross Molden
Hi guys,

I am trying to merge a list of .xls files in google drive. I have now managed 
to create a list of all the files I need, but for some reason I still can't 
manage to merge them, this is the code I have so far:

library(googledrive) inputfiles <- drive_ls(path = "Email It In", pattern = 
"*PDOL_dataexport", n_max = 50)

library(readxl) df.list<- lapply(inputfiles,function(x) read_xls(x)) 
library(dplyr) consolidated_data<-bind_rows(df.list)

The second part of the code throws up the following error: 

Error: path must be a string 

I must be entering the path (inputfiles) incorrectly for lapply, can someone 
please help?

Thank in advance!
Ross
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Siegel nonparametric regression / mblm package

2019-02-11 Thread Marco Besozzi
Thanks a lot!


Il giorno lun 11 feb 2019 alle ore 14:39 Roger Koenker <
rkoen...@illinois.edu> ha scritto:

> A quick look at the code for Siegel in mblm reveals that it is extremely
> inefficient, but it seems to be correct.
> One “explanation” for this behavior, presuming that we haven’t overlooked
> something more basic, is that such
> high breakdown estimates sacrifice some efficiency, that is to say, they
> are more variable than other methods
> when the data is well behaved, and of course, the Galton data is famously
> “almost Gaussian”.
>
> On Feb 11, 2019, at 12:47 PM, Marco Besozzi 
> wrote:
>
> Thank you very much for your reply.
> If I have well understood, unfortunately in this way I have lost the only
> idea I had...
> Do you believe that a problem in the R algorithm employed in the package
> mblm for Siegel regression is possible?
> And do you know if Siegel regression is available in a different package?
> I was unable to find it.
> Thanks again!
> Best regards.
>
> P.S.: sorry for my bad english...
>
> Il giorno lun 11 feb 2019 alle ore 12:54 Roger Koenker <
> rkoen...@illinois.edu> ha scritto:
>
>> My first thought was also that this was an artifact of the ties, but
>> dithering the data
>> n <- length(child)
>> child <- child + runif(n,-.5,.5)
>> parent <- parent + runif(n,-.5,.5)
>>
>> and rerunning yields the same discrepancy between the Siegel and other
>> fits. Curiously, both
>> lmsreg and ltsreg from MASS produce lines that are more steeply sloped
>> than those
>> of the other methods.  Since I stupidly forgot to set.seed(), YMMV.
>>
>> > On Feb 11, 2019, at 10:24 AM, Marco Besozzi 
>> wrote:
>> >
>> > I employed the "galton" set of data included in the package "psych".
>> With
>> > the package "mblm" I obtained the Theil-Sen nonparametric regression and
>> > the Siegel non parametric regression, and compared them with the
>> ordinary
>> > least square regression line.
>> > The results of standard regression and Theil-Sen regression are
>> practically
>> > identical. But the Siegel regression seems to have a bias that I cannot
>> > understand. May I ask for a possible explanation? The bias may be
>> related
>> > to the number of ties in the set of data? Here's the code and the image.
>> >
>> > Best regards.
>> >
>> > Marco Besozzi
>> > # Theil-Sen and Siegel nonparametric regression with package mblm
>> > # comparison with ordinary least squares (parametric) regression
>> > # on galton set of data included in the package psych
>> > #
>> > library(psych)
>> > attach(galton)
>> > library(mblm)
>> > #
>> > reglin_yx <- lm(child ~ parent, data=galton) # ordinary least squares
>> > (parametric) regression
>> > a_yx <- reglin_yx$coefficients[1] # intercept a
>> > b_yx <- reglin_yx$coefficients[2] # slope b
>> > #
>> > regnonTS <- mblm(child ~ parent, data=galton, repeated=FALSE) #
>> Theil-Sen
>> > nonparametric regression (wait a few minutes!)
>> > a_TS <- regnonTS$coefficients[1] # intercept a
>> > b_TS <- regnonTS$coefficients[2] # slope b
>> > #
>> > regnonS = mblm(child ~ parent, data=galton, repeated=TRUE) # Siegel
>> > nonparametric regression
>> > a_S <- regnonS$coefficients[1] # intercept a
>> > b_S <- regnonS$coefficients[2] # slope b
>> > #
>> > # xy plot of data and regression lines
>> > #
>> > windows() # open a new window
>> > plot(parent, child, xlim = c(60,80), ylim = c(60,80), pch=1,
>> xlab="Parent
>> > heigt (inch)", ylab="Chile height (inch)", main="Regression lines
>> > comparison", cex.main = 0.9) # data plot
>> > abline(a_yx, b_yx, col="green", lty=1) # ordinary least squares
>> > (parametric) regression line
>> > abline(a_TS, b_TS, col="blue", lty=1) # Theil-Sen nonparametric
>> regression
>> > line
>> > abline(a_S, b_S, col="red", lty=1) # Siegel nonparametric regression
>> > legend(60, 80, legend=c("Ordinary least squares regression", "Theil-Sen
>> > nonparametric regression","Siegel nonparametric regression"),
>> > col=c("green", "blue", "red"), lty=c(4,4,1), cex=0.8) # add a legend
>> > #
>> > __
>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> 
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Siegel nonparametric regression / mblm package

2019-02-11 Thread Roger Koenker
A quick look at the code for Siegel in mblm reveals that it is extremely 
inefficient, but it seems to be correct.
One “explanation” for this behavior, presuming that we haven’t overlooked 
something more basic, is that such
high breakdown estimates sacrifice some efficiency, that is to say, they are 
more variable than other methods
when the data is well behaved, and of course, the Galton data is famously 
“almost Gaussian”.

> On Feb 11, 2019, at 12:47 PM, Marco Besozzi  wrote:
> 
> Thank you very much for your reply.
> If I have well understood, unfortunately in this way I have lost the only 
> idea I had...
> Do you believe that a problem in the R algorithm employed in the package mblm 
> for Siegel regression is possible?
> And do you know if Siegel regression is available in a different package? I 
> was unable to find it.
> Thanks again!
> Best regards.
> 
> P.S.: sorry for my bad english...
> 
> Il giorno lun 11 feb 2019 alle ore 12:54 Roger Koenker  > ha scritto:
> My first thought was also that this was an artifact of the ties, but 
> dithering the data
> n <- length(child)
> child <- child + runif(n,-.5,.5)
> parent <- parent + runif(n,-.5,.5)
> 
> and rerunning yields the same discrepancy between the Siegel and other fits. 
> Curiously, both
> lmsreg and ltsreg from MASS produce lines that are more steeply sloped than 
> those
> of the other methods.  Since I stupidly forgot to set.seed(), YMMV.
> 
> > On Feb 11, 2019, at 10:24 AM, Marco Besozzi  > > wrote:
> > 
> > I employed the "galton" set of data included in the package "psych". With
> > the package "mblm" I obtained the Theil-Sen nonparametric regression and
> > the Siegel non parametric regression, and compared them with the ordinary
> > least square regression line.
> > The results of standard regression and Theil-Sen regression are practically
> > identical. But the Siegel regression seems to have a bias that I cannot
> > understand. May I ask for a possible explanation? The bias may be related
> > to the number of ties in the set of data? Here's the code and the image.
> > 
> > Best regards.
> > 
> > Marco Besozzi
> > # Theil-Sen and Siegel nonparametric regression with package mblm
> > # comparison with ordinary least squares (parametric) regression
> > # on galton set of data included in the package psych
> > #
> > library(psych)
> > attach(galton)
> > library(mblm)
> > #
> > reglin_yx <- lm(child ~ parent, data=galton) # ordinary least squares
> > (parametric) regression
> > a_yx <- reglin_yx$coefficients[1] # intercept a
> > b_yx <- reglin_yx$coefficients[2] # slope b
> > #
> > regnonTS <- mblm(child ~ parent, data=galton, repeated=FALSE) # Theil-Sen
> > nonparametric regression (wait a few minutes!)
> > a_TS <- regnonTS$coefficients[1] # intercept a
> > b_TS <- regnonTS$coefficients[2] # slope b
> > #
> > regnonS = mblm(child ~ parent, data=galton, repeated=TRUE) # Siegel
> > nonparametric regression
> > a_S <- regnonS$coefficients[1] # intercept a
> > b_S <- regnonS$coefficients[2] # slope b
> > #
> > # xy plot of data and regression lines
> > #
> > windows() # open a new window
> > plot(parent, child, xlim = c(60,80), ylim = c(60,80), pch=1, xlab="Parent
> > heigt (inch)", ylab="Chile height (inch)", main="Regression lines
> > comparison", cex.main = 0.9) # data plot
> > abline(a_yx, b_yx, col="green", lty=1) # ordinary least squares
> > (parametric) regression line
> > abline(a_TS, b_TS, col="blue", lty=1) # Theil-Sen nonparametric regression
> > line
> > abline(a_S, b_S, col="red", lty=1) # Siegel nonparametric regression
> > legend(60, 80, legend=c("Ordinary least squares regression", "Theil-Sen
> > nonparametric regression","Siegel nonparametric regression"),
> > col=c("green", "blue", "red"), lty=c(4,4,1), cex=0.8) # add a legend
> > #
> > __
> > R-help@r-project.org  mailing list -- To 
> > UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help 
> > 
> > PLEASE do read the posting guide 
> > http://www.R-project.org/posting-guide.html 
> > 
> > and provide commented, minimal, self-contained, reproducible code.
> 


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] (no subject)

2019-02-11 Thread Adrian Johnson
Pardon me, I forgot to add subject line.
-Adrian.

On Sun, Feb 10, 2019 at 3:49 PM Adrian Johnson
 wrote:
>
> Dear group,
>
> I have two large matrices.
>
> Matrix one: is 24776 x 76 (example toy1 dput object given below)
>
> Matrix two: is 12913 x 76 (example toy2 dput object given below)
>
> Column names of both matrices are identical.
>
> My aim is:
>
> a. Take each row of toy2 and transform vector into UP (>0)  and DN (
> <0 ) categories. (kc)
> b  Test association between kc and every row of toy1.
>
> My code, given below, although this works but is very slow.
>
> I gave dput objects for toy1, toy2 and result matrix.
>
> Could you suggest/help me how I can make this faster.  Also, how can I
> select values in result column that are less than 0.001 (p < 0.001).
>
> Appreciate your help. Thank you.
>
> Code:
> ===
>
>
>
> result <- matrix(NA,nrow=nrow(toy1),ncol=nrow(toy2))
>
> rownames(result) <- rownames(toy1)
> colnames(result) <- rownames(toy2)
>
> for(i in 1:nrow(toy2)){
> for(j in 1:nrow(toy1)){
> kx = toy2[i,]
> kc <- rep('NC',length(kx))
> kc[ kx >0] <- 'UP'
> kc[ kx <=0 ] <- 'DN'
> xpv <- fisher.test(table(kc,toy1[j,]),simulate.p.value = TRUE)$p.value
> result[j,i] <- xpv
> }
> }
>
> ===
>
>
> ===
>
>
> > dput(toy1)
> structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
> -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1,
> -1, -1, -1, -1, -1), .Dim = c(10L, 7L), .Dimnames = list(c("ACAP3",
> "ACTRT2", "AGRN", "ANKRD65", "ATAD3A", "ATAD3B", "ATAD3C", "AURKAIP1",
> "B3GALT6", "C1orf159"), c("a", "b", "c", "d", "e", "f", "g")))
>
>
>
> > dput(toy2)
> structure(c(-0.242891119688613, -0.0514058216682132, 0.138447212993773,
> -0.312576648033122, 0.271489918720452, -0.281196468299486, 
> -0.0407160143344565,
> -0.328353812845287, 0.151667836674511, 0.408596843743938, -0.049351944902924,
> 0.238586287349249, 0.200571558784821, -0.0737604184858411, 0.245971526254877,
> 0.24740263959845, -0.161528943131908, 0.197521973013793, 0.0402668125708444,
> 0.376323735212088, 0.0731550871764204, 0.385270176969893, 0.28953042756208,
> 0.062587289401188, -0.281187168932979, -0.0202298984561554, 
> -0.0848696970309447,
> 0.0349676726358973, -0.520484215644868, -0.481991414222996,
> -0.00698099201388211,
> 0.135503878341873, 0.156983081312087, 0.320223832092661, 0.34582193394074,
> 0.0844455960468667, -0.157825604090972, 0.204758250510969, 0.261796072978612,
> -0.19510450641405, 0.43196474472874, -0.211155577453175, -0.0921641871215187,
> 0.420950361292263, 0.390261862151936, -0.422273930504427, 0.344653684951627,
> 0.0378273248838503, 0.197782027324611, 0.0963124876309569, 0.332093167080656,
> 0.128036554821915, -0.41338065859335, -0.409470440033177, 0.371490567256253,
> -0.0912549189140141, -0.247451812684234, 0.127741739114639, 
> 0.0856254238844557,
> 0.515282940316031, -0.25675759521248, 0.333943163209869, 0.604141413840881,
> 0.0824942299510931, -0.179605710473021, -0.275604207054643, 
> -0.113251154591898,
> 0.172897837449258, -0.329808795076691, -0.239255324324506), .Dim = c(10L,
> 7L), .Dimnames = list(c("chr5q23", "chr16q24", "chr8q24", "chr13q11",
> "chr7p21", "chr10q23", "chr13q13", "chr10q21", "chr1p13", "chrxp21"
> ), c("a", "b", "c", "d", "e", "f", "g")))
> >
>
>
> > dput(result)
> structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.532733633183408,
> 0.511244377811094, 0.528235882058971, 0.526736631684158, 0.51424287856072,
> 0.530734632683658, 0.513243378310845, 0.533233383308346, 0.542228885557221,
> 0.517241379310345, 0.532733633183408, 0.521739130434783, 0.529235382308846,
> 0.530234882558721, 0.548725637181409, 0.525737131434283, 0.527236381809095,
> 0.532733633183408, 0.530234882558721, 0.520739630184908, 0.15592203898051,
> 0.142928535732134, 0.140929535232384, 0.150924537731134, 0.160419790104948,
> 0.139430284857571, 0.152923538230885, 0.146426786606697, 0.149425287356322,
> 0.145427286356822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.282358820589705,
> 0.293853073463268, 0.262868565717141, 0.290854572713643, 0.276861569215392,
> 0.288855572213893, 0.282358820589705, 0.292853573213393, 0.286356821589205,
> 0.271364317841079, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> 1, 1, 1, 1, 1, 1), .Dim = c(10L, 10L), .Dimnames = list(c("ACAP3",
> "ACTRT2", "AGRN", "ANKRD65", "ATAD3A", "ATAD3B", "ATAD3C", "AURKAIP1",
> "B3GALT6", "C1orf159"), c("chr5q23", "chr16q24", "chr8q24", "chr13q11",
> "chr7p21", "chr10q23", "chr13q13", "chr10q21", "chr1p13", "chrxp21"
> )))
>
>
> ===

___

Re: [R] Siegel nonparametric regression / mblm package

2019-02-11 Thread Roger Koenker
My first thought was also that this was an artifact of the ties, but dithering 
the data
n <- length(child)
child <- child + runif(n,-.5,.5)
parent <- parent + runif(n,-.5,.5)

and rerunning yields the same discrepancy between the Siegel and other fits. 
Curiously, both
lmsreg and ltsreg from MASS produce lines that are more steeply sloped than 
those
of the other methods.  Since I stupidly forgot to set.seed(), YMMV.

> On Feb 11, 2019, at 10:24 AM, Marco Besozzi  wrote:
> 
> I employed the "galton" set of data included in the package "psych". With
> the package "mblm" I obtained the Theil-Sen nonparametric regression and
> the Siegel non parametric regression, and compared them with the ordinary
> least square regression line.
> The results of standard regression and Theil-Sen regression are practically
> identical. But the Siegel regression seems to have a bias that I cannot
> understand. May I ask for a possible explanation? The bias may be related
> to the number of ties in the set of data? Here's the code and the image.
> 
> Best regards.
> 
> Marco Besozzi
> # Theil-Sen and Siegel nonparametric regression with package mblm
> # comparison with ordinary least squares (parametric) regression
> # on galton set of data included in the package psych
> #
> library(psych)
> attach(galton)
> library(mblm)
> #
> reglin_yx <- lm(child ~ parent, data=galton) # ordinary least squares
> (parametric) regression
> a_yx <- reglin_yx$coefficients[1] # intercept a
> b_yx <- reglin_yx$coefficients[2] # slope b
> #
> regnonTS <- mblm(child ~ parent, data=galton, repeated=FALSE) # Theil-Sen
> nonparametric regression (wait a few minutes!)
> a_TS <- regnonTS$coefficients[1] # intercept a
> b_TS <- regnonTS$coefficients[2] # slope b
> #
> regnonS = mblm(child ~ parent, data=galton, repeated=TRUE) # Siegel
> nonparametric regression
> a_S <- regnonS$coefficients[1] # intercept a
> b_S <- regnonS$coefficients[2] # slope b
> #
> # xy plot of data and regression lines
> #
> windows() # open a new window
> plot(parent, child, xlim = c(60,80), ylim = c(60,80), pch=1, xlab="Parent
> heigt (inch)", ylab="Chile height (inch)", main="Regression lines
> comparison", cex.main = 0.9) # data plot
> abline(a_yx, b_yx, col="green", lty=1) # ordinary least squares
> (parametric) regression line
> abline(a_TS, b_TS, col="blue", lty=1) # Theil-Sen nonparametric regression
> line
> abline(a_S, b_S, col="red", lty=1) # Siegel nonparametric regression
> legend(60, 80, legend=c("Ordinary least squares regression", "Theil-Sen
> nonparametric regression","Siegel nonparametric regression"),
> col=c("green", "blue", "red"), lty=c(4,4,1), cex=0.8) # add a legend
> #
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pattern evaluation in electron microscopy images

2019-02-11 Thread S Ellison
Not really my field, but would you not approach this using FFT on selected 
regions?

I think IMageJ has some capability in that area; see example at 
https://imagej.nih.gov/ij/docs/examples/tem/.

Steve Ellison



> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of PIKAL Petr
> Sent: 08 February 2019 09:54
> To: r-help@r-project.org
> Subject: [R] pattern evaluation in electron microscopy images
> 
> Dear all
> 
> I enclose 3 electron microscope images in which I would like to evaluate
> plane spacing.
> 
> Before I start to dig deeper and use trial and error in trying to find some
> packages/functions for such pattern evaluation in electron microscopy
> pictures I would like to ask if anybody could point me to suitable
> packages/functions.
> 
> I am aware of EBImage package for general purpose image manipulation, but
> it does not have such functionality.
> 
> Best regards
> Petr
> 
> If images did not came through please use this link:
> Stáhnout
> soubory a77b-4ff6-8155-d9302e7b151b>.
> 
> Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních
> partnerů PRECHEZA a.s. jsou zveřejněny na:
> https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information
> about processing and protection of business partner's personal data are
> available on website: https://www.precheza.cz/en/personal-data-
> protection-principles/
> Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou
> důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení
> odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any
> documents attached to it may be confidential and are subject to the legally
> binding disclaimer: https://www.precheza.cz/en/01-disclaimer/
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.


***
This email and any attachments are confidential. Any use...{{dropped:8}}

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] [FORGED] I'm Working On A Data Security Article - Quick Question

2019-02-11 Thread Duncan Murdoch

On 11/02/2019 4:26 a.m., Rolf Turner wrote:

On 2/11/19 3:57 AM, Murris Johnson wrote:



Hi,


I have a quick question for you about a page on your site that briefly
mentions a data security topic, 
https://stat.ethz.ch/pipermail/r-help/2008-May/162561.html.


I plan on writing a few guest authored articles in the next month or so
that talk about data security & breaches, are you ok with me possibly
linking to your above-mentioned webpage?


I'm not entirely sure which sites I may link to or reference in the
articles yet, but I'd like to have a few different options to choose
from... so please let me know what you think when you have a moment to let
me know. Whatever you decide, thanks for your time and I don't expect a
response if you're not interested. Thanks.


Are you pulling our legs?


No, he's a spammer who clearly hasn't read the link he's asking about. 
There are probably thousands of them.


Duncan Murdoch



Personally I haven't got a clue what you are asking.

Also, please note that r-help is a world wide "community" with hundreds
of thousands of members.  (I am but one of this large and unruly mob.)
It is not a single entity or "site".  (There is a formal organisation
that runs the R show, but you are not really addressing this formal
organisation.)

The URL that you refer to is a joke!  Apparently some idiotic Windoze
antiviral software once identified the R executable for Windoze as being
a virus.  This is not to taken seriously.

cheers,

Rolf Turner



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Question about bindata lib in high dimensions

2019-02-11 Thread إيمان إسماعيل محمد
*Here Sample of Code for 10 variables:*
> probs_10 = probs[1:10]
> probs_10
 [1] 9.795272e-01 9.331778e-01 6.764349e-01 9.884067e-02 9.52e-05
3.499417e-03 2.380556e-05 9.826457e-01 9.628633e-01 8.874949e-01
> corr_mat_10 = corr_mat[1:10,1:10]
> corr_mat_10
   [,1] [,2] [,3] [,4]
[,5]  [,6]  [,7]  [,8]  [,9]   [,10]
 [1,]  1.00  0.540258943  0.209031764  0.047879233 -6.750092e-02
0.0085672057  7.053822e-04  0.7840635867  0.6694665745  0.40604770
 [2,]  0.5402589429  1.0  0.386910326  0.088622750 -3.646798e-02
-0.0454879132  1.305637e-03  0.4929722619  0.6613106007  0.61159373
 [3,]  0.2090317635  0.386910326  1.0  0.229052428 -1.410984e-02
-0.0434598161 -7.054666e-03  0.1909793458  0.2831488805  0.49337866
 [4,]  0.0478792330  0.088622750  0.229052428  1.0 -3.231892e-03
-0.0101705338 -1.615888e-03  0.0434012259  0.0646190283  0.11766286
 [5,] -0.0675009217 -0.036467977 -0.014109837 -0.003231892  1.00e+00
-0.0005782943 -4.761395e-05 -0.0734320072 -0.0496901947 -0.02740859
 [6,]  0.0085672057 -0.045487913 -0.043459816 -0.010170534 -5.782943e-04
1.00  8.233515e-02  0.0078752345  0.0095061395 -0.03886223
 [7,]  0.0007053822  0.001305637 -0.007054666 -0.001615888 -4.761395e-05
0.0823351499  1.00e+00  0.0006484086  0.0009582161  0.00173719
 [8,]  0.7840635867  0.492972262  0.190979346  0.043401226 -7.343201e-02
0.0078752345  6.484086e-04  1.00  0.6766830516  0.37325133
 [9,]  0.6694665745  0.661310601  0.283148881  0.064619028 -4.969019e-02
0.0095061395  9.582161e-04  0.6766830516  1.00  0.55158959
[10,]  0.4060477004  0.611593731  0.493378657  0.117662862 -2.740859e-02
-0.0388622278  1.737190e-03  0.3732513255  0.5515895878  1.
> library(bindata)
> r <- rmvbin(10,margprob = probs_10, bincorr = corr_mat_10)
Not all probabilities are between 0 and 1.
Error in Element ( 1 , 5 ): Admissible values are in [ 0 ,
9.524867284e-05 ].
Error in Element ( 1 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 3 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 4 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 5 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 6 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 3 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 4 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 5 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 6 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 8 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 9 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 7 , 10 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 8 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 9 , 7 ): Admissible values are in [ 0 ,
2.3805556216821e-05 ].
Error in Element ( 9 , 10 ): Admissible values are in [ 0.850358273621063 ,
0.887494941319304 ].
Error in commonprob2sigma(commonprob, simulvals) :
  Matrix commonprob not admissible.

*Then I tried to fix wrong values to be within range with the following:*
> corr_mat_10[1,5]=runif(1,min=0,max=9.524867284e-05)
> corr_mat_10[1,5]
[1] 7.915036e-05
> corr_mat_10[5,1]=7.915036e-05

*and did the same for all elements but the same error raised:*
> r <- rmvbin(10,margprob = probs_10, bincorr = corr_mat_10)
Error in Element ( 9 , 10 ): Admissible values are in [ 0.850358273621063 ,
0.887494941319304 ].
Error in commonprob2sigma(commonprob, simulvals) :
  Matrix commonprob not admissible.

*Finally I check the value of (9,10) it is within range but the same error
raised :*
> corr_mat_10[9,10]
[1] 0.8793437

I don't know How to fix it?

On Mon, 11 Feb 2019 at 12:23, Eric Berger  wrote:

> Hi Eman,
> It helps if you create a small example that reproduces the problem and
> then post the code with your question.
> This will help people determine what is causing the problem.
>
> Best,
> Eric
>
>
> ‪On Mon, Feb 11, 2019 at 11:52 AM ‫إيمان إسماعيل محمد‬‎ <
> emanismail...@gmail.com> wrote:‬
>
>> I need to simulate data for 2000 binary variables given a vector of
>> marginal probabilities and a correlation matrix. I used bindata library,
>> but it give me
>>
>>  Not all probabilities are between 0 and 1.
>> Error in Element ( i , j ): Admissible values are in [.].
>> Error in commonprob2sigma(commonprob, simulvals) :
>>   Matrix commonprob not admissible.
>>
>>  and I tried to get the elements within range but still have the same
>> problem
>>
>> How can I fix the correlation matrix or how to track error ??
>>
>> Thanks
>> Eman
>>
>> [[alternative HTML version deleted]]
>>
>> 

[R] Siegel nonparametric regression / mblm package

2019-02-11 Thread Marco Besozzi
I employed the "galton" set of data included in the package "psych". With
the package "mblm" I obtained the Theil-Sen nonparametric regression and
the Siegel non parametric regression, and compared them with the ordinary
least square regression line.
The results of standard regression and Theil-Sen regression are practically
identical. But the Siegel regression seems to have a bias that I cannot
understand. May I ask for a possible explanation? The bias may be related
to the number of ties in the set of data? Here's the code and the image.

Best regards.

Marco Besozzi
# Theil-Sen and Siegel nonparametric regression with package mblm
# comparison with ordinary least squares (parametric) regression
# on galton set of data included in the package psych
#
library(psych)
attach(galton)
library(mblm)
#
reglin_yx <- lm(child ~ parent, data=galton) # ordinary least squares
(parametric) regression
a_yx <- reglin_yx$coefficients[1] # intercept a
b_yx <- reglin_yx$coefficients[2] # slope b
#
regnonTS <- mblm(child ~ parent, data=galton, repeated=FALSE) # Theil-Sen
nonparametric regression (wait a few minutes!)
a_TS <- regnonTS$coefficients[1] # intercept a
b_TS <- regnonTS$coefficients[2] # slope b
#
regnonS = mblm(child ~ parent, data=galton, repeated=TRUE) # Siegel
nonparametric regression
a_S <- regnonS$coefficients[1] # intercept a
b_S <- regnonS$coefficients[2] # slope b
#
# xy plot of data and regression lines
#
windows() # open a new window
plot(parent, child, xlim = c(60,80), ylim = c(60,80), pch=1, xlab="Parent
heigt (inch)", ylab="Chile height (inch)", main="Regression lines
comparison", cex.main = 0.9) # data plot
abline(a_yx, b_yx, col="green", lty=1) # ordinary least squares
(parametric) regression line
abline(a_TS, b_TS, col="blue", lty=1) # Theil-Sen nonparametric regression
line
abline(a_S, b_S, col="red", lty=1) # Siegel nonparametric regression
legend(60, 80, legend=c("Ordinary least squares regression", "Theil-Sen
nonparametric regression","Siegel nonparametric regression"),
col=c("green", "blue", "red"), lty=c(4,4,1), cex=0.8) # add a legend
#
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Question about bindata lib in high dimensions

2019-02-11 Thread Eric Berger
Hi Eman,
It helps if you create a small example that reproduces the problem and then
post the code with your question.
This will help people determine what is causing the problem.

Best,
Eric


‪On Mon, Feb 11, 2019 at 11:52 AM ‫إيمان إسماعيل محمد‬‎ <
emanismail...@gmail.com> wrote:‬

> I need to simulate data for 2000 binary variables given a vector of
> marginal probabilities and a correlation matrix. I used bindata library,
> but it give me
>
>  Not all probabilities are between 0 and 1.
> Error in Element ( i , j ): Admissible values are in [.].
> Error in commonprob2sigma(commonprob, simulvals) :
>   Matrix commonprob not admissible.
>
>  and I tried to get the elements within range but still have the same
> problem
>
> How can I fix the correlation matrix or how to track error ??
>
> Thanks
> Eman
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] I'm Working On A Data Security Article - Quick Question

2019-02-11 Thread Berend Hasselman


Just read the complete thread. 
That will clarify.

Nothing wrong with R or RGUI; the virus checker is wrong.
regards,

Berend Hasselman

> On 10 Feb 2019, at 15:57, Murris Johnson  wrote:
> 
> 
> 
> Hi,
> 
> 
> I have a quick question for you about a page on your site that briefly 
> mentions a data security topic, 
> https://stat.ethz.ch/pipermail/r-help/2008-May/162561.html. 
> 
> 
> I plan on writing a few guest authored articles in the next month or so 
> that talk about data security & breaches, are you ok with me possibly 
> linking to your above-mentioned webpage? 
> 
> 
> I'm not entirely sure which sites I may link to or reference in the 
> articles yet, but I'd like to have a few different options to choose 
> from... so please let me know what you think when you have a moment to let 
> me know. Whatever you decide, thanks for your time and I don't expect a 
> response if you're not interested. Thanks.
> 
> 
> Murris
> 
> 
> 
> PS: If this question was a disturbance, click this 
> 
>  and I won't email you again.
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Question about bindata lib in high dimensions

2019-02-11 Thread إيمان إسماعيل محمد
I need to simulate data for 2000 binary variables given a vector of
marginal probabilities and a correlation matrix. I used bindata library,
but it give me

 Not all probabilities are between 0 and 1.
Error in Element ( i , j ): Admissible values are in [.].
Error in commonprob2sigma(commonprob, simulvals) :
  Matrix commonprob not admissible.

 and I tried to get the elements within range but still have the same problem

How can I fix the correlation matrix or how to track error ??

Thanks
Eman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] [FORGED] I'm Working On A Data Security Article - Quick Question

2019-02-11 Thread Rolf Turner

On 2/11/19 3:57 AM, Murris Johnson wrote:



Hi,


I have a quick question for you about a page on your site that briefly
mentions a data security topic, 
https://stat.ethz.ch/pipermail/r-help/2008-May/162561.html.


I plan on writing a few guest authored articles in the next month or so
that talk about data security & breaches, are you ok with me possibly
linking to your above-mentioned webpage?


I'm not entirely sure which sites I may link to or reference in the
articles yet, but I'd like to have a few different options to choose
from... so please let me know what you think when you have a moment to let
me know. Whatever you decide, thanks for your time and I don't expect a
response if you're not interested. Thanks.


Are you pulling our legs?

Personally I haven't got a clue what you are asking.

Also, please note that r-help is a world wide "community" with hundreds 
of thousands of members.  (I am but one of this large and unruly mob.) 
It is not a single entity or "site".  (There is a formal organisation 
that runs the R show, but you are not really addressing this formal 
organisation.)


The URL that you refer to is a joke!  Apparently some idiotic Windoze 
antiviral software once identified the R executable for Windoze as being 
a virus.  This is not to taken seriously.


cheers,

Rolf Turner

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] I'm Working On A Data Security Article - Quick Question

2019-02-11 Thread Murris Johnson



Hi,


I have a quick question for you about a page on your site that briefly 
mentions a data security topic, 
https://stat.ethz.ch/pipermail/r-help/2008-May/162561.html. 


I plan on writing a few guest authored articles in the next month or so 
that talk about data security & breaches, are you ok with me possibly 
linking to your above-mentioned webpage? 


I'm not entirely sure which sites I may link to or reference in the 
articles yet, but I'd like to have a few different options to choose 
from... so please let me know what you think when you have a moment to let 
me know. Whatever you decide, thanks for your time and I don't expect a 
response if you're not interested. Thanks.


Murris



PS: If this question was a disturbance, click this 

 and I won't email you again.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.