similar to: Introductory statistics and introduction to R

Displaying 20 results from an estimated 2000 matches similar to: "Introductory statistics and introduction to R"

2008 Nov 24
14
how to test for the empty set
Dear R-help, I first thought that the empty set (for a vector) would be NULL. x <- c() x However, the documentation seems to make clear that there _many_ empty sets depending on the vector's mode, namely, numeric(0), character(0), logical(0), etc. This is borne out by y <- letters[1:3] z <- letters[4:6] intersect(y,z) which, of course, is non-NULL: is.null(character(0)) #
2009 May 30
3
setdiff bizarre (was: odd behavior out of setdiff)
Dear R-devel, Please see the recent thread on R-help, "Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified" posted by Jason Rupert. I gave an answer, then read David Winsemius' answer, and then did some follow-up investigation. I would like to change my answer. My current version of setdiff() is acting in a way that I do not understand, and a way
2009 May 30
3
setdiff bizarre (was: odd behavior out of setdiff)
Dear R-devel, Please see the recent thread on R-help, "Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified" posted by Jason Rupert. I gave an answer, then read David Winsemius' answer, and then did some follow-up investigation. I would like to change my answer. My current version of setdiff() is acting in a way that I do not understand, and a way
2010 May 03
2
Hierarchical factors
Hello, Hierarchical factors are a very common data structure. For instance, one might have municipalities within states within countries within continents. Other examples include occupational codes, biological species, software types (R within statistical software within analytical software), etc. Such data structures commonly use hierarchical coding systems. For example, the 2007 North
2009 May 29
2
Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified
I think I am using the improved version of setdiff(...) that handles data.frames, so I think some odd behavior was expected but this one is escaping me. It appears that the the addition of duplicate entries is not caught by the setdiff(...). Is this expected behavior? If so, is there another method or approach that should be used to identify duplicate row entries between two different data
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list), I am appealing for some help understanding geom_rect() in ggplot2. What I want to do is very simple. I want to generate a plot of rectangles. Each one represents a business cycle. The x-values will be pairs representing the start and end of each cycle. The y-values
2010 May 04
2
read.table: skipping trailing delimiters
Hi, I am trying to read a tab-delimited file that has trailing tab delimiters. It's a simple file with two legitimate fields. I'm using the first as row.names, and the second should be the only column in the resulting data frame. Initially, R was filling the last column with NA's, but I was able to stop that by setting
2009 Dec 15
1
Starting with R and distributions graphics
HI, i'm really new of R and i need some help. I have to describe some distributions for some dices throw: - launching 3 dices i need the distribution of the sum of the two higher values - launching 4 dices i need the distribution of the occurrences of the same value possibly i need a way to compare the two distribution adding the fourth dice to the first without summing it (only for
2010 Mar 19
1
Gamma parametrization
Dear R users, ?rgamma gives me : rgamma(n, shape, rate = 1, scale = 1/rate) rate: an alternative way to specify the scale. The Gamma distribution with parameters ‘shape’ = a and ‘scale’ = s has density f(x)= 1/(s^a Gamma(a)) x^(a-1) e^-(x/s) Should I understand that scale=1/rate ? Is it written somewhere ? Then
2010 Sep 08
2
choose.dir() gone?
Hi, I fail to find "choose.dir()" in my current R install (see below)? Didn't that exist at some point? How to achieve "file.choose()" equivalent functionality for directories? Thanks for any hints, Joh > sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3]
2006 Jun 12
2
Chapters
I'm surprised this isn't a FAQ, but I searched all over and could not find a reference to it. Chambers (1998) makes repeated references to "Chapters" in S (e.g., p. 6), but I can find no reference to "Chapters" in R. Since Chapters were not used in earlier versions of S, I'm wondering if R uses them or not. If it does, how does one get them to work? I've
2009 May 14
2
can you tell what .Random.seed *was*?
Dear R-help, Suppose I write a script that looks something like this: #### script.R set.seed(something) x <- rnorm(100) y <- runif(500) # bunch of other stuff save.image() ### end of script.R Now, I give you a copy of my script.R (with the set.seed statement removed, of course) together with the .RData file that was generated by the save.image() command. Question: 1) can you tell
2010 Oct 12
1
FW: [R] same random numbers in different sessions
From R-help ... >I notice that you have the IPSUR package loaded; you know, just a >shot in the dark here, but did you try not loading it? > >I ask because the vignette is built by making a special choice for >set.seed, and the workspace that ships with the package might be >interacting in an unexpected way. Is it possible that a package can save a set seed and have the effect
2010 May 04
1
Flushing print buffer
Hello, I have a function with these lines: test <- function(object,...){ cat("object: has ",nrow(object),"labels\n") cat("Head:\n") head(object,...) cat("\nTail:\n") tail(object,...) } If I feed it a data frame object, it only prints out the tail part. If I comment out the last two lines of
2010 Nov 02
1
R install in Ubuntu maverick issues
I am trying to install the maverick version. The lucid version works flawlessly, but this one promts this messages. The following packages have unmet dependencies: r-base: Depends: r-base-core (>= 2.12.0-1maverick0) but it is not going to be installed Depends: r-recommended (= 2.12.0-1maverick0) but it is not going to be installed Recommends: r-base-html but it is not going
2009 Dec 04
3
Combinations and joint probabilities
  Dear R helpers   Suppose I have two sets of ranges (interest rates) as   Range 1 : (7 – 7.50, 7.50 – 8.50, 8.50 – 10.00) with respective probabilities 0.42, 0.22 and 0.36.     Range II : (11-12, 12-14, 14-21) with respective probabilities 0.14, 0.56 and 0.30 respectively.     My problem is to form the combinations of these ranges in a decreasing order of joint probabilities. It is assumed that
2009 Sep 30
1
How to calculate KMO?
Hi All, How do i calculate KMO for a dataset? *Dataset:---------------------* m1 m2 m3 m4 m5 m6 m7 m8 1 2 20 20 2 1 4 14 12 2 9 16 3 5 2 5 5 15 3 18 18 18 13 17 9 2 4 4 7 7 2 12 2 11 11 11 5 7 8 5 19 5 2 20 18 6 7 4 7 4 7 9 3 3 7 5 5 5 12 5 13 13 12 8 6 6 4 3 5 17 17 16 9 12 12 4 2 4 4 14 14 10 5 14
2007 Dec 10
1
setdiff for data frames
Hello, I have been interested in setdiff() for data frames that operates row-wise. I looked in the documentation, mailing lists, etc., and didn't find exactly the right thing. Given data frames A, B with the same columns, the goal is to extract the rows that are in A, but not in B. Of course, one can usually do setdiff(rownames(A), rownames(B)) but that is cheating. :-) I played around a
2010 Mar 02
1
Reading data file with both fixed and tab-delimited fields
Hello R wizards, What is the best way to read a data file containing both fixed-width and tab-delimited files? (More detail follows.) _*Details:*_ The U.S. Bureau of Labor Statistics provides local area unemployment statistics at ftp://ftp.bls.gov/pub/time.series/la/, and the data are documented in the file la.txt <ftp://ftp.bls.gov/pub/time.series/la/la.txt>. Each data file has five
2009 Jan 04
1
Bivarite Weibull Distribution
HI Every one Could some one provide me definitions of following bivariate distributions gamma, exponencial, Weibull, half-normal , Rayleigh, Erlang,chi-square thanks A.S. Qureshi