Thanks mr FOX, now it works perfect!!!
--
View this message in context:
http://r.789695.n4.nabble.com/R-GUI-tklistbox-get-value-tp4710064p4710123.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list --
Dear j.para.fernandez,
Try
selecvar <- dat[, as.numeric(tkcurselection(tl))+1]
Omitting the comma returns a one-column data frame, not a numeric vector.
I hope this helps,
John
John Fox, Professor
McMaster University
Hamilton, Ontario, Cana
Hi, i have a dataframe, dat, with 2 variables, one and two.
I want to print in R the mean of the selected variable of the dataframe. You
can select it with a tklistbox, but when you click OK button, the mean is
not displayed, just NA
one<-c(5,5,6,9,5,8)
two<-c(12,13,14,12,14,12)
dat<-
3 matches
Mail list logo