[R] NA When Setting Options to See Fractions of Seconds

2012-10-09 Thread Alex Zhang
Dear all, I just found a weird behavior of the timeDate related functions Sys.timeDate() and as.timeDate(). Both of them take place when showing fractions of seconds and I think they might have the same source. Do you know if it should be considered a bug of Sys.timeDate()? Also, what is a goo

Re: [R] Text to Speech In R

2012-10-04 Thread Alex Zhang
Thanks, Mike! I am on Windows for this project tho... - Alex From: R. Michael Weylandt To: Alex Zhang Cc: "r-help@r-project.org" Sent: Thursday, October 4, 2012 8:50 AM Subject: Re: [R] Text to Speech In R On Thu, Oct 4, 2012 at 1:31 PM, Alex Zh

Re: [R] Text to Speech In R

2012-10-04 Thread Alex Zhang
Jeff - so, do you mean that you are sure it can NOT AND SHOULD NOT? Thanks, - Alex From: Jeff Newmiller To: Alex Zhang ; Alex Zhang ; "r-help@r-project.org" Sent: Thursday, October 4, 2012 8:46 AM Subject: Re: [R] Text to Speech In R Why do you

[R] Text to Speech In R

2012-10-04 Thread Alex Zhang
Dear all, Excuse me for my searching skills: I just couldn't figure out how to do any simple text to speech in R console. What I want to do is, out put simple English words or sentences to speaker as voice. No fanciness. For example, I want the R console to speak "Hello world" or "Howdy". Do

Re: [R] sapply Call Returning " the condition has length > 1" Error

2011-12-27 Thread Alex Zhang
Michael, John and Bert, Thank you all very much for your help. I think I have gained a lot of understanding and am ready to write better code. I will study "The R Inferno". I appreciate it. - Alex From: R. Michael Weylandt To: Alex Zhang Cc: Joh

Re: [R] sapply Call Returning " the condition has length > 1" Error

2011-12-27 Thread Alex Zhang
O.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > Alex Zhang wrote: > >> John, >> >>

Re: [R] sapply Call Returning " the condition has length > 1" Error

2011-12-27 Thread Alex Zhang
a lot!  ____ From: John Fox To: 'Alex Zhang' Cc: r-help@r-project.org Sent: Tuesday, December 27, 2011 4:06 PM Subject: RE: [R] sapply Call Returning " the condition has length > 1" Error Dear Alex, > -Original Message- > From

Re: [R] sapply Call Returning " the condition has length > 1" Error

2011-12-27 Thread Alex Zhang
s? That explains the behavior. Is there an "*apply" function that will fee elements of the input data.frame into "FUN" instead of whole columns? Thanks.  ________ From: John Fox To: 'Alex Zhang' Cc: r-help@r-project.org Sent: Tuesday, Dece

[R] sapply Call Returning " the condition has length > 1" Error

2011-12-27 Thread Alex Zhang
Dear all, Happy new year! I have a question re using sapply. Below is a dummy example that would replicate the error I saw.  ##Code Starts here DummyFunc <- function(x) { if (x > 0) { return (x) } else { return (-x) } } Y = data.frame(val = c(-3:7)) sapply(Y, FUN = DummyFunc) ##Code ends her

Re: [R] A Question Re ISOdatetime

2011-12-14 Thread Alex Zhang
Thank you very much, Prof Ripley. The problem is solved and my understanding is improved.  Happy holidays! - Alex From: Prof Brian Ripley To: Alex Zhang Cc: "r-help@R-project.org" Sent: Wednesday, December 14, 2011 11:39 AM Subject: Re: [R] A Q

[R] A Question Re ISOdatetime

2011-12-14 Thread Alex Zhang
Dear all, I am using the ISOdatetime function like this: test.info$TradeTime = with(test.info, mapply(FUN = ISOdatetime, Year, Month, Day, Hour, Minute, 60, "EST")) Where Year, Month etc are all numeric. I think ISOdatetime should return a POSIXct object. However, the result I obtained from

Re: [R] Trouble Using mapply

2011-07-31 Thread Alex Zhang
is not as flexible enough when I need to get multiple data.frames into the function.  Is there a way to get the "rep" part return what I want? Thx, - Alex ____ From: Steve Lianoglou To: Alex Zhang Cc: "r-help@r-project.org" Sent: Sunday, July 31

[R] Trouble Using mapply

2011-07-31 Thread Alex Zhang
Dear all, I am having a problem with mapply. I guess the reason is that mapply is not "vectorized". But could you please take a look at my code below and help me to find a solution (either a better way to use mapply or a different function to call). Thanks a lot! ##beginning of my code myfun

Re: [R] How to Execute A Query Stored In Access 2007

2011-07-06 Thread Alex Zhang
Steven - I use RODBC. Thx, - Alex From: Steven Kennedy To: Alex Zhang Cc: "r-help@R-project.org" Sent: Wednesday, July 6, 2011 7:18 PM Subject: Re: [R] How to Execute A Query Stored In Access 2007 What package are you using to connect to the Acces

[R] How to Execute A Query Stored In Access 2007

2011-07-06 Thread Alex Zhang
Hey guys, Could you please teach me how to run or execute a query stored in an Access 2007 database? I can connect and run queries from my Access database without any problem. But I have an append query stored there. Say called "Append2Tbl". How do I execute it without copying and pasting the