Hi, I'm new to R. I'm trying to do some extreme value theory analysis, looking at the Mean Excess Plot of a series. These are the commands I type to get the plot: x=read.table("data.txt",header=T) goa=(x[,3]) meplot(goa) I can see the plot, but I would like to see the values of the x and y axis. According to this page (http://rss.acs.unt.edu/Rdoc/library/VGAM/html/meplot.html), "A list is returned invisibly with the following components. threshold The x axis values. meanExcess The y axis values. Each value is a sample mean minus a value u. " So my question is, how can I see (or even export) threshold and meanExcess? Thanks, F -- View this message in context: http://r.789695.n4.nabble.com/Return-invisible-list-tp3652323p3652323.html Sent from the R help mailing list archive at Nabble.com.
On Jul 7, 2011, at 3:00 PM, francisco.ahued wrote:> Hi, I'm new to R. I'm trying to do some extreme value theory analysis, > looking at the Mean Excess Plot of a series. These are the commands > I type > to get the plot: > > x=read.table("data.txt",header=T) > goa=(x[,3]) > meplot(goa) > > I can see the plot, but I would like to see the values of the x and > y axis. > > According to this page > (http://rss.acs.unt.edu/Rdoc/library/VGAM/html/meplot.html), "A list > is > returned invisibly with the following components.If a function returns something invisibly, it means that you need to assign the result to a named object, which can then be inspected.> > threshold The x axis values. > meanExcess The y axis values. Each value is a sample mean minus a > value u. > > " > > So my question is, how can I see (or even export) threshold and > meanExcess?-- David Winsemius, MD West Hartford, CT
Thanks! How do I do that? -- View this message in context: http://r.789695.n4.nabble.com/Return-invisible-list-tp3652323p3652396.html Sent from the R help mailing list archive at Nabble.com.
On Jul 7, 2011, at 3:41 PM, savage.arrow wrote: Adding back context from earlier posting (WHICH IS YOUR DUTY savage.arrow) ---------- x=read.table("data.txt",header=T) goa=(x[,3]) meplot(goa) I can see the plot, but I would like to see the values of the x and y axis. According to this page (http://rss.acs.unt.edu/Rdoc/library/VGAM/html/meplot.html), "A list is returned invisibly with the following components. So my question is, how can I see (or even export) threshold and meanExcess? -----------> Thanks! How do I do that??"<-" # And this also means you need to pick up your copy of "Introoduction to R" and read the Posting Guide where the request to include context is made and the justification for the request is offered.> > -- > View this message in context: http://r.789695.n4.nabble.com/Return-invisible-list-tp3652323p3652396.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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.David Winsemius, MD West Hartford, CT
> -----Original Message----- > [mailto:r-help-bounces at r-project.org] On Behalf Of francisco.ahued > Subject: [R] Return invisible list > > x=read.table("data.txt",header=T) > goa=(x[,3]) > meplot(goa) > > I can see the plot, but I would like to see the values of the > x and y axis. >Something returned as invisible is returned but not printed. You just need to catch it in a suitable variable. That's what you do with any other function where you want to keep the value: x=read.table("data.txt",header=T) goa=(x[,3]) mplist <- meplot(goa) #assigns the output to a variable called mplist mplist #calls the default print method for that object. If you don't need to keep the values for re-use, putting something in parentheses evaluates the expression and returns the result, effectively removing the invisibility cloak without explicit assignment. Example z<-rnorm(100) hist( z ) #returns invisible list but ( hist( z ) ) #additionally displays the output. S Ellison******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}