Re: [R] transform dataframe with look-up table

2013-07-26 Thread Juan Antonio Balbuena
Hello First thank you very much to Jean, Bill, Brian and David for the answers and code. I very extremely grateful. I am eventually going to adapt Brian's code with a very minor alteration. If one follows the original syntax End <- merge(merge(Start, transformer, by.x="Left", by.y="

Re: [R] transform dataframe with look-up table

2013-07-25 Thread David Carlson
Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Juan Antonio Balbuena Sent: Thursday, July 25, 2013 10:13 AM To: r-help@r-project.org Sub

Re: [R] transform dataframe with look-up table

2013-07-25 Thread Brian Diggs
On 7/25/2013 8:13 AM, Juan Antonio Balbuena wrote: > > Hello > I hope that there is a simple solution to this apparently complex problem. > Any help will be much appreciated: > I have a dataframe with Left and Right readings (that is, elements in each > row are paired). For inst

Re: [R] transform dataframe with look-up table

2013-07-25 Thread William Dunlap
CO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Juan Antonio Balbuena > Sent: Thursday, July 25, 2013 8:13 AM > To: r-help@r-project.org > Subject: [R] transform dataframe with l

Re: [R] transform dataframe with look-up table

2013-07-25 Thread Adams, Jean
Perhaps this will help. Jean df <- structure(list(Left = c(9L, 4L, 2L, 6L, 3L, 4L, 3L, 4L, 10L, 9L), Right = c(8L, 3L, 1L, 5L, 1L, 1L, 2L, 2L, 8L, 10L)), .Names = c("Left", "Right"), class = "data.frame", row.names = 1:10) lookup <- structure(list(input = c(5L, 10L, 4L, 8L, 6L, 5L, 7L, 2L, 9L,

[R] transform dataframe with look-up table

2013-07-25 Thread Juan Antonio Balbuena
Hello I hope that there is a simple solution to this apparently complex problem. Any help will be much appreciated: I have a dataframe with Left and Right readings (that is, elements in each row are paired). For instance, Left Right [1] 98 [2] 43 [3] 2

Re: [R] Transform dataframe

2012-04-22 Thread Jeff Newmiller
On Sun, 22 Apr 2012, David Studer wrote: Hi everyone! I have to following question: I have three items that had to be ordered (e.g. three persons were rating var1 on the first rank): var1 var2 var3 123 213 132 123 Now I'd like to have the data.frame "the other

[R] Transform dataframe

2012-04-22 Thread David Studer
Hi everyone! I have to following question: I have three items that had to be ordered (e.g. three persons were rating var1 on the first rank): var1 var2 var3 123 213 132 123 Now I'd like to have the data.frame "the other way round", so that the ranks are in the col