Thanks fort he good hint. It works.
Corinna
________________________________
Von: Peter Konings [mailto:peter.l.e.konings@gmail.com]
Gesendet: Donnerstag, 19. April 2007 14:10
An: Schmitt, Corinna
Betreff: Re: [R] element search
Hi Corinna,
the R mailing list software strips off almost all binary attachments, so your
excel file won't make it to the mailing list.
Regarding your query: you could use the apply function on the resulting
dataframe, like this:
apply(plan1, 1, max, na.rm = TRUE)
apply(plan1, 1, your.own.function.to.select.a.certain.value,
options.to.your.own.function)
see ?apply for more information.
HTH
Peter.
On 4/19/07, Schmitt, Corinna <Corinna.Schmitt@igb.fraunhofer.de> wrote:
Sorry, I forgot the attachment. Here it is.
Thanks, Corinna
-----Ursprüngliche Nachricht-----
Von: Schmitt, Corinna
Gesendet: Donnerstag, 19. April 2007 12:32
An: ' r-help@stat.math.ethz.ch <mailto:r-help@stat.math.ethz.ch> '
Betreff: element search
Dear R-experts,
I have got an excel file as attached. I imported it successful with the
commands:
library(RODBC)
channel <- odbcConnectExcel(" data2.xls")
tables <- sqlTables(channel) # list the names of the spreadsheets
name1 <- tables[1, "TABLE_NAME"] # get the name of the 1st
spreadsheet
plan1 <- sqlQuery(channel, sprintf("select * from [%s]", name1))
odbcClose(channel) # close it
Now I want to store each row in variable. Additionally the result should be a
list again so that I can handle each entry for itself. Ideas? Perhaps a list
again?
Now I want to find on the one hand in each row one special entry and on the
other hand I need to get the maximum entry of each row. How can I realize this?
Thanks, Corinna
______________________________________________
R-help@stat.math.ethz.ch 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.
[[alternative HTML version deleted]]