[R] How to delete designated sequences in alignment (DNAbin object)

2014-06-19 Thread Juan Antonio Balbuena
This is a simple question but could not find any specific help information: I have a DNAbin object created with read.dna() of ape and would like to remove several sequences of "conflicting taxa". How can I do it using a vector with the lables of the taxa to remove? Thanks in advance

Re: [R] multicore and mclapply problem in calculation server

2013-12-20 Thread Juan Antonio Balbuena
e, the systems gets quickly overflowed. So the solution is to split length(linH) into blocks equal to the number of cpus and the message to end-users is "be careful with parallel processing functions in R". Cheers Juan Antonio Balbuena El 19/12/2013 22:03, p_connolly escribió:

[R] multicore and mclapply problem in calculation server

2013-12-18 Thread Juan Antonio Balbuena
Hello I am using package multicore for parallel computing in a Altix UltraViolet 1000 server with 64 CPUs and 960 GB of RAM memory. Access is managed by means of a SGE queue system. This is the first time I am using parallel computing and my experience with supercomputers is quite l

[R] Same code - error in one PC but not in other

2013-11-07 Thread Juan Antonio Balbuena
Hello I am running exactly the same code on two different computers. In PC1 of the the code is working fine, whereas in PC2 I get this error Error in HP.LUT[, 1] : incorrect number of dimensions HP.LUT is an object within a function computed as HP.LUT <- which(HP ==1, arr.in=TRUE

Re: [R] transform dataframe with look-up table

2013-07-26 Thread Juan Antonio Balbuena
t (pun intentional): End <- merge(merge(Start, transformer, by.x="Right", by.y="input", all.x=TRUE), transformer, by.x="Left", by.y="input", all.x=TRUE) Best wishes Juan Antonio El 25/07/2013 18:02, Brian Diggs escribió: On 7/25/20

[R] transform dataframe with look-up table

2013-07-25 Thread Juan Antonio Balbuena
output for [5, ] should be NA NA. Thank you very much for your time. Juan Antonio Balbuena -- Dr. Juan A. Balbuena Marine Zoology Unit Cavanilles Institute of Biodiversity and Evolutionary Biology University of Valencia [1]http://www.uv.es/~balbuena P.O. Box 22085 [2

[R] use row and col names of a matrix to create colnames of a new one.

2012-08-30 Thread Juan Antonio Balbuena
Hello I would appreciate any help with the following: Given a matrix with col and row names, such as > matrix1 <- matrix(rnorm(16),4) > rownames(matrix1) <- LETTERS(1:4) > colnames(matrix1) <- letters[1:4] > matrix1 a bc d A 1.6845882 -0.27809792 -0.87479

[R] procrustes (vegan) plot of residual differences

2012-05-23 Thread Juan Antonio Balbuena
+/- SD. Thank you very much for your attention. Juan Antonio Balbuena -- Dr. Juan A. Balbuena Marine Zoology Unit Cavanilles Institute of Biodiversity and Evolutionary Biology University of Valencia [1]http://www.uv.es/~balbuena P.O. Box 22085 [2]http://www.uv.es/ca

[R] Error in ifelse(append, "a", "w") : , (list) object cannot be coerced to type 'logical'

2012-01-26 Thread Juan Antonio Balbuena
Hello I will appreciate your help with the following. Running a script in R 2.14.1 under windows vista I get the following error message: Error in ifelse(append, "a", "w") : (list) object cannot be coerced to type 'logical' However, the very same script runs perfectly well

[R] Discarding a matrix based on the rowSums value

2011-11-21 Thread Juan Antonio Balbuena
Hello I would appreciate your help on the followig. I want to generate random binary matrices but I need to discard those with all-1 rows. That is, for a 10x10 matrix with five 1's [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]000000000 1 [2

[R] permutation within rows of a matrix

2011-11-16 Thread Juan Antonio Balbuena
Hello This is probably a basic question but I am quite new to R. I need to permute elements within rows of a binary matrix, such as [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]000010000 0 [2,]001100011