Re: [R] Rose Diagrams for Geology

2014-11-21 Thread jwd
On Tue, 18 Nov 2014 22:06:03 -0600 David Doyle kydaviddo...@gmail.com wrote: Thank you to David and David for their help. The code below generated what I needed. library(circular) mydata - read.table(http://doylesdartden.com/R/Joints.csv;, header=TRUE, sep=,,) x -

Re: [R] Symbolic equations to R code?

2014-11-21 Thread Rainer M Krug
Scott Rifkin sarif...@ucsd.edu writes: Ista, On the one hand I'd like it to be as flexible as possible so the students could really come up with whatever they like. On the other hand, restricting their choices probably would make it easier to do the backend. The goal would be to get them

[R] Comparing summary hazard ratios in meta-analysis

2014-11-21 Thread Mario Petretta
Dear all, I use R 3.1.1 for Windows. I performed two different meta-analysis assessing the prognostic value of two different tests in patients with coronary artery disease. The study included in the two analysis are different. The variable of interest in dichotomous (normal/abnormal result) for

Re: [R] Comparing summary hazard ratios in meta-analysis

2014-11-21 Thread Michael Dewey
On 21/11/2014 08:51, Mario Petretta wrote: Dear all, I use R 3.1.1 for Windows. I performed two different meta-analysis assessing the prognostic value of two different tests in patients with coronary artery disease. The study included in the two analysis are different. That makes life

Re: [R] Comparing summary hazard ratios in meta-analysis

2014-11-21 Thread Viechtbauer Wolfgang (STAT)
Those hazard ratios and CIs seem a bit strange. On the log-scale, they should be symmetric, but they are not. Could be due to heavy rounding though. At any rate, it comes down to this: hr- c(3.12, 1.15) ci.lb - c(2.2, 1.03) ci.ub - c(4.1, 2.6) meta - c(1,2) ### log-transform hazard ratios

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-21 Thread ivan
I am aware of the fact that bootstrapping produces different CIs with every run. I still believe that there is a difference between both types of procedures. My understanding is that setting w in the boot() function influences the importance of observations or how the bootstrap selects the

Re: [R] Rose Diagrams for Geology

2014-11-21 Thread David L Carlson
No. Just use the circular() function to specify that your data are in degrees and clockwise and the graph will be labeled that way. David C (I was beginning to think that this thread was only for Davids). -Original Message- From: r-help-boun...@r-project.org

Re: [R] Saving Google worksheets with common prefix

2014-11-21 Thread Jennifer Sabatier
Anyone can help? On Thu, Nov 20, 2014 at 6:44 PM, Jennifer Sabatier plessthanpointohf...@gmail.com wrote: Hi R-Help, So, I will try to provide a reproducible example...I basically made a dummy spreadsheet that contains the same number of tabs as the spreadsheet I am really interested in.

Re: [R] Saving Google worksheets with common prefix

2014-11-21 Thread Henrik Bengtsson
Add a print(ts2$i) to see if that really gives what you think it does. Then take it from there. Henrik On Nov 21, 2014 7:19 AM, Jennifer Sabatier plessthanpointohf...@gmail.com wrote: Anyone can help? On Thu, Nov 20, 2014 at 6:44 PM, Jennifer Sabatier plessthanpointohf...@gmail.com wrote:

Re: [R] Saving Google worksheets with common prefix

2014-11-21 Thread Jennifer Sabatier
On Fri, Nov 21, 2014 at 10:36 AM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: print(ts2$i) You're right. It's not doing what I think it's supposed to be doing. The print(ts2$i) gives NULL: [1] Cash Flows211 NULL [1] Cash Flows211 - 2014-11-21.csv 7: getURL(sheet@cellsfeed, curl =

Re: [R] Saving Google worksheets with common prefix

2014-11-21 Thread Jennifer Sabatier
I got it! for (i in sheetz$names) { print(i) file.name - paste(i, - , Sys.Date(), .csv, sep=) print(file.name) #traceback() i - sheetAsMatrix(ts[[i]], header = TRUE, as.data.frame = TRUE, trim = TRUE) write.csv(i, file.name) i } I have to use ts[[i]] rather than ts$i (or ts2, either) Thanks!

Re: [R] Rose Diagrams for Geology

2014-11-21 Thread William Dunlap
Most field mapping data I have collected has been either in quadrant form (rarely) or more commonly in azimuthal form (0-360 degrees order clockwise from the top). You can specify that when making the 'circular' object, by using the zero and roation arguments. Compare the plots made by the

Re: [R] ggplot question error: Error in s(x, bs = cs) : object 'x' not found

2014-11-21 Thread John Kane
Hi Dimitri, I am not sure I completely understand the issue but here is what I think you want (using my variable names :) ) library(ggplot2) dat1 - data.frame(aa = sample(1:20, 100, replace = TRUE), bb = 1:100 ) p - ggplot(dat1, aes(aa, bb)) + geom_point() p - p +

[R] dplyr/summarize does not create a true data frame

2014-11-21 Thread John Posner
I got an error when trying to extract a 1-column subset of a data frame (called my.output) created by dplyr/summarize. The ncol() function says that my.output has 4 columns, but my.output[4] fails. Note that converting my.output using as.data.frame() makes for a happy ending. Is this the

[R] R: Comparing summary hazard ratios in meta-analysis

2014-11-21 Thread Mario Petretta
Many many thanks to Michael Dewey and to Viechtbauer Wolfgang for the kindly and useful replay !! I only ask to Wolfgang if I should log-transform hazard ratios and compute standard error only for the summary hazard ratio estimates or, as suggested by Michael, for each single study, combining

Re: [R] dplyr/summarize does not create a true data frame

2014-11-21 Thread John Kane
Your code in creating 'frm' is not working for me and it is complicated enough that I don't want to work it out. See ?dput for a better way to supply data. Also see: https://github.com/hadley/devtools/wiki/Reproducibility

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-21 Thread David Winsemius
On Nov 21, 2014, at 6:52 AM, ivan wrote: I am aware of the fact that bootstrapping produces different CIs with every run. I still believe that there is a difference between both types of procedures. My understanding is that setting w in the boot() function influences the importance of

[R] Wondering why I get a NULL output for this if condition!

2014-11-21 Thread Aditya Singh
1 my_min= min(outcome_data[which(outcome_data$State==my_state),11],na.rm=TRUE) 2 print(my_min) 3 jkr=0 4 if (jkr= 4706) {jkr=jkr+1 5 if (identical(outcome_data[jkr,11],my_min) identical(outcome_data[jkr,7],my_state)) { 6 print((outcome_data[jkr,2])) 7 break 8 } Dear Experts, My

Re: [R] Wondering why I get a NULL output for this if condition!

2014-11-21 Thread Boris Steipe
Seems to me you probably wanted a while in line 4. N.b. There's also a missing } and totally messed up formatting :-( B. On Nov 21, 2014, at 1:19 PM, Aditya Singh aps...@yahoo.com wrote: 1 my_min= min(outcome_data[which(outcome_data$State==my_state),11],na.rm=TRUE) 2 print(my_min) 3

[R] Help with Time

2014-11-21 Thread Raghuraman Ramachandran
Dear guRus How can I round of time in R to the nearest 30th minute please? For example suppose if Sys.time() [1] 2014-11-21 22:49:05.59042 GMT then I would like a function that outputs 22:30:00. if Sys.time is 12:13:22 then I would like to get 12:00:00 etc. Any help would be appreciated. Many

[R] C project within R function

2014-11-21 Thread Diogo André Alagador
Hi all, I need some assistance regarding the use of C project (set of programming files) as R functions in Windows OS. By now I really would like to avoid package-building. What are the steps to undergo or where can I check to perform that successfully? Thanks in advance, My best

Re: [R] R website

2014-11-21 Thread peter dalgaard
On 20 Nov 2014, at 23:02 , Duncan Murdoch murdoch.dun...@gmail.com wrote: On 20/11/2014, 4:35 PM, Ista Zahn wrote: This prompted me to do something I've been meaning to do for a long time, which is to try to get the R website updated in terms of visual style. It really is showing it's age

[R] Formula with dynamic number of variables

2014-11-21 Thread philippe massicotte
Hi everyone. I have a non-linear model specified as this (6 variables, a0, S, K, p0, p1, p2): fit - nlsLM(formula = dat ~ a0 * exp(-S*(x - 250)) + K + ( C ) ) where C = (p0*exp(-0.5*((x-p1)/p2)^2)) The problem is that I do not know in advance how many component (C) I will have in the model.

Re: [R] Help with Time

2014-11-21 Thread Raghuraman Ramachandran
Sorry I forgot to mention it clearly. I like to round it to the nearest 30th minute that is past. So 12:28:59 will be again 12:00:00 and 12:59:59 will be 12:30:00 etc. Apologies for the lack of clarity in the beginning. Many thanks Raghu On Fri, Nov 21, 2014 at 10:52 PM, Raghuraman Ramachandran

Re: [R] Help with Time

2014-11-21 Thread David Winsemius
On Nov 21, 2014, at 2:52 PM, Raghuraman Ramachandran wrote: Dear guRus How can I round of time in R to the nearest 30th minute please? For example suppose if Sys.time() [1] 2014-11-21 22:49:05.59042 GMT then I would like a function that outputs 22:30:00. if Sys.time is 12:13:22 then

Re: [R] Help with Time

2014-11-21 Thread David Winsemius
On Nov 21, 2014, at 2:55 PM, Raghuraman Ramachandran wrote: Sorry I forgot to mention it clearly. I like to round it to the nearest 30th minute that is past. So 12:28:59 will be again 12:00:00 and 12:59:59 will be 12:30:00 etc. Apologies for the lack of clarity in the beginning. That's

[R] memory usage with party::cforest

2014-11-21 Thread Andrew Z
Is there a way to shrink the size of RandomForest-class (an S4 object), so that it requires less memory during run-time and less disk space for serialization? On my system the data slot is about 2GB, which is causing problems, and I'd like to see whether predict() works without it. # example

Re: [R] Help with Time

2014-11-21 Thread Boris Steipe
Perhaps this ... roundToHalf - function(t) { t - as.POSIXlt(t) if (t$min 15) { t$min - 0 } else if (t$min 45) { t$min - 30 } else { t$min - 0 t$hour - t$hour + 1

Re: [R] C project within R function

2014-11-21 Thread Duncan Murdoch
On 21/11/2014, 3:02 PM, Diogo André Alagador wrote: Hi all, I need some assistance regarding the use of C project (set of programming files) as R functions in Windows OS. By now I really would like to avoid package-building. What are the steps to undergo or where can I check to

Re: [R] Help with Time

2014-11-21 Thread David Winsemius
On Nov 21, 2014, at 3:19 PM, David Winsemius wrote: On Nov 21, 2014, at 2:55 PM, Raghuraman Ramachandran wrote: Sorry I forgot to mention it clearly. I like to round it to the nearest 30th minute that is past. So 12:28:59 will be again 12:00:00 and 12:59:59 will be 12:30:00 etc.

[R] Interpreting ANOVA / quantile regression results

2014-11-21 Thread Yunqi Zhang
Hi all, I think this is probably a very simple question related to ANOVA or quantile regression. Let's say if I'm doing ANOVA on 2 factors (f_a and f_b) and trying to figure out whether they have an impact on the output. The result shows me that f_a has a significant impact while f_b does not as

Re: [R] C project within R function

2014-11-21 Thread Mark Sharp
Diogo, For a gentle introduction to package creation see Hadley Wickham's book in progress on the subject at http://r-pkgs.had.co.nz. This site is particularly accessible if you use RStudio, but is not dependent on its use. I use very simple packages that are not designed to be used by others

[R] How do I extract single entries from a factor?

2014-11-21 Thread Aditya Singh
Dear Boris and R-Experts, I have a variable my_state which is a 2-letter character string telling which American state the user inputs. This I am do a if(identical(database entry,my_state)) to check for occurrences in the database. The problem is that the database entry[i,j] shows as a factor

Re: [R] Interpreting ANOVA / quantile regression results

2014-11-21 Thread Bert Gunter
This is off topic here.Post to a statistics forum like stats.stackexchange.com instead -- or talk to your professor or TA (if you're a student). Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is

[R-es] Nueva publicación en blog en r-es.org

2014-11-21 Thread web
Nueva publicación en blog: Ofertas de trabajo, Buscamos profesores para Curso de R+Hadoop (BigData Analytics), por luispenya en 21/11/14 13:04h Ver el blog en: http://r-es.org/tiki-view_blog_post.php?blogId=2postId=92 Si no desea recibir estas notificaciones siga este enlace:

Re: [R-es] help:Problemas compatibllidad Windows Mac

2014-11-21 Thread Javier Villacampa González
Muchas gracias a todos, con la dodificacion UTF-8 todo queda solucionado. Una pena que en pleo año 2014 aun existan estas incompatibilidades y más para gente como yo que acabamos utilizando los tres principales OS. Muchas gracias de nuevo. El 18 de noviembre de 2014, 17:05, Carlos J. Gil