Re: [R] Evaluated expression in lattice key

2015-01-19 Thread Chel Hee Lee
I guess that you may need 'panel.text()' to customize panel function. Please run the following code and see the output. You will see different value of R-squared in each panel. xyplot( y~x|name, data=df, panel = function(x, y, ...) { panel.xyplot(x, y, ...) panel.abline(lm(y~x),

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Ben Tupper
Hi, On Jan 19, 2015, at 5:17 PM, Karim Mezhoud kmezh...@gmail.com wrote: Thanks Ben. I need to learn more about apply. Have you a link or tutorial about apply. R documentation is very short. How can obtain: z - list (Col1, Col2, Col3, Col4..)? This may not be the most efficient

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Roy Mendelssohn - NOAA Federal
I believe what Karim is after is often referred to as a “ragged array”. For disk storage, such structures have been added to netcdf4 for things like subsurface profiles with a different number of depths. This blog might be of interest:

Re: [R] Approximation of a function from R^2 to R

2015-01-19 Thread Greg Snow
why not just use the tools in npudens? they can predict on a new set. You can also you tools like fitdistr to fit a parametric multivariate density, or you can use loess or lm with poly or splines to estimate the surface (but this will not guarantee a volume of 1). On Thu, Jan 15, 2015 at 2:19

[R] Question

2015-01-19 Thread Glenda Palacios
I have any problems in R: The downloaded binary packages are in /var/folders/s9/kr21631n3nj30hb_4td3pv_8gn/T//RtmpDDAFmJ/downloaded_packages Warning messages: 1: In download.file(url, destfile, method, mode = wb, ...) : downloaded length 2122881 != reported length 2235972 2: 'tar' returned

[R] survey package rake results in very large weights

2015-01-19 Thread Imran Akbar
Hi, I'm trying to use both the survey package and the anesrake package to perform raking on my sample dataset, to get the proportions to match up with population data from the census. I'm trying the following, but the resulting weights are very large: svy.unweighted - svydesign(ids=~1,

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Jeff Newmiller
I use plyr and am learning dplyr and magrittr, but those are just syntactic sugar. What I have been having difficulty with in this thread is the idea that it somehow makes sense to pad vectors with NA values... because I really don't think it does. It seems more like a hammer looking for a nail

[R] Regression Modeling Strategies 4-Day Short Course March 2015

2015-01-19 Thread Frank Harrell
Subject: Regression Modeling Strategies 4-Day Short Course March 2015 *RMS Short Course 2015* Frank E. Harrell, Jr., Ph.D., Professor and Chair Department of Biostatistics, Vanderbilt University School of Medicine *March 3, 4, 5 6, 2015* With Optional R Workshop March 2 9:00am - 4:00pm Student

Re: [R] add a list name into the list content in a new output

2015-01-19 Thread Chel Hee Lee
I am just using the first two components of your output. op $bp chr pos ci.low ci.high lod c7.loc45 7 47.7 36.7156.7 6.11 c15.loc8 15 12.0 3.9622.8 5.29 $hr chr pos ci.low ci.high lod c2.loc542 59.8 14.887.8 4.19 D15MIT184 15 22.8 12.036.0

Re: [R] Evaluated expression in lattice key

2015-01-19 Thread Duncan Mackay
I do not think any one has replied to this. Having 2 keys I think comes under the bit in the help under legend. I have not got time at the moment but see ?xyplot and have a look at https://stat.ethz.ch/pipermail/r-help/2005-February/066264.html and the following Regards Duncan Duncan

Re: [R] Extracting elements out of list in list in list

2015-01-19 Thread Chel Hee Lee
Aha! I haven't thought about it. I really like the approach presented by Bert Gunter in the previous post. It is a good lesson. I made my previous code a little bit better by building a function that pulls out only the desired component. At this time, the names of sublists are changed as

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Karim Mezhoud
Thanks Ben. I need to learn more about apply. Have you a link or tutorial about apply. R documentation is very short. How can obtain: z - list (Col1, Col2, Col3, Col4..)? Thanks Ô__ c/ /'_;kmezhoud (*) \(*) ⴽⴰⵔⵉⵎ ⵎⴻⵣⵀⵓⴷ http://bioinformatics.tn/ On Mon, Jan 19, 2015 at 8:22 PM,

Re: [R] Extracting elements out of list in list in list

2015-01-19 Thread Rainer M Krug
Bert Gunter gunter.ber...@gene.com writes: Chee Hee's approach is both simpler and almost surely more efficient, I am not sure about the efficient - if the lists are large, they need to be copied and un-listed which both require memory allocations and processing time - so I would actually guess

Re: [R] DeepNet package - how to add hidden layers?

2015-01-19 Thread Charles Determan Jr
Hi Davide, You really shouldn't post on multiple forums. Please see my response on SO, http://stackoverflow.com/questions/27990932/r-deepnet-package-how-to-add-more-hidden-layers-to-my-neural-network, where I tell you that you can add additional layers by simply adding to the hidden vector.

[R] Proportion of equal entries in dist()?

2015-01-19 Thread Jorge I Velez
Dear all, Given vectors x and y, I would like to compute the proportion of entries that are equal, that is, mean(x == y). Now, suppose I have the following matrix: n - 1e2 m - 1e4 X - matrix(sample(0:2, m*n, replace = TRUE), ncol = m) I am interested in calculating the above proportion for

Re: [R] what is isdst parameter

2015-01-19 Thread Jeff Newmiller
1) Read the help file ?timezones and note that the R project does not do any of the programming associated with that functionality. 2) Keep in mind that it is you who are supplying an indeterminate value to be interpreted. You need to know from context (another column of data? The trend of

Re: [R] what is isdst parameter

2015-01-19 Thread Prof Brian Ripley
On 19/01/2015 11:51, Vasantha Kumar Kesavan wrote: Hi, Let me know, how to set/unset isdst parameter in system/session level. I could understand the possible values of isdst 0, 1 and -1. Example: Sys.setenv(TZ=PST8PDT); as.POSIXct(2007-11-04 01:00:00); when I was executed the above command,

Re: [R] union empty set with an element

2015-01-19 Thread Ragia Ibrahim
many thanks for replying the code A is list of sets where each list element is a set i-1 A[i]-3 #inside the loop i-i+1; # for example new element in the list will be {7,9}, each added separately inside the loop A[i] - union( A[[i]] ,new element) many thanks for replying

[R] union empty set with an element

2015-01-19 Thread Ragia Ibrahim
Hello, I started the program with an empty set then I add and element when needed. the problem how can I add the first element to the empty set union(set_name ,element) gives subscript out of bounds thanks in advance R. [[alternative HTML

Re: [R] union empty set with an element

2015-01-19 Thread Berend Hasselman
On 19-01-2015, at 15:51, Ragia Ibrahim ragi...@hotmail.com wrote: Hello, I started the program with an empty set then I add and element when needed. the problem how can I add the first element to the empty set union(set_name ,element) gives subscript out of bounds “ Which program did

Re: [R] union empty set with an element

2015-01-19 Thread PIKAL Petr
Hi are you sure that you understand what union does? AFAIK union(set_name ,element) takes vector set_name, add all non duplicated values from element and returns concatenated vector. x-1:10 y-5:15 union(x,y) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x-NULL union(x,y) [1] 5 6 7 8

Re: [R] Extracting elements out of list in list in list

2015-01-19 Thread Rainer M Krug
Chel Hee Lee chl...@mail.usask.ca writes: This approach may not be fancy as what you are looking for. As long as it works ans=d it is efficient, it is OK. xl - unlist(x) The unlist might be a problem as I am working with quite large lists. xl[grep(A, names(xl))] The grep has one problem,

[R] what is isdst parameter

2015-01-19 Thread Vasantha Kumar Kesavan
Hi, Let me know, how to set/unset isdst parameter in system/session level. I could understand the possible values of isdst 0, 1 and -1. Example: Sys.setenv(TZ=PST8PDT); as.POSIXct(2007-11-04 01:00:00); when I was executed the above command, LINUX.X64 - it was treated as PST value. [1]

Re: [R] Extracting elements out of list in list in list

2015-01-19 Thread Rainer M Krug
Brian Diggs brian.s.di...@gmail.com writes: On 1/16/15 9:34 AM, Bert Gunter wrote: Chee Hee's approach is both simpler and almost surely more efficient, but I wanted to show another that walks the tree (i.e. the list) directly using recursion at the R level to pull out the desired

Re: [R] Extracting elements out of list in list in list

2015-01-19 Thread Dénes Tóth
Hi, Here is a solution which is restricted to lists with identically shaped branches (like your example). The idea is to transform the list to an array and make use of the fact that unlist(x, use.names=FALSE) is much much faster for large lists than unlist(x). # function which transforms a

Re: [R] labelCoubtries() doesn't work. Where is my mistake?

2015-01-19 Thread paladini
Hi Jim, that is exactly what I was looking for. Thanks a lot! I can even choose how to label the countries e.g. Italy or just IT. Have a nice day and thank you for helping me again Claudia Zitat von Jim Lemon drjimle...@gmail.com: Hi Claudia, You're right, when the map is maximized the

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Ben Tupper
Hi, On Jan 18, 2015, at 4:36 PM, Karim Mezhoud kmezh...@gmail.com wrote: Dear All, I am trying to get correlation between Diseases (80) in columns and samples in rows (UNEQUAL) using gene expression (at less 1000,numeric). For this I can use CORREP package with cor.unbalanced function.

Re: [R] union empty set with an element

2015-01-19 Thread Ragia Ibrahim
many thanks for replying the code A is list of sets where each list element is a set i-1 A[i]-3 #inside the loop i-i+1; # for example new element in the list will be {7,9}, each added separately inside the loop A[i] - union( A[[i]] ,new element) many thanks for replying

Re: [R] union empty set with an element

2015-01-19 Thread Berend Hasselman
On 19-01-2015, at 17:10, Ragia Ibrahim ragi...@hotmail.com wrote: many thanks for replying the code A is list of sets where each list element is a set i-1 A[i]-3 #inside the loop i-i+1; # for example new element in the list will be {7,9}, each added separately inside the

[R] R Issue: .onLoad failed in loadNamespace() for 'ORCHcore'

2015-01-19 Thread Sai Venkatesh Reddy
Dear Team, I have downloaded and uncompressed ORCH from http://www.oracle.com/technetwork/database/database-technologies/bdc/big-data-connectors/downloads/index.html Then I added Environmental Variables export ORCH_HADOOP_HOME=/opt/cloudera/parcels/CDH/lib/hadoop export

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Ben Tupper
Hi again, On Jan 19, 2015, at 1:53 PM, Karim Mezhoud kmezh...@gmail.com wrote: Yes Many thanks. That is my request using lapply. do.call(cbind,col1) converts col1 to matrix but does not fill empty value with NA. Even for matrix(unlist(col1), ncol=5,byrow = FALSE) How can get

Re: [R] Cube of Matrices or list of Matrices

2015-01-19 Thread Karim Mezhoud
Yes Many thanks. That is my request using lapply. do.call(cbind,col1) converts col1 to matrix but does not fill empty value with NA. Even for matrix(unlist(col1), ncol=5,byrow = FALSE) How can get Matrix class of col1? And fill empty values with NA? Thanks Karim Ô__ c/

[R] add a list name into the list content in a new output

2015-01-19 Thread Shuhua Zhan
Dear All, I'd like to add a list name into the list contents to make a new output. The list is a list of data.frame derived from summary command in Rqtl. I want to add this list name to the data frame with a given column name such as trait and output this entire list as a table tab delimited as