[R] Defining and running a simple function

2006-02-01 Thread Thomas L Jones
I am trying, with extremely limited success, to get the R software to do some simple computations. Specifically, I defined a test function as follows: fn - function () { hw - hello world hw s - seq (0, 0.98, 0.02) s } The output should just be the words hello world, followed by a

[R] (newbie) Saving the workspace in .txt format

2006-02-02 Thread Thomas L Jones
(newbie question) How do I save the workspace in Windows text format (with the file extension .txt)? Also, having saved it and edited it, how do I load it back into the workspace? The setup is: Windows XP Home Edition Service Pack 2 R 2.2.0 English language Administrator privileges are enabled

[R] Scatterplot with corner at (0, 0)

2006-02-06 Thread Thomas L Jones
. Thomas L. Jones, Ph.D., Computer Science __ 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

[R] How do I tell it which directory to use?

2006-02-21 Thread Thomas L Jones
with the details of why I am doing this. I was able to call Sys.getenv (R_USER) and get the home directory. I am a newbie to R and not familiar with the terminology. Tom Thomas L. Jones, Ph.D., Computer Science __ R-help@stat.math.ethz.ch mailing list https

[R] Debugging a program written in the R language

2006-03-08 Thread Thomas L Jones
if you are a member of the *nix community, which I am not. Question: How are you -supposed- to debug a program which you have written in the R language? Tom Thomas L. Jones, Ph.D., Computer Science __ R-help@stat.math.ethz.ch mailing list https

[R] Finding out the format of an object

2006-04-06 Thread Thomas L Jones
I get is a bunch of numbers. Also, how could I have looked this up without having to post a question here? Tom Thomas L. Jones, Ph.D., Computer Science __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Finding the format of an object redux

2006-04-13 Thread Thomas L Jones
at the documentation, it just tells me to look somewhere else. Is there a function f such that f (obj) will tell you a little bit about the format of the object? Tom Thomas L. Jones, Ph.D., Computer Science __ R-help@stat.math.ethz.ch mailing list https

[R] Extracting the results of a gam smooth

2006-04-15 Thread Thomas L Jones
I am conducting a gam smooth and having a devil of a time getting out the answers so I can work with them. Here are the two lines of code: model - gam(y~lo(x, span=0.75, degree=2), family=poisson) resp_pout - predict (model, data.frame (x=x), type = 'response') The problem comes when I try

[R] loess smoothing question

2005-12-19 Thread Thomas L Jones
I am trying to smooth a dataset with evenly spaced values of x, perhaps using loess smoothing or something similar. However, the y values are hypergeometrically distributed; I think I want to use a logarithmic link function. It falls under the general heading of non-parametric regression. The

[R] An embarrassment of riches

2006-01-02 Thread Thomas L Jones
I have a dataset which I am trying to smooth, using locally weighted regression. The y values are count data, integers with Poisson distribution, and it is important for the regression function to know this, since assuming a Gaussian distribution will lead to substantial errors. It is a time

[R] Bookmarking a page inside r-project.org

2006-01-02 Thread Thomas L Jones
site. It would be very helpful if the Web site were revised so that many if not most pages had their own URL's, allowing the use of bookmarks. Tom Thomas L. Jones, Ph.D., Computer Science __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

[R] More on bookmarking a page

2006-01-02 Thread Thomas L Jones
The subject is how to bookmark a page inside r-project.orgFrom Peter Dalgaard:At least in Firefox, one thing you can do is to bring up the relevant link in a new window or tab (just right-click it) and bookmark

[R] Newbie question--locally weighted regression

2006-01-04 Thread Thomas L Jones
I have a dataset, a time series comprising count data at five minute intervals. These are the number of people who voted at a particular voting place during a recent election. The next step is to smooth the data and estimate a demand vs time-of-day function; the problem is of interest in

[R] Question about predict function

2006-12-27 Thread Thomas L Jones
I am working with a non-parametic smoothing operation using a Generalized Additive Model. It is a bivariate data set. I know how to do the smooth, and out comes a nice smooth curve. Now I want to find the value of the smoothed curve for several values of x (the abscissa). This can be done

[R] go or goto command

2007-01-10 Thread Thomas L Jones
Some computer languages, including C, have a go or go to command which can be used to shift control to a different part of a function. Question: Does the R language have a corresponding command? (Yes, I am aware that it can be abused; but, in the hands of a good programmer, it is simple to

[R] Getting and using a function

2007-04-13 Thread Thomas L Jones
I am trying to do what is perhaps the most basic procedure which can be done with the R software. Under Windows XP Home Edition, I want to get a copy of the function gam, then put it in and use it. I intentionaly use informal terms, rather than technical terms whose exact meaning I might or