Displaying 20 results from an estimated 3000 matches similar to: "Simulating data (stupid question)"
2009 Sep 24
1
Fw: Re: Multiple Normal Curves
Sorry about the subject
--- On Thu, 24/9/09, KABELI MEFANE <kabelimefane@yahoo.co.uk> wrote:
From: KABELI MEFANE <kabelimefane@yahoo.co.uk>
Subject: Re: [R] Multiply Normal Curves
To: R-help@r-project.org
Date: Thursday, 24 September, 2009, 11:48 AM
R -helpers
i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to
2009 Sep 09
1
Combining simulated data
R helpers
Please help me combine the simulated data to a form of table where: Hypermarket have 10 rows, supermarket have 15 rows,......., spazashops with 35 rows.
Hypermarket <- rnorm(10, mean=20000, sd=7000)
Supermarket <- rnorm(15, mean=12000, sd=4000)
Minimarket <- rnorm(20, mean=10000, sd=4000)
Cornershop <- rnorm(20, mean= 8000, sd=3000)
Spazashop <- rnorm(35, mean=
2009 Oct 01
5
How to use Subpopulation data?
Dear Helpers
I have a sample frame and i have sampled from it using three methods and now i want to calculate the statistics but i only get the population parameters.
H <- matrix(rnorm(100, mean=50000, sd=5000))
sampleframe=data.frame(type=c(rep("H",100)),value=c(H))
sampleframe
str=strata(sampleframe,c("type"),size=c(20,), method="srswor")
2009 Sep 12
4
Normal distribution
Dear All
let me go one step further by asking you if you could help me show that the distribution of this data in normal. have a little idea (by trial and error) but i seem to not fully understand how its done.
H<-rnorm(100, mean=50000, sd=3000)
par(las=1)
hist(H, breaks=seq(40000, 60000, 1000), freq=F)
f<- function(x) exp(-(x-5000)^2/18000000)/sqrt(18000000*pi)
x<- seq(40000,
2009 Sep 24
0
Fw: Simulating and Plotting
R -helpers
i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define. I have also been able to do simple rendom sample. If possible can someone help here is the code for the graph pleae help
data.frame(ID=c(1,2,3),mu=c(10000,34000,50000),sigma=c(2000,3000,5000))
curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=2000,
2009 Sep 09
3
Help on percentage of random numbers for different classes
R-list
I am sorry for asking this stupid question, but i have been running in circles. I want to randomly generate a scaling point of between 1 and 10, for say hundred entries, where the first 10% percent is has rates between 2 and 7, the next 15% 3 and 7, 20% between 3 and 9, 20% between 3 and 10, 35% between 5 and 10. The problem is that i can only generate the usual 100 using runif function
2009 Aug 25
1
Fw: Re: Simulating data for sampling (stupid question)
Dear All
I know that you do not have to help me (as this is not a pure R problem) but please do, i am new to R as a CPI compiler, i just need to do a sample to see which sampling method best works in different situations, therefore since this is for practice purposes nobody will finance a real project thats why i need you to help me direct me as to how simulate data (just direct me,not 100%
2009 Sep 12
1
(no subject)
Dear All
I hope you can help me with this small problem. I want to draw a normal distribution line to this data:
p<-rnorm(100, mean=50000, sd=3000)
hist(p)
Kabeli
[[alternative HTML version deleted]]
2009 Aug 25
0
Fw: Re: Simulating data (stupid question)
Dear All
I know that you do not have to help me (as this is not a pure R problem) but please do, i am new to R as a CPI compiler, i just need to do a sample to see which sampling method best works in different situations, therefore since this is for practice purposes nobody will finance a real project thats why i need you to help me direct me as to how simulate data (just direct me,not 100%
2012 May 05
3
alarm() doesn't beep
Dear all
I'd like to make a beeping sound in R, but alarm() doesn't beep? I
checked ?alarm but I couldn't find any pointers to system
configuration. Any ideas?
Regards
Liviu
> sessionInfo()
R version 2.14.2 (2012-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5]
2009 Aug 04
2
100% CPU when running (cran2deb) JGR on Debian
Dear all,
I installed the amd64 cran2deb [1] JGR binaries on a fresh Debian
testing, and JGR is missbehaving. When JGR starts up, one core of the
CPU goes to 100% and stays there, even though I am keeping it idle and
not performing any operation.
I tried JGR with both sun-java6-jdk and openjdk-6-jdk,
debian-liv:/home/liviu# update-alternatives --config java
There are 4 choices for the alternative
2013 Apr 15
6
how to transform string to "Camel Case"?
Dear all,
Given the following vector:
> (z <- c('R project', 'hello world', 'something Else'))
[1] "R project" "hello world" "something Else"
I know how to obtain all capitals or all lower case letters:
> tolower(z)
[1] "r project" "hello world" "something else"
> toupper(z)
[1] "R
2011 Mar 06
4
sorting & subsetting a data.frame
Dear all
This may be obvious, but I cannot get it working. I'm trying to subset
& sort a data frame in one go.
x <- iris
x$Species1 <- as.character(x$Species)
##subsetting alone works fine
with(x, x[Sepal.Length==6.7,])
##sorting alone works fine
with(x, x[order(Sepal.Length, rev(sort(Species1))),])
##gets subsetted, but not sorted as expected
with(x, x[(Sepal.Length==6.7) &
2009 Aug 20
4
expanding 1:12 months to Jan:Dec
Dear R users
I would like to do some spreadsheet style expansion of dates. For
example, I would need to obtain a vector of months. I approached in an
obviously wrong way:
> paste(01:12)
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12"
> as.Date(paste(01:12),
2010 Nov 30
3
pca analysis: extract rotated scores?
Dear all
I'm unable to find an example of extracting the rotated scores of a
principal components analysis. I can do this easily for the un-rotated
version.
data(mtcars)
.PC <- princomp(~am+carb+cyl+disp+drat+gear+hp+mpg, cor=TRUE, data=mtcars)
unclass(loadings(.PC)) # component loadings
summary(.PC) # proportions of variance
mtcars$PC1 <- .PC$scores[,1] # extract un-rotated scores of
2009 Oct 14
3
currency conversion function?
Dear all
Is there any R function that would perform currency conversion using
up-to-date exchange rates? I would be looking for a function that
allows to download recent exchange rates (say, from Yahoo!) and then
use these in converting currencies (say, USD to EUR).
I am not sure whether r-sig-finance would be more appropriate, but the
(off-)topic feels general enough to me. Thank you
Liviu
--
2011 Aug 10
3
convert 'list' to 'vector'?
Dear all
How does one convert a "non-symmetric" list to a vector? See below:
> x <- list()
> x[[1]] <- letters[1:5]
> x[[2]] <- letters[6:10]
> x[[3]] <- letters[11:12]
> x
[[1]]
[1] "a" "b" "c" "d" "e"
[[2]]
[1] "f" "g" "h" "i" "j"
[[3]]
[1] "k"
2009 May 15
4
replace "%" with "\%"
Dear all,
I'm trying to gsub() "%" with "\%" with no obvious success.
> temp1 <- c("mean", "sd", "0%", "25%", "50%", "75%", "100%")
> temp1
[1] "mean" "sd" "0%" "25%" "50%" "75%" "100%"
> gsub("%",
2011 Oct 12
4
R and Forex
Hi all,
I recently started learning about Forex and found this O'Reilly book in
Barnes & Nobles about R. I bought it out of pure curiosity. I like what I
see. However, I have a question. Has anyone tried to bring these two ideas
together in a financial and trading sense? Are there any libraries or
modules in R that can aid in this venture?
--Yves
[[alternative HTML version
2010 Oct 23
1
command to start R and Rcmdr?
Dear all
I would like to start R with Rcmdr from the cli, without tweaking
Rprofile.site. This has been discussed in the past [1], but I don't
see a solution that (1) could be used with any working directory and
(2) would avoid starting Rcmdr on every R start-up.
Personally I tried the following, which starts R but not Rcmdr
liv at liv-laptop:~$ R --interactive -e 'require(Rcmdr)'