hi, after installing R-2.6.0 the function "names" doesn't work anymore on my windows xp machine. for example for a simple vector i get> z <- 1:3 > names(x)Error in UseMethod("name"): no applicable method for "names" ... instead of NULL. the same is true for lists and dataframes. attr(z, "names") is a workaround, but i don't want to change all my functions. is this a know bug? thanks for any comments, judith schiller
I think you have an object x which doensn't allow to give names. If you use names(z) it will work. To see what kind of object x is: class(x) Regards Bart Schiller Judith 1541 EB wrote:> > hi, > > after installing R-2.6.0 the function "names" doesn't work anymore on my > windows xp machine. > for example for a simple vector i get > >> z <- 1:3 >> names(x) > Error in UseMethod("name"): no applicable method for "names" > > ... instead of NULL. the same is true for lists and dataframes. attr(z, > "names") is a workaround, but i don't want to change all my functions. > > is this a know bug? thanks for any comments, > judith schiller > > ______________________________________________ > 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. > >-- View this message in context: http://www.nabble.com/no-applicable-method-for-%22names%22-tf4806311.html#a13764385 Sent from the R help mailing list archive at Nabble.com.
Actually names(z) works for me. More seriously I don't seem to have a problem with XP and 2.6.0. It may be a slightly wonky installation. You might want to try a re-install and see what happens. --- Schiller Judith 1541 EB <Judith.Schiller at erstebank.at> wrote:> hi, > > after installing R-2.6.0 the function "names" > doesn't work anymore on my > windows xp machine. > for example for a simple vector i get > > > z <- 1:3 > > names(x) > Error in UseMethod("name"): no applicable method for > "names" > > ... instead of NULL. the same is true for lists and > dataframes. attr(z, > "names") is a workaround, but i don't want to change > all my functions. > > is this a know bug? thanks for any comments, > judith schiller > > ______________________________________________ > 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. >