[R] adding vector values to corresponding components of a list

2015-12-15 Thread debra ragland via R-help
Hello, I have tried this 2 ways and I keep coming to a dead end as I am not very proficient in R. I have a logical matrix, where I would like to generate every row-wise pair of logical values for further testing. That is row1, row2; row 1, row3 etc. Ideally, I would like to assign a pre-genera

Re: [R] applying wilcox.test to every combination of rows in a matrix (pairwise)

2015-12-09 Thread debra ragland via R-help
Sorry for the repost, but I want to clarify that I am trying to apply the wilcox.test to every pairwise combination of rows i.e. row 1 with row 2, row 1 with row 3, row 1 with row 4 and so on until all row combinations have been achieved. I've made some corrections. On Wednesday, December 9,

[R] applying wilcox.test to every combination of rows in a matrix (pairwise)

2015-12-09 Thread debra ragland via R-help
Hello All, I have written the following loop which will apply/split the same vector of numbers (pc1.eigv) to each (logical) row of a matrix and run a wilcox.test on those values that line up with TRUE and those that line up with FALSE. It works fine. However, I am now interested in using the sa

Re: [R] looping through rows of a logical matrix for combination with and testing of a numeric vector

2015-12-03 Thread debra ragland via R-help
st B. On Dec 3, 2015, at 10:28 AM, debra ragland via R-help wrote: > I have read in a sequence alignment and have done the necessary steps to > separate and store the elements of the original input into a new list of > character vectors. I have compared the sequence list to a &q

Re: [R] looping through rows of a logical matrix for combination with and testing of a numeric vector

2015-12-03 Thread debra ragland via R-help
of the matrix: x <- mat[3, x2] y <- mat[3, !x2] Or: use the formula version of wilcox.test as explained in ?wilcox.test B. On Dec 3, 2015, at 10:28 AM, debra ragland via R-help wrote: > I have read in a sequence alignment and have done the necessary steps to > separate a

[R] looping through rows of a logical matrix for combination with and testing of a numeric vector

2015-12-03 Thread debra ragland via R-help
I have read in a sequence alignment and have done the necessary steps to separate and store the elements of the original input into a new list of character vectors. I have compared the sequence list to a "standard" vector, such that the return is a matrix of logical values indicating TRUE if the

[R] Looping through multiple sub elements of a list to compare to multiple components of a vector

2015-12-02 Thread debra ragland via R-help
I think I am making this problem harder than it has to be and so I keep getting stuck on what might be a trivial problem.  I have used the seqinr package to load a protein sequence alignment containing 15 protein sequences;     > library(seqinr)    > x = read.alignment("proteins.fasta",format="f

Re: [R] PCA plot of variable names only

2015-11-30 Thread debra ragland via R-help
The > function prcomp() returns a list in which the matrix x contains the rotated > values of your input. Assuming that your "variable names" are the rownames of > your input, you can plot them with text().  > > Something like (untested): > > myPCA <-

[R] PCA plot of variable names only

2015-11-30 Thread debra ragland via R-help
Hello,  A colleague of mine prepared a PCA plot of my data and I have no clue how he did it. My original data set contains 15 variables and 64 observations. I have been trying to figure out how he did it on my own, and I have asked but he's swamped so his response is taking longer than usual. A

[R] Probing a protein sequence alignment in R

2015-11-24 Thread debra ragland via R-help
I have 15 protein sequences of 99 amino acids each. After doing some looking around I have found that there are several ways you can read sequences into R and do pairwise or multiple alignments. I, however, do not know how to probe changes at specific positions. For instance, I would like to kno

[R] applying coda package effectiveSize function to a list

2015-07-01 Thread debra ragland via R-help
Please help,I am spinning my wheels behind what should be a pretty simple solution. I found a solution by asking another question on here but it seems to not be effective on all my files of similar make up to the test case. I am simply trying to read data into R, group/order it by chain and atom

[R] Help with order.max in ar.yw.default

2015-07-01 Thread debra ragland via R-help
Hello,  I am trying to fit my data to the default autoregressive models in R. I'm trying to apply the effectiveSize function from the coda package to a list of data frames using;  sapply(splits, function(x) coda::effectiveSize(x["V5"]))  However when I do, I get the error;  Error in ar.yw.defa