Displaying 20 results from an estimated 3000 matches similar to: "FW: [R] same random numbers in different sessions"
2008 Sep 11
2
Plot qnorm
Hi,
I have this problem:
X is hazardous variable N(mean 2, sd=3)
>>question 1) Find the c value, so that P(X>c)=0.10. using R
>>question 2) Graph the function N(2,3) and with this graph, explain what
you do in question number 1.
I just found question number one but not the second one. So, I'd like to
make a plot form this distribution N (2,3) using the functions plot and
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)) #
2010 Feb 02
3
Update problem? Rcmdr disappears, won't re-open
WinXP, R 2.10.1
I just updated R, and now have trouble. Perhaps it was the method I used to
keep all the packages.
I copied all the new packages from 2.10.1 back into the 2.10.0 folder, then
copied them and all the others I've previously added from the 2.10.0 folder
and pasted them back into 2.10.1's appropriate folder.
Is this the source of my troubles?
I am trying unsuccessfully to
2009 Mar 23
3
How to set up a function for "Central Limit Theorem"
Hello guys, I am stuck here:
How do I make 1000 samples of n = 10 observations from an Exponential
distribution and then compute the mean for all those 1000 samples?
Basically I need to prove the Central Limit theorem, which states:
http://www.nabble.com/file/p22664113/d175f06cbf200bd52a2c27a2e56dc594.png
Where the Sn is sum of random variables, n we have from the question, mu is
mean and
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
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
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]
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
2008 Aug 20
3
Writing Rcmdr Plugins
Dear all,
I am trying to write a plugin for the RCommander and having troubles
understanding how to actually do that. I have read Mr. Fox's tutorial
about writing Rcmdr plugins and though.... it seems to me that some
steps are missing. I would like to know, whether there are some
Commands which generate a plugin package out of a given library. Or do
we just have to attach the .First.lib
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 Jul 27
2
Introductory statistics and introduction to R
Hi,
I have a bright, diligent second-year graduate student who wants to
learn statistics and R and will, in effect, be taking a tutorial from me
on these subjects. (If you've seen some of my questions on this list,
please don't laugh.) As an undergrad he majored in philosophy, so this
will be his first foray into computer programming and statistics.
I'm thinking of having him use
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
2008 Jun 04
1
permsn incorrect when x==m (library: prob) (PR#11571)
Full_Name: Obnoxious
Version: 2.7.0
OS: Windows
Submission from: (NULL) (121.223.77.238)
Objective:
Generate all permutations of the elements of x taken m at a time.
Library:
prob
Function:
permsn
Issue:
Does not appear to be working correctly when x==m.
Example:
libary(prob)
permsn(2,1) i.e., x > m
#Gives the correct result of
[,1] [,2]
[1,] 1 2
#Yet
permsn(2,2) i.e., x==m
2007 Sep 16
2
power calculation for repeated measures ANOVA?
Is there a way to calculate power for repeated
measures ANOVA (2 groups x 7 observations)? I have
searched all over, but all I can find is
power.anova.test, but that would not give accurate
results, right?
Thanks,
Matt Bridgman
2007 Dec 21
2
number of count of each unique row
Hi,
I have a matrix of duplicate rows. How to output a list the unique rows with their count? I have used "unique" to have the unique rows, but can't produce the occurences of each unique row.
Thanks
Louis
---------------------------------
[[alternative HTML version deleted]]
2009 Jul 30
1
Logistic regression and R
Hello everybody :-)
I have some data that I want to model with a logistic regression, most
of the independent variables are numeric and the only dependent is
categorical, I was thinking that I could apply a logistic regression
using glm but I wanted to deepen my knowledge of this so I tried to do
some reading and found the "iris" dataset, now I would like to ask two
things, first
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