[R] Question

From: Zolfaghari, Arvin <Arvin.Zolfaghari_at_lloyds.com>
Date: Wed, 18 Jun 2008 14:35:42 +0100


Hi list,
I am trying to convert my Data from 1st following format to the second. Any comment?

You could copy following in Tinn R
Data<-
data.frame(location=c("postcode","sector","long/lat","sector"),Grade=c(" h","m","L","h"),value=c(2,3,5,6))
#Question: how can I reshape Data to the following
# Grade postcode sector long/lat
# h 2 6 0
# m 0 3 0
# l 0 0 5

Regards,

Arvin Zolfaghari
Lead Researcher, PhD MSc BSc
Lloyd's Exposure Management
Telephone +44 (0)20 7327 5983
www.lloyds.com <
http://www.lloyds.com/>

SAVE PAPER - THINK BEFORE YOU PRINT



The information in this E-Mail and in any attachments is...{{dropped:22}}

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 18 Jun 2008 - 20:02:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 18 Jun 2008 - 23:31:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive