Re: [Rd] plot.function documentation/export?
Now I see the difference: I was using R-devel and that worked as you expected. Best, Uwe Ligges On 25.07.2011 19:01, Ben Bolker wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/25/2011 12:55 PM, Uwe Ligges wrote: On 25.07.2011 17:45, Ben Bolker wrote: I recently suggested to someone ( http://stackoverflow.com/questions/6789055/r-inconsistency-why-add-t-sometimes-works-and-sometimes-not-in-the-plot-functi/6789098#6789098 ) that the should use methods(plot) or methods(class=function) to locate the documentation on the plot method for objects of class function, but they pointed out that these don't actually work. I can't figure out why not: src/library/graphics/man/curve.Rd contains the line \method{plot}{function}(x, y = 0, to = 1, from = y, xlim = NULL, ylab = NULL, \dots) and src/library/graphics/DESCRIPTION contains you mean the following line is in NAMESPACE rather than DESCRIPTION. S3method(plot, function) Yes, sorry. [presumably the extra quotes are in there because function is a reserved word?] I'm not sure where else the information should be. Searching around in the code tree for information on tail.function (which is listed in the methods: methods(class=function) [1] as.list.function head.function* print.function tail.function* I find the same S3method syntax, so I guess the quotation marks aren't the problem ... ?tail.function tells us this one is from package utils and you can search for this function in the sources of the utils package Or you could ask for getAnywhere(tail.function) and R tells you A single object matching tail.function was found It was found in the following places registered S3 method for tail from namespace utils namespace:utils [.] Best wishes, Uwe Sorry, I didn't frame my question very clearly. I can find tail.function just fine, or I could if I wanted to. What I don't know is why methods(plot) and methods(class=function) don't list plot.function even though its documentation and setup seem to be similar to tail.function, which *does* show up in methods(class=function) ... cheers Ben Bolker = No plot.function listing in either of these ... library(graphics) methods(plot) [1] plot.acf* plot.data.frame*plot.decomposed.ts* [4] plot.defaultplot.dendrogram*plot.density [7] plot.ecdf plot.factor*plot.formula* [10] plot.hclust*plot.histogram* plot.HoltWinters* [13] plot.isoreg*plot.lm plot.medpolish* [16] plot.mlmplot.ppr* plot.prcomp* [19] plot.princomp* plot.profile.nls* plot.spec [22] plot.spec.coherency plot.spec.phase plot.stepfun [25] plot.stl* plot.table* plot.ts [28] plot.tskernel* plot.TukeyHSD Non-visible functions are asterisked methods(class=function) [1] as.list.function head.function* print.function tail.function* Non-visible functions are asterisked -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4toYcACgkQc5UpGjwzenMyFACggRdP+48u++szSbV82S4HhTxj MJcAnAsZ0iOXAsXtSeB8PZ4JmlgUgb9t =2lyp -END PGP SIGNATURE- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] plot.function documentation/export?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 OK, I see that BDR did this on 2011-06-08 -- I was getting confused by looking at the code of the development version but running the release version. Thanks. Ben On 07/26/2011 02:33 PM, Uwe Ligges wrote: Now I see the difference: I was using R-devel and that worked as you expected. Best, Uwe Ligges On 25.07.2011 19:01, Ben Bolker wrote: On 07/25/2011 12:55 PM, Uwe Ligges wrote: On 25.07.2011 17:45, Ben Bolker wrote: I recently suggested to someone ( http://stackoverflow.com/questions/6789055/r-inconsistency-why-add-t-sometimes-works-and-sometimes-not-in-the-plot-functi/6789098#6789098 ) that the should use methods(plot) or methods(class=function) to locate the documentation on the plot method for objects of class function, but they pointed out that these don't actually work. I can't figure out why not: src/library/graphics/man/curve.Rd contains the line \method{plot}{function}(x, y = 0, to = 1, from = y, xlim = NULL, ylab = NULL, \dots) and src/library/graphics/DESCRIPTION contains you mean the following line is in NAMESPACE rather than DESCRIPTION. S3method(plot, function) Yes, sorry. [presumably the extra quotes are in there because function is a reserved word?] I'm not sure where else the information should be. Searching around in the code tree for information on tail.function (which is listed in the methods: methods(class=function) [1] as.list.function head.function* print.function tail.function* I find the same S3method syntax, so I guess the quotation marks aren't the problem ... ?tail.function tells us this one is from package utils and you can search for this function in the sources of the utils package Or you could ask for getAnywhere(tail.function) and R tells you A single object matching tail.function was found It was found in the following places registered S3 method for tail from namespace utils namespace:utils [.] Best wishes, Uwe Sorry, I didn't frame my question very clearly. I can find tail.function just fine, or I could if I wanted to. What I don't know is why methods(plot) and methods(class=function) don't list plot.function even though its documentation and setup seem to be similar to tail.function, which *does* show up in methods(class=function) ... cheers Ben Bolker = No plot.function listing in either of these ... library(graphics) methods(plot) [1] plot.acf* plot.data.frame*plot.decomposed.ts* [4] plot.defaultplot.dendrogram*plot.density [7] plot.ecdf plot.factor*plot.formula* [10] plot.hclust*plot.histogram* plot.HoltWinters* [13] plot.isoreg*plot.lm plot.medpolish* [16] plot.mlmplot.ppr* plot.prcomp* [19] plot.princomp* plot.profile.nls* plot.spec [22] plot.spec.coherency plot.spec.phase plot.stepfun [25] plot.stl* plot.table* plot.ts [28] plot.tskernel* plot.TukeyHSD Non-visible functions are asterisked methods(class=function) [1] as.list.function head.function* print.function tail.function* Non-visible functions are asterisked -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4vDBIACgkQc5UpGjwzenP54QCghWmpGf5gpmRVYqNxJ+gm41n4 ErgAoJlXroIs3DLIPnJ4qyEPy1izMrMl =ptBG -END PGP SIGNATURE- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] plot.function documentation/export?
On 25.07.2011 17:45, Ben Bolker wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I recently suggested to someone ( http://stackoverflow.com/questions/6789055/r-inconsistency-why-add-t-sometimes-works-and-sometimes-not-in-the-plot-functi/6789098#6789098 ) that the should use methods(plot) or methods(class=function) to locate the documentation on the plot method for objects of class function, but they pointed out that these don't actually work. I can't figure out why not: src/library/graphics/man/curve.Rd contains the line \method{plot}{function}(x, y = 0, to = 1, from = y, xlim = NULL, ylab = NULL, \dots) and src/library/graphics/DESCRIPTION contains you mean the following line is in NAMESPACE rather than DESCRIPTION. S3method(plot, function) [presumably the extra quotes are in there because function is a reserved word?] I'm not sure where else the information should be. Searching around in the code tree for information on tail.function (which is listed in the methods: methods(class=function) [1] as.list.function head.function* print.function tail.function* I find the same S3method syntax, so I guess the quotation marks aren't the problem ... ?tail.function tells us this one is from package utils and you can search for this function in the sources of the utils package Or you could ask for getAnywhere(tail.function) and R tells you A single object matching ‘tail.function’ was found It was found in the following places registered S3 method for tail from namespace utils namespace:utils [.] Best wishes, Uwe Any ideas? Ben Bolker sessionInfo() R version 2.13.1 (2011-07-08) Platform: i486-pc-linux-gnu (32-bit) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4tj4MACgkQc5UpGjwzenOKhgCeONfuyOCw+9Fe+REaMPWjUbF8 6ikAniQrf5J9bn9f3Kga1xUr5SVcLtot =Ju9G -END PGP SIGNATURE- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] plot.function documentation/export?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/25/2011 12:55 PM, Uwe Ligges wrote: On 25.07.2011 17:45, Ben Bolker wrote: I recently suggested to someone ( http://stackoverflow.com/questions/6789055/r-inconsistency-why-add-t-sometimes-works-and-sometimes-not-in-the-plot-functi/6789098#6789098 ) that the should use methods(plot) or methods(class=function) to locate the documentation on the plot method for objects of class function, but they pointed out that these don't actually work. I can't figure out why not: src/library/graphics/man/curve.Rd contains the line \method{plot}{function}(x, y = 0, to = 1, from = y, xlim = NULL, ylab = NULL, \dots) and src/library/graphics/DESCRIPTION contains you mean the following line is in NAMESPACE rather than DESCRIPTION. S3method(plot, function) Yes, sorry. [presumably the extra quotes are in there because function is a reserved word?] I'm not sure where else the information should be. Searching around in the code tree for information on tail.function (which is listed in the methods: methods(class=function) [1] as.list.function head.function* print.function tail.function* I find the same S3method syntax, so I guess the quotation marks aren't the problem ... ?tail.function tells us this one is from package utils and you can search for this function in the sources of the utils package Or you could ask for getAnywhere(tail.function) and R tells you A single object matching tail.function was found It was found in the following places registered S3 method for tail from namespace utils namespace:utils [.] Best wishes, Uwe Sorry, I didn't frame my question very clearly. I can find tail.function just fine, or I could if I wanted to. What I don't know is why methods(plot) and methods(class=function) don't list plot.function even though its documentation and setup seem to be similar to tail.function, which *does* show up in methods(class=function) ... cheers Ben Bolker = No plot.function listing in either of these ... library(graphics) methods(plot) [1] plot.acf* plot.data.frame*plot.decomposed.ts* [4] plot.defaultplot.dendrogram*plot.density [7] plot.ecdf plot.factor*plot.formula* [10] plot.hclust*plot.histogram* plot.HoltWinters* [13] plot.isoreg*plot.lm plot.medpolish* [16] plot.mlmplot.ppr* plot.prcomp* [19] plot.princomp* plot.profile.nls* plot.spec [22] plot.spec.coherency plot.spec.phase plot.stepfun [25] plot.stl* plot.table* plot.ts [28] plot.tskernel* plot.TukeyHSD Non-visible functions are asterisked methods(class=function) [1] as.list.function head.function* print.function tail.function* Non-visible functions are asterisked -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4toYcACgkQc5UpGjwzenMyFACggRdP+48u++szSbV82S4HhTxj MJcAnAsZ0iOXAsXtSeB8PZ4JmlgUgb9t =2lyp -END PGP SIGNATURE- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel