similar to: R-beta: packages/libraries vs sourcing it in

Displaying 20 results from an estimated 30000 matches similar to: "R-beta: packages/libraries vs sourcing it in"

1998 Jun 25
1
R-beta: re-appearing workspace
I am using R Version 0.62.0 Unstable-snapshot (April 26, 1998) on Linux. I use the AfterStep window manager. Problem. Once upon a time, a workspace was saved. But at the end of this session, on quitting R I say "no", don't save workspace. On starting up, there are all the old objects again! I take it that the workspace is saved as ~/.RData. So is the only solution to manually rm
1998 Mar 30
2
R-beta: Not loading C library
I've been using R for the last few weeks, but not with much success. If I try sourcing test.R from the 'class' package, I get this error: Error in .C("VR_knn1", as.integer(ntr), as.integer(nte), as.integer(p), : C/Fortran function not in load table I checked the class.so file, and sure enough VR_knn1 is there. Why can't R find it? By the way, I'm running RedHat Linux,
1998 Mar 30
2
R-beta: Not loading C library
I've been using R for the last few weeks, but not with much success. If I try sourcing test.R from the 'class' package, I get this error: Error in .C("VR_knn1", as.integer(ntr), as.integer(nte), as.integer(p), : C/Fortran function not in load table I checked the class.so file, and sure enough VR_knn1 is there. Why can't R find it? By the way, I'm running RedHat Linux,
2001 Mar 22
2
newbie questions: accessing functions globally
How can I access a function created in one data directory in another? I have been sourcing the text file that contains the function each time I go to another data dir. This is cumbersome, and I suspect there is a way to make functions global. Thanks in advance, S. David White Dept of Speech and Hearing Science Ohio State University Columbus, Ohio
1997 Sep 25
2
R-beta: return()
I have a question on the use of return(). (Nothing on it in the docs I have) The test code below gives the error: Error: Object "x" not found when I do: thingy2(). How should it be fixed? Thanks very much for any help! (My original solution to this sort of problem was to use global variables x<<-... y<<-...) Bill Simpson ----------------------------- thingy<-function(k)
1998 Mar 25
1
R-beta: qpois help
version .62: --------------------------------------------- > ?qpois The Poisson Distribution dpois(x, lambda) ppois(q, lambda) qpois(p, lambda) rpois(n, lambda) Arguments: x: vector of (positive) quantiles. p: vector of probabilities. n: number of random values to return. lambda: vector of positive means.
1998 Apr 03
1
R-beta: default paper size
After some paper clipping problems I checked options() and saw that the default paper size was a4; I need US Letter. So as per instructions I uncommented the R_PAPERSIZE line in config.site, R_PAPERSIZE=letter Restarting R, everything is still the same though. I guess I have to reinstall? That seems awkward. Is there a way a prompt ("a4 or letter paper?") can be inserted in the
1998 Apr 13
1
R-beta: command line editing?
I would love to have bash-like command line editing in R. (Press up cursor and see previous command line; use left cursor to go back then edit it) Appendix B in Rnotes describes Splus I guess, not R. Starting R by R -e doesn't let any of the following described actions (B.3) work. I don't use vi or EMACs (I use Nedit), so I would prefer bash-like interface anyway. (I don't think I
1998 Jan 16
1
R-beta: kill R Graphics window->crash R
I am running R-0.61.1 on linux under X. If I kill the R Graphics window (click on X box in upper right corner), then subsequently do x11(), R crashes. I find that things only work the right way if I close the graphics window using dev.off(). I was wondering if maybe it could be arranged that closing the graphics window via click would seem to R to be equivalent to typing dev.off(). BTW thanks
1998 Jul 03
1
R-beta: histogram
Can someone please tell me to make a density histogram? hist makes one with count or relative frequency on the y-axis. I want the density, which is (rel freq)/(bin width) In the help I see: intensities: values f^(x[i]), as estimated density values. If `all(diff(breaks) == 1)', they are the relative frequencies `counts/n' and in general satisfy
1998 Jul 03
1
R-beta: sum of squares and NAs
This surprised me. Is it the way it is supposed to be? > x<-c(1,2,3,4,5) > y<-c(1.2,1.3,1.4,1.5,NA) > x-y [1] -0.2 0.7 1.6 2.5 NA > (x-y)^2 [1] 0.04 0.49 2.56 6.25 NaN >>>so NA^2 = NaN? Why not still NA? > sum((x-y)^2) [1] NaN >>>yes that is reasonable So if you ever have a data set with missing observations (NAs), you can't do any nlm() least
1998 Jul 13
1
R-beta: accessing SEs from lm object
If I do fit<-lm(y~x) Is it possible to access the SE of the slope? (Analogous to getting the slope like this: fit$coef[2]) If not, it would be handy. (I want SE of 1/slope, and an approx way is fit$se[2]/(fit$coef[2]^2)) Thanks for any help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
1998 Mar 11
1
R-beta: ms, nls, etc?
I tried to ?ms, ?nls and apparently these aren't implemented on R yet. However I seem to remember postings on this list having to do with fitting nonlinear models (no I don't mean GLM type fits, I have a REAL nonlinear model: y=ax^b + c). So please tell me if it is possible to fit nonlinear models in R (by least squares or ML). Thanks! Bill Simpson
1998 Mar 06
1
R-beta: image saved ps file
I include the argument pty="s" to image, but still when I make an image by the method > postscript("rstuff/test.ps") > tauseq<-seq(0,1,.5) > cif2d.image(x,,y,tauseq) > dev.off() the image plot created is NOT square. I thought pty="s" would make it square. Generally it would be nice if the image saved to disk were like the one we see while in R
1998 Mar 12
2
R-beta: nonlinear fitting
Thanks very much Douglas for the pointer to nlm. Maybe the "Notes on R" maintainer can add at least a mention of nlm in the section on nonlinear fitting? I never did nonlinear fitting in S-Plus before, so I have nothing to unlearn, but I was hoping someone could show me how to do a least squares fit with nlm. example: x<-c(1,2,3,4,5,6) y<-.3*x^-.6 +.2 y<-y+rnorm(6,0,.01)
1998 Mar 12
2
R-beta: nonlinear fitting
Thanks very much Douglas for the pointer to nlm. Maybe the "Notes on R" maintainer can add at least a mention of nlm in the section on nonlinear fitting? I never did nonlinear fitting in S-Plus before, so I have nothing to unlearn, but I was hoping someone could show me how to do a least squares fit with nlm. example: x<-c(1,2,3,4,5,6) y<-.3*x^-.6 +.2 y<-y+rnorm(6,0,.01)
2012 Aug 14
3
set working directory to current source directory
Hi all, Is there a way to get cran R to set the working directory to be wherever the source file is? Each time I work on a project on different computers I keep having to set the working directory which is getting quite annoying. Thanks, Sachin [[alternative HTML version deleted]]
1998 Feb 27
1
R-beta: is there a way to get rid of loop?
Here is a programming question. The code I am using is quite slow and I was wondering if there is a way to get rid of the for loop. I am dealing with "interaction" in 2x2 table, and am using Edwards's G_I (Likelihood, p. 194). I label the cells in the table as follows stim response "y" "n" total -------------------------------- y hit miss nsignal
1998 Mar 26
1
R-beta: multiplot using fig
I followed Bill Venables's suggestion and tried to make a multiplot figure with fig (using R .62). > x<-rnorm(100) > y<-rnorm(100) > x11() > par(fig=c(0,2/3,0,1)) > plot(x,y) > par(fig=c(2/3,1,0,1)) > qqnorm(x) > postscript(file="twoplot.ps") > par(fig=c(0,2/3,0,1)) > plot(x,y) > par(fig=c(2/3,1,0,1)) > qqnorm(x) However
1998 Sep 03
2
ppoints
When I look at ppoints I see: ppoints<-function (x) { n <- length(x) if (n == 1) n <- x (1:n - 0.5)/n } However Venables & Ripley (2nd ed, p 165) say ppoints() should return (i-1/2)/n for n>=11; (i-3/8)/(n+1/4) for n<=10. The version below should work as described: ppoints<-function (x) { n <- length(x) if (n <= 10) (1:n - 0.375)/(n + 0.25) else (1:n - 0.5)/n