[R] wdTable() in R2wd

2011-08-30 Thread Wang, Kevin (SYD)
Hi all, I've been using the wdTable() function from R2wd package and it's been working great. However I just tried to do the following: > table.2 WasteRebate code Chargeable (fin_map) Quantity (qty) Total [1,] "Waste" "Rebate code" "CHG"

[R] Drawing Maps of detailed Australian regions

2010-12-14 Thread Wang, Kevin (SYD)
Hi all, I'm trying to draw a bubble plot over a map -- where the map shows local government areas (LGA) in Australia (or other structures under the Australian Standard Geographical Classification), but am not sure where I can find the data to plot such maps (e.g. draw the state of Northern Ter

[R] R Report (was RE: R-help Digest, Vol 90, Issue 25)

2010-08-22 Thread Wang, Kevin (SYD)
I've been following the "R Reports" topic in the digest mode, so apologies if this has already been mentioned. On a Windows platform, there is a package called R2wd which I've recently discovered and have been using. It allows one to put data frames (it's the only object I've tried so far) into

[R] Equivalent of SAS's FIRST. And LAST. Variable in R?

2010-07-12 Thread Wang, Kevin (SYD)
Hi all, I'm just wondering if there is a equivalent of SAS's FIRST. and LAST. variables in R? For example, suppose this is a snapshot of the data: ClientCode CaseCode open closeImportant 1 37 28 2003-07-08 2003-09-021 2 37

[R] Check Dates

2010-07-10 Thread Wang, Kevin (SYD)
Hi, I'm trying to check a column of dates and creating indicator variables showing different time periods. For example, if I were to do this in Excel I would have something like: Year to Dec 2004=IF(AND(referral dateDATE(2003,12,31), LEN($closure date) = 0)), "Yes", "No") for the "Year to Dec

[R] Merge Multiple Datasets

2010-05-06 Thread Wang, Kevin (SYD)
Hi, I've got a bunch of datasets (each has an "ID" column) that I'd like to merge into one big datasets. After a google search I found http://tolstoy.newcastle.edu.au/R/help/05/08/11131.html . However, I'm wondering if there is an easy way to do this as I've got about 12 datasets to be merged (a

Re: [R] Converting dollar value (factors) to numeric

2010-05-05 Thread Wang, Kevin (SYD)
? Thanks again for the help! Cheers Kev -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Wednesday, 5 May 2010 6:14 PM To: Wang, Kevin (SYD) Cc: r-help@r-project.org Subject: Re: [R] Converting dollar value (factors) to numeric Kev- The most reliable way

[R] Converting dollar value (factors) to numeric

2010-05-05 Thread Wang, Kevin (SYD)
Hi, I'm trying to read in a bunch of CSV files into R where many columns are coded like $111.11. When reading them in they are treated as factors. I'm wondering if there is an easy way to convert them into numeric in R (as I don't want to modify the source data)? I've done some searches and can