Hello - I?m working on dataset that will eventually be used in an xyz-plot. I?m having trouble figuring out the best way to store the data (see an attached .csv sheet exported from Excel). Some information on the data: - Columns B - F are labels that describe the z data points - Rows above x and y data pairs show the corresponding labels for the data point. I want to use R to visualize the data and appreciate any feedback on the best mechanism to store/organize the info. I?m new to R and want to start the data assembly on the right foot - thanks for the help and advice! Alfa
No data. See dput() (?dput) as the preferred way to send data John Kane Kingston ON Canada> -----Original Message----- > From: alfadiallo at mac.com > Sent: Thu, 17 Sep 2015 16:41:46 -0400 > To: r-help at r-project.org > Subject: [R] best data storage format? > > Hello - > > I?m working on dataset that will eventually be used in an xyz-plot. > > I?m having trouble figuring out the best way to store the data (see an > attached .csv sheet exported from Excel). Some information on the data: > > - Columns B - F are labels that describe the z data points > - Rows above x and y data pairs show the corresponding labels for the > data point. > > I want to use R to visualize the data and appreciate any feedback on the > best mechanism to store/organize the info. I?m new to R and want to start > the data assembly on the right foot - thanks for the help and advice! > > Alfa > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account.
Dear Alfa Although John's advice is excellent if you already have the dataset in R in your case it seems that is not the case. Since R-help strips off most attachments you may need to put your .csv file somewhere like Dropbox or fool R-help into thinking it is a plain text file. On 18/09/2015 00:41, John Kane wrote:> No data. See dput() (?dput) as the preferred way to send data > > John Kane > Kingston ON Canada > > >> -----Original Message----- >> From: alfadiallo at mac.com >> Sent: Thu, 17 Sep 2015 16:41:46 -0400 >> To: r-help at r-project.org >> Subject: [R] best data storage format? >> >> Hello - >> >> I?m working on dataset that will eventually be used in an xyz-plot. >> >> I?m having trouble figuring out the best way to store the data (see an >> attached .csv sheet exported from Excel). Some information on the data: >> >> - Columns B - F are labels that describe the z data points >> - Rows above x and y data pairs show the corresponding labels for the >> data point. >> >> I want to use R to visualize the data and appreciate any feedback on the >> best mechanism to store/organize the info. I?m new to R and want to start >> the data assembly on the right foot - thanks for the help and advice! >> >> Alfa >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >-- Michael http://www.dewey.myzen.co.uk/home.html
On Sep 17, 2015, at 1:41 PM, Alfa Diallo wrote:> Hello - > > I?m working on dataset that will eventually be used in an xyz-plot. > > I?m having trouble figuring out the best way to store the data (see an attached .csv sheet exported from Excel). Some information on the data: > > - Columns B - F are labels that describe the z data points > - Rows above x and y data pairs show the corresponding labels for the data point. > > I want to use R to visualize the data and appreciate any feedback on the best mechanism to store/organize the info. I?m new to R and want to start the data assembly on the right foot - thanks for the help and advice! > > AlfaYou later provided a link to a csv version of that dataset. I loaded it into an OpenOffice spreadsheet (because my purchased copy of Excel was no longer functional after a harddisk crash and restore from backup to a different disk and MS now claims to not have any record of it so refuses to let me re-register it to the new disk despite having all the original boxes and fancy security tags.) At any rate, I am attaching a png copy of the data in its original version and in a transposed version what I would suggest is closer to how one might store your data. Presenting pictures of data is almost always a bad idea on Rhelp, but this seems the best way to illustrate the current arangement. At the moment you have a mixture of columnar and row-wise storage. You should convert to all columnar. This will require copying the "z" values of interest to new columns after the transpose. You can probably do that in Excel easier than doing it in R. Then when you have an all-columnar arrangement, just use read.csv. David Winsemius Alameda, CA, USA
On Sep 18, 2015, at 10:30 AM, David Winsemius wrote:> > On Sep 17, 2015, at 1:41 PM, Alfa Diallo wrote: > >> Hello - >> >> I?m working on dataset that will eventually be used in an xyz-plot. >> >> I?m having trouble figuring out the best way to store the data (see an attached .csv sheet exported from Excel). Some information on the data: >> >> - Columns B - F are labels that describe the z data points >> - Rows above x and y data pairs show the corresponding labels for the data point. >> >> I want to use R to visualize the data and appreciate any feedback on the best mechanism to store/organize the info. I?m new to R and want to start the data assembly on the right foot - thanks for the help and advice! >> >> Alfa > > > You later provided a link to a csv version of that dataset. I loaded it into an OpenOffice spreadsheet (because my purchased copy of Excel was no longer functional after a harddisk crash and restore from backup to a different disk and MS now claims to not have any record of it so refuses to let me re-register it to the new disk despite having all the original boxes and fancy security tags.) > > At any rate, I am attaching a png copy of the data in its original version and in a transposed version what I would suggest is closer to how one might store your data. Presenting pictures of data is almost always a bad idea on Rhelp, but this seems the best way to illustrate the current arrangement.In the past I had success attaching .png formatted files but it appears to have failed in this instance. The mailing did get shunted to the moderation queue because of the size of the image file, but then got stripped despite being "accepted". C'est la vie.> At the moment you have a mixture of columnar and row-wise storage. You should convert to all columnar. This will require copying the "z" values of interest to new columns after the transpose. You can probably do that in Excel easier than doing it in R. Then when you have an all-columnar arrangement, just use read.csv.David Winsemius Alameda, CA, USA
Hello David and Co. - I got the screen shot! I also downloaded OpenOffice and amended the data based on your recs - here it is: http://www.alfadiallo.com/r/r_sample_20150918.ods Would this be the best course of action? Will R be able to simultaneously plot the shown data despite variability in the number of rows for each xyz grouping? Thanks! Alfa> On Sep 18, 2015, at 1:30 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > > On Sep 17, 2015, at 1:41 PM, Alfa Diallo wrote: > >> Hello - >> >> I?m working on dataset that will eventually be used in an xyz-plot. >> >> I?m having trouble figuring out the best way to store the data (see an attached .csv sheet exported from Excel). Some information on the data: >> >> - Columns B - F are labels that describe the z data points >> - Rows above x and y data pairs show the corresponding labels for the data point. >> >> I want to use R to visualize the data and appreciate any feedback on the best mechanism to store/organize the info. I?m new to R and want to start the data assembly on the right foot - thanks for the help and advice! >> >> Alfa > > > You later provided a link to a csv version of that dataset. I loaded it into an OpenOffice spreadsheet (because my purchased copy of Excel was no longer functional after a harddisk crash and restore from backup to a different disk and MS now claims to not have any record of it so refuses to let me re-register it to the new disk despite having all the original boxes and fancy security tags.) > > At any rate, I am attaching a png copy of the data in its original version and in a transposed version what I would suggest is closer to how one might store your data. Presenting pictures of data is almost always a bad idea on Rhelp, but this seems the best way to illustrate the current arangement. At the moment you have a mixture of columnar and row-wise storage. You should convert to all columnar. This will require copying the "z" values of interest to new columns after the transpose. You can probably do that in Excel easier than doing it in R. Then when you have an all-columnar arrangement, just use read.csv. > > <sprdsht.transpose.png> > > > David Winsemius > Alameda, CA, USA >