similar to: S Programming Book at Amazon.com

Displaying 20 results from an estimated 1100 matches similar to: "S Programming Book at Amazon.com"

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.
2010 Sep 01
5
[semi-OT] Using fortune() in an email signature
Hello, As you can see from my signature in this message, I use the R fortune function to generate a fortune, which is then fed to the signature program, which constructs a named pipe containing the fortune-bearing sig, which is then included in mail messages. The problem is that it's got extraneous junk in it and I can't figure out how to get rid of it. This is the command that generates
2001 Jan 05
1
Trends for many units
I have data on every grade in all elementary schools in Chicago over 5 years. I would like to estimate a trend over time for each grade in each school. There are 17,600 data all together (about 460 schools, nearly 8 grades each, over 5 years). Is there a not-so-hard way to do this in R (I was thinking of using rlm)? ______________________________________________________________________ Stuart
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
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.
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 {
2010 Feb 19
3
Omitting members of a sequence
Hello, this is just a point of curiosity with me. I want a sequence of numbers from 64 to 70, omitting the 2nd and 4th numbers. I can do it these ways: > seq(64, 70)[-c(2, 4)] [1] 64 66 68 69 70 > foo <- 64:70 > foo[-c(2, 4)] [1] 64 66 68 69 70 But how come this doesn't work? > 64:70[-c(2, 4)] [1] 64 65 66 67 68 69 70 Just wondering. -- Stuart Luppescu -=- slu .at.
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=''))
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 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
2003 Sep 05
3
Dotchart question
Sorry to keep asking elementary questions......I appreciate the help. I am trying to create a dotchart with the rows sorted according to the values, rather than the labels. When I try prof <- c('Accountant', 'Administrative assistant', 'Garment worker', 'Cook', 'Dentist', 'General practictioner', 'Graduate student', 'High level
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
2011 Aug 16
2
Assignment working differently inside ifelse()
Hello all, I need to extract rows and columns from a data frame and put them in a matrix. In some cases, there are no rows in the data frame meeting the selection criteria. For those rows I want to put a row of 0's in the matrix. Here's my clumsy code: tab1.m1 <- matrix(0, nrow=2, ncol=4) tab1.m1[1,] <- ifelse(length(as.matrix(tab1[tab1$comp==the.comp & tab1$schlid==the.schl
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
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
2000 Mar 29
2
R programming style
Hi R fans, I was trying to write some code in R when I realized that I was just writing a FORTRAN 77 style program in the R syntax, and hence coming nowhere near tapping the potential of R. I'm wondering what is a good reference that would help me get up to speed in programming in R (i.e., using these classes, methods, objects, accessor functions, and many other things I don't
2012 Mar 22
2
Order of terms in formula changes aov() results
Hello, This one is very perplexing. I have teacher observation data, with factors teacher ID, observer ID, component, grade and subject. When I do this, aov(data=ratings.prin.22, rating ~ obsid.f + tid.f + subject.f + grade.f + comp.f) I get this: Terms: obsid.f tid.f grade.f comp.f Residuals Sum of Squares 306.23399 221.38173 1.70000 14.52831 279.05780 Deg. of
2011 Jan 23
2
Ordering box plots
Hello all, I want box plots by group to display in order of increasing mean (or median) of each group but can't seem to figure it out and couldn't find anything on R-seek, either. My data looks like this: meas unit sid grade rsprti 1 2.24 1002 99999902 NA 0.8600000 2 3.04 1007 43589520 3 0.9400000 3 4.95 2002 39910470 5 1.5300000 4 2.24 2002 39986280 5
2010 Jun 29
2
Conditionally constructing columns in a data frame
Hello, I have to construct 5 new columns in a data frame depending on the value of another of the columns in the data frame. The only way I could figure out to do this was to subset the data frame five times, do the variable construction, and then rbind the subsets back together. Here's part of the code I used: read001 <- read[read$existstr=="001",] read001$era1end <- NA