similar to: R programming style

Displaying 20 results from an estimated 2000 matches similar to: "R programming style"

1999 Sep 29
1
Is there an R-SQUARE function?
Hi there, I realize that this is a bit of a strange question, but here goes. In SAS, one can use the REG procedure to carry out a least-squares regression analysis. By specifying the R-SQUARE option in the SELECTION command, the program carries out regressions for every combination of every independant variable against the dependant variable. This is useful in smaller datasets, though difficult
2001 Feb 01
3
Rotated mtext
I seem to remember this coming up before, but I can't find it any messages I've saved or in the archives (searching by subject). I want to rotate mtext so that it's perpendicular to the right side. I tried srt=90 and lots of other values, but it seems to be ignored. Is there a way to do this? ______________________________________________________________________ Stuart Luppescu
2001 Jan 08
2
S Programming Book at Amazon.com
As of a moment ago (9 a.m., Monday, Jan. 8, 2001), the S Programming book by Venables and Ripley was once again selling for 17.98 American dollars at Amazon.com. Alas, I notice that "Mixed Effects Models in S and S-Plus" by Pinheiro and Bates now lists at Amazon for 97.25 American dollars, as opposed to about $70 a little while ago.
2000 Dec 05
1
Is robust regression available in R.
Hello, the R people. I look for robust regression in R. This method is available in S, its name is rreg. Colud anyone teach me ? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the
2000 Aug 04
2
pattern on bars?
Colors are real nice, but the publication I'm preparing these barplots for permits only black and white. The Splus plot options ``dbangle'' (or plain ``angle'') and ``density'' (as on p. 65 of MASS 1st ed.) don't seem to be available in R. Is there another way to do this? I'm running R 1.1.0 on Linux (intel). Thanks.
2000 Nov 02
2
Installing R on RedHat7.0
I recently got a new machine, running RedHat Linux 7.0 (kernel 2.2.16, XFree864.0.1), and tried to install R-1.1.1 on it from the rpm file on CRAN. RPM complained about missing dependencies: libreadline.so.3 libtcl8.0 libtk8.0 The RH7.0 installation includes later versions of these libraries. I went ahead and forced an installation, and of course R wouldn't work. By linking
2001 Jan 16
4
[OT] getting a ~ character in LaTeX
I am writing course notes in LaTeX. In the part where I am describing model-fitting functions in R I want to use a ~ character inline. If I am displaying an example of R code in its own environment I use the alltt environment, which protects the ~ character. I have forgotten how to protect the ~ when I am writing something like The operator `~' is used to define a model formula in \R.
2001 Sep 18
4
help in a separate window under linux
Hi there. R v1.3.0, Slackware linux 7.1 or Windows 98SE, PII 266, 64Mb RAM. I notice that under windows, R puts help info (ie. the response to '?<function>') into a new window, whereas under linux, it puts it into the main console window. I find the former much more helpful when checking a function's syntax. Is there a simple way of configuring R under linux to put its help
2007 Apr 18
1
[Bridge] Problem loading bridge.o
Hello, I want to add wireless capability to my Gentoo-linux based firewall/router at home, so I bought a Netgear MA311 PCI and installed the hostap package. I load the hostap_pci module and the wlan0 interface comes up fine. I can detect the signal from a wireless enabled laptop. Now I'm thinking I'm going to bridge the wlan0 interface and the eth1 interface, and run the firewall with br0
2000 Jul 07
2
Question of programming style
This is really a question of how to program this *BETTER*. It works as I have done it, but is quite ugly. I want to do a 3d scatterplot of the upper triangle of a matrix, where the z-values are the values in the matrix, and the row and column indices are the y- and x-values. The complete (11 by 11) matrix is mmtop94.2. Here is my awkward code: mmtop94.2[lower.tri(mmtop94.2)] <- NA # Here i
2002 Aug 02
3
I know this is wrong, but why?
My mind has become corrupted by having to use SAS too much. I wanted to calculate the difference of elements of two vectors if the signs are the same. I tried it the corrupted way first: if (effects1[,3] < 0 & effects0[,3] < 0) { imprv1 <- effects0[,3] - effects1[,3] } else if (effects1[,3] > 0 & effects0[,3] > 0) { imprv1 <- effects1[,3] - effects0[,3] } else {
2002 May 19
3
How to shade part of a density plot
I'm trying to shade part of a density plot. The code I'm trying (using the Old Faithful data as an example) is something like this: # The Old Faithful geyser data data(faithful) d <- density(faithful$eruptions, bw = "sj") plot(d) polygon(d[d$x>4], col = "wheat") I expected that the part of the curve to the right of 4 on the x axis should be shaded, but nothing
2004 Oct 11
3
split and rlm
Hello, I'm trying to do a little rlm of some data that looks like this: UNIT COHORT perdo adjodds 1010 96 0.39890 1.06894 1010 97 0.48113 1.57500 1010 98 0.36328 1.21498 1010 99 0.44391 1.38608 It works fine like this: rlm(perdo ~ COHORT, psi=psisquare) But the problem is that I have about 100 UNITs, and I want to do a
2000 Jul 28
4
Language element manipulation
I am very confused about this. I want to convert a string to a name so I can use it to extract an element of a data frame using `$'. Here is my (non-working) code: do.graph <- function (meas) { fn <- paste("a", meas, ".dat", sep='') themeas <- read.table(fn, header=F) ameas <- as.name(paste("a", meas, sep=''))
2000 Dec 05
6
R or Splus?
It's been suggested I use R, I suppose because my employer is too skint to pay for a copy of Splus. But.... it doesn't seem to be stable. I was trying to do some ordinary regression and stepping through a model. I was trying to set up a model ('kitchen_sink') in which to put all my model parameters. Then I wanted to use step() to see what it would reduce the model to. I
2000 Mar 27
1
Behavior different inside function?
I'm stumped with this. When I execute the lines in the function singly, they run fine, but when I run the function, I get this error on the read.table() line: Error in count.fields(file, sep, quote, skip) : can't open file fspci1.dat Can anyone tell my why this should be so? Here is the program: library(rpart) wait <- function(str="Press a key when ready...")
2000 Mar 28
1
loess.smooth dumps core
Has the loess.smooth() function changed? It used to work, but now it causes R to abort with a segmentation fault. I stole the function points.lines() from V&R 1st ed. pp. 67--68, but now it only works if I remove the line with loess.smooth. Here's the function I'm using: points.lines <- function(x, y, ...) { cor1 <-round(cor(x, y, use="pairwise"), digits=2)
2001 Oct 05
2
Reading in data in a triangle
I have plain-text data in lower triangular form that I want to read in. Does anyone know of an easy way to do this? ______________________________________________________________________ Stuart Luppescu -=-=- University of Chicago $(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu at uchicago.edu http://www.consortium-chicago.org/people/sl.html http://musuko.uchicago.edu/pubkey.asc for PGP
1999 Sep 17
1
Tukey's biweight
I want to estimate the center of a distribution with lots of outliers in one tail, and thought I would use a function such as S-plus's location.m() with psi.fun=bisquare (as per MASS 3 p. 131). However, R seems not have such a function, so my questions are: 1) Is there an R equivalent to location.m()? 2) Would huber() give me results that are similar (i.e., close enough)? Thanks.
2000 Dec 08
1
ylim doesn't work in boxplots?
I want to leave a little extra room at the bottom for a legend in a box plot, but I find that the boxplot function ignores ylim. Is there any way around this? Thanks. ______________________________________________________________________ Stuart Luppescu -=-=- University of Chicago $(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu at uchicago.edu