[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

[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 you

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 jdnew...@dcn.davis.ca.us To: Alex Zhang alex.zh...@ymail.com; Alex Zhang alex.zh...@ymail.com; r-help@r-project.org r-help@r-project.org Sent: Thursday

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 michael.weyla...@gmail.com To: Alex Zhang alex.zh...@ymail.com Cc: r-help@r-project.org r-help@r-project.org Sent: Thursday, October 4, 2012 8:50 AM Subject: Re: [R] Text

[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 here

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

2011-12-27 Thread Alex Zhang
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 j...@mcmaster.ca To: 'Alex Zhang' alex.zh...@ymail.com Cc: r-help@r-project.org Sent: Tuesday, December 27, 2011 3:10 PM

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

2011-12-27 Thread Alex Zhang
...@mcmaster.ca To: 'Alex Zhang' alex.zh...@ymail.com 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: Alex Zhang [mailto:alex.zh...@ymail.com] Sent: December-27

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

2011-12-27 Thread Alex Zhang
#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. Alex Zhang alex.zh...@ymail.com wrote: John, Thank you for your comment

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

2011-12-27 Thread Alex Zhang
of all sorts of helpful intermediate level tips and these sorts of subtleties are well documented. On Tue, Dec 27, 2011 at 4:03 PM, Alex Zhang alex.zh...@ymail.com wrote: John, Thank you for your comment. There is no secret. But the actual function I need to call is rather irrelevant. However

[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] 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 rip...@stats.ox.ac.uk To: Alex Zhang alex.zh...@ymail.com Cc: r-help@R-project.org r-help@r-project.org Sent: Wednesday

[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] Trouble Using mapply

2011-07-31 Thread Alex Zhang
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 mailinglist.honey...@gmail.com To: Alex Zhang alex.zh...@ymail.com Cc: r-help@r-project.org r-help@r-project.org Sent

[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

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 stevenkennedy2...@gmail.com To: Alex Zhang alex.zh...@ymail.com Cc: r-help@R-project.org r-help@r-project.org Sent: Wednesday, July 6, 2011 7:18 PM Subject: Re: [R] How to Execute A Query Stored In Access