Dear list,
We have a number of files containing similarly structured data:
file1:
A B C
1 2 3
4 5 6
file2:
A B C
7 8 9
10 11 12
... etc
My part of R receives all these data as an array: 1,2,3... 12 together
with info about dimensions (row,col,fileN) . (
Converting the data into 3D cannot simpl
On Fri, 15 May 2009, Dieter Menne wrote:
Stats Wolf gmail.com> writes:
Postscript, however, does not have to be what I need for two reasons.
First, it does not accept some special characters from foreign
languages (exactly like PDF).
'foreign' is a relative term which is imprecise (and some
On 15 May 2009, at 10:01, Prof Brian Ripley wrote:
On Fri, 15 May 2009, Dieter Menne wrote:
Stats Wolf gmail.com> writes:
Postscript, however, does not have to be what I need for two
reasons.
First, it does not accept some special characters from foreign
languages (exactly like PDF).
'
hey guys, i've been following this discussion about the simulation, and being a
beginner myself, im really unsure of the best method.
I hve the same problem as the initial one, except i need 1000 samples of size
15, and my distribution is Exp(1). I've adjusted some of the loop formulas for
> When i want to do ANOSIM i get an NaN error message. What is wrong?
> > (lots of other code)
> > iwithin=rep(0,(N*(N-1)/2) )
> > r.w=sum(r*iwithin)/sum(iwithin)
iwithin is a vector of zeroes and so is its sum. r*iwithin is also a
vector of zeroes, and so is its sum. Thus r.w=sum(r*iwithin)/su
hey guys, i've been following this discussion about the simulation, and being a
beginner myself, im really unsure of the best method.
I hve the same problem as the initial one, except i need 1000 samples of size
15, and my distribution is Exp(1). I've adjusted some of the loop formulas for
Try this:
> x <- array(1:12,c(3,2,2))
> x
, , 1
[,1] [,2]
[1,]14
[2,]25
[3,]36
, , 2
[,1] [,2]
[1,]7 10
[2,]8 11
[3,]9 12
> xt <- aperm(x, c(2,1,3))
> xt
, , 1
[,1] [,2] [,3]
[1,]123
[2,]456
, , 2
[,1] [
On Fri, 15 May 2009 19:17:37 +1000 Kon Knafelman
wrote:
KK> I hve the same problem as the initial one, except i need 1000
KK> samples of size 15, and my distribution is Exp(1). I've adjusted
KK> some of the loop formulas for my n=15, but im unsure how to proceed
KK> in the quickest way.
KK> Can
Ajay Shah wrote:
> Here's my best version of your code:
>
> ## Data
> M <- structure(list(date = structure(c(13634, 13665, 13695, 13726,
> 13757, 13787, 13818, 13848, 13879, 13910, 13939, 13970,
> 14000,
> 14031, 14061, 14092, 14123, 14153, 14184, 142
Hi.
Depending on your requirements, one option would be to do the join in
R using merge()
If you wish to run SQL joins across multiple databases, then it is not
an R problem but a database problem. For a quick solution, I would
write scripts that bring all your data together into one database
(co
Dear All,
I requiered your feedbacks about a web interface for R scripts.
I already tested RGG ( but it's not web).
and two of the CRAN list : Rserve & Rpad.
However, Rpad requieres some knowledge in Javascript, php etc...
and with Rserve I have to create a web interface entirely.
Rwui from th
Dear R-Help Members,
I am working on an analysis of a social network of web pages. Therefore
I use the STATNET package which is such a good sna package. Thank you
for developing it!
But now I came to a point where my R skills are not good enough for what
I want. So I am asking you if you mi
Introducing the Intel® Core™2 Quad processor for desktop PCs, designed
to handle massive compute and visualization workloads enabled by
powerful multi-core technology. Providing all the bandwidth you need
for next-generation highly-threaded applications, the latest four-core
Intel Core 2 Quad proce
Forgive the newbie question, I want to select random rows from my
data.frame to create a test set (which I can do) but then I want to
create a training set using whats left over.
Example code:
acc <- read.table("accOUT.txt", header=T, sep = ",", row.names=1)
#select 400 random rows in data
trai
Introducing the Intel® Core™2 Quad processor for desktop PCs, designed
to handle massive compute and visualization workloads enabled by
powerful multi-core technology. Providing all the bandwidth you need
for next-generation highly-threaded applications, the latest four-core
Intel Core 2 Quad proce
I have studied both the vinguette and other material I've been able to get my
hands on and Im starting to get a better understanding. And I'm defenitly
going to buy Petris, Petrone, and Campagnoli (2009) Dynamic Linear Models
with R. But that's not publish yet so I 'm not getting much help there.
On Thu, 14 May 2009 12:32:18 -0700 (PDT) PDXRugger
wrote:
P>
P> Alright, i am unsure of the posting rules for these types of
P> questions but i will be as help ful as possible. My windows based
P> system cant handle a model i am running so i am trying to install R
Why? To many data?
P> on our
1. Might you look again at section "2. Maximum likelihood
estimation" of the "dlm" vignette? It describes how to estimate
parameters.
2. Have you started with the code on those 2 pages, confirming
that you can make that work and understand what it does? If yes, then
try to
Hi
I am trying to create a loop which averages replicates in my data.
The original data has many rows. and consists of 40 column zz[,2:41] plus row
headings in zz[,1]
I am trying to average each set of values (i.e. zz[1,2:3] averaged and placed
in average_value[1,2] and so on.
below is my script
hi everyone, wondering if you could help me with a novice problem. I have a
data frame called subjects with a height and weight variable and want to
calculate a bmi variable from the two. i have tried:
attach(subjects)
bmi <- (weight)/((height/100)^2)
but it comes up with the error:
Warning me
Dear all
please ,I need to write a function in R to estimate the parameters of negative
binomial distribution and then calculate the loglikelihood amount for given
data.Is there any one to help me.
thank you very much for any help
Best regards
[[alternative HTML version deleted
Thanks Jorge,
but I still don't understand where they come from. when I use:
fitdistr(mydata, "t", df = 9) and get values for m and s, and the variance
of my data should be the df/s?
I jsut want to be able to confirm how m and s are calculated
mydt <- function(x, m, s, df) dt((x-m)/s, df)/s
f
Dear Kushantha,
Thank you very much.
Very nice, indeed.
Gabor
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
Note that the single split sample technique is not competitive with
other approaches unless the sample size exceeds around 20,000.
Frank
Chris Arthur wrote:
Forgive the newbie question, I want to select random rows from my
data.frame to create a test set (which I can do) but then I want to
c
as.numeric() doesn't convert factors to the explicit value, nor should
it. Under what you're expecting, ff you have a factor where the levels
are "Female" and "Male", using as.numeric() wouldn't produce anything
meaningful.
However, as.numeric() does something much smarter. It converts "Female"
Hi everyone, can anyone tell me how i can change how i display mean(age), i
want it to say The mean age of patients within the sample is mean(age)
--
View this message in context:
http://www.nabble.com/displaying-results-tp23558890p23558890.html
Sent from the R help mailing list archive at Nabbl
On Fri, 15 May 2009 19:17:37 +1000 Kon Knafelman
wrote:
KK> I hve the same problem as the initial one, except i need 1000
KK> samples of size 15, and my distribution is Exp(1). I've adjusted
KK> some of the loop formulas for my n=15, but im unsure how to proceed
KK> in the quickest way.
KK> Ca
M <- (structure(list(date = structure(c(13634, 13665, 13695, 13726,
13757, 13787, 13818, 13848, 13879, 13910, 13939, 13970, 14000,
14031, 14061, 14092, 14123, 14153, 14184, 14214, 14245, 14276,
14304, 14335), class = "Date"), cospi = c(1987.31, 2033.37, 2140.13,
2120.66, 2427.09, 2917.7, 2915.28, 3
Read the posting guide please. Self-contained, minimal, reproducible code.
On Fri, May 15, 2009 at 8:33 AM, deanj2k wrote:
>
> Hi everyone, can anyone tell me how i can change how i display mean(age), i
> want it to say The mean age of patients within the sample is mean(age)
> --
> View this mes
Read about glm by typing
?glm
There are tons of books and pdfs out there to show you the basics.
http://cran.r-project.org/other-docs.html
HTH, Si.
- Original Message -
From: "H Z"
To:
Sent: Friday, May 15, 2009 12:26 PM
Subject: [R] need help
Dear all
please ,I need to write
Here's one possibility:
idx <- sample(nrow(acc))
training <- acc[idx[1:400], ]
testset <- acc[-idx[1:400], ]
Andy
From: Chris Arthur
>
> Forgive the newbie question, I want to select random rows from my
> data.frame to create a test set (which I can do) but then I want to
> create a training
Dear list members,
I was out of town when this message arrived and so didn't respond at the
time. I did respond to a private email from the poster.
Yes, the scatter3d() function in the Rcmdr package can identify points in 3D
scatterplots drawn with rgl via the identify3d() function in the same
pa
Absolutely no idea what you mean,
Try reconstructing your question in concise English with reproducible code.
Simon.
- Original Message -
From: "deanj2k"
To:
Sent: Friday, May 15, 2009 1:33 PM
Subject: [R] displaying results
Hi everyone, can anyone tell me how i can change how
Dear H Z,
Take a look at the examples in
require(MASS)
?glm.nb
This might be useful as well
summary(glm.nb(yourvariable ~ 1, data = yourdata))
HTH,
Jorge
On Fri, May 15, 2009 at 7:26 AM, H Z wrote:
> Dear all
> please ,I need to write a function in R to estimate the parameters of
> negativ
--- On Fri, 15/5/09, Amit Patel wrote:
> From: Amit Patel
> Subject: Help with loops
> To: r-help@r-project.org
> Date: Friday, 15 May, 2009, 12:17 PM
> Hi
> I am trying to create a loop which averages replicates in
> my data.
> The original data has many rows. and consists of 40 column
> zz[
On May 15, 2009, at 6:57 AM, deanj2k wrote:
hi everyone, wondering if you could help me with a novice problem.
I have a
data frame called subjects with a height and weight variable and
want to
calculate a bmi variable from the two. i have tried:
attach(subjects)
bmi <- (weight)/((height
Duncan Murdoch wrote:
1) can you tell me what my original set.seed() value was? (I wouldn't
be able to figure it out, but maybe someone can)
The only way I know is to test all 2^32 possible values of the seed. I
think cryptographers would know faster ways.
Well, I'm not a cryptographer, bu
Hi:
I very recently started experimenting with R and am occasionally
running into very basic problems that I can't seem to solve. If there
is an R-newbies forum that is more appropriate for these kinds of
questions, please direct me to it.
I'd like to automatically add vectors to a dataframe. I a
On 5/15/2009 8:33 AM, deanj2k wrote:
Hi everyone, can anyone tell me how i can change how i display mean(age), i
want it to say The mean age of patients within the sample is mean(age)
I think you want something like this:
cat(sprintf("The mean age of patients within the sample is %.1f.\n",
me
Hi,
You can either parse and eval the string you are making, as in:
eval( parse( text = paste("avg_",colname, " <- 0;", sep='') ) )
Or you can do something like this:
df[[ paste( "avg_", colname, sep = "" ) ]] <- 0
Romain
Philipp Schmidt wrote:
Hi:
I very recently started experimenting wi
Duncan Murdoch wrote:
> On 5/15/2009 8:33 AM, deanj2k wrote:
>> Hi everyone, can anyone tell me how i can change how i display
>> mean(age), i
>> want it to say The mean age of patients within the sample is mean(age)
>
> I think you want something like this:
>
> cat(sprintf("The mean age of patient
Hi,
We are working on R project with the latest version 2.9.0. We are using matplot
and barplot functions to draw different graphs. End user may generate graphs
for large number of data. Also, each point to be plotted may have large name
(around 170 characters). These names (Y axis points) need
Hi everyone,
I have a problem with adding points to scatter plots.
The plot is drawn with the scatterplot() function from the car library:
scatterplot(data[,2] ~ data[,1],
data=data,smooth=F,reg.line=F,xlim=c(0.5,1),ylim=c(0.5,1),ylab="ML",xlab="Freq",cex.lab=1.9,cex.axis=1.8)
after that, I draw
Dear all
I was trying to install the package ISwR and got the following message. I was
connected to the internet.
Warning: unable to access index for repository
http://cms.unipune.ernet.in/computing/cran/bin/windows/contrib/2.8
Please help.
regards
M.
__
On 5/15/2009 11:04 AM, meenus...@gmail.com wrote:
Dear all
I was trying to install the package ISwR and got the following message. I was
connected to the internet.
Warning: unable to access index for repository
http://cms.unipune.ernet.in/computing/cran/bin/windows/contrib/2.8
That's a proble
On May 15, 2009, at 9:04 AM, Duncan Murdoch wrote:
On 5/15/2009 11:04 AM, meenus...@gmail.com wrote:
Dear all
I was trying to install the package ISwR and got the following
message. I was connected to the internet.
Warning: unable to access index for repository
http://cms.unipune.ernet.in/co
I'm not quite sure what you want to do, but this might help:
d=data.frame(replicate(40, rnorm(20)))
d$sample=rep(c('a','b','c','d'),each=5)
lib(doBy)
summaryBy(.~sample,da=d)
David Freedman
Amit Patel-7 wrote:
>
>
> Hi
> I am trying to create a loop which averages replicates in my data.
> The
On Fri, 15 May 2009 15:43:33 +0200 Peter Menzel
wrote:
PM> scatterplot(data[,2] ~ data[,1],
PM>
data=data,smooth=F,reg.line=F,xlim=c(0.5,1),ylim=c(0.5,1),ylab="ML",xlab="Freq",cex.lab=1.9,cex.axis=1.8)
Side remark: you don't need do data[,2] if you have specified data=data
as you did. So var1~v
>> Forgive the newbie question, I want to select random rows from my
>> data.frame to create a test set (which I can do) but then I want to
>> create a training set using whats left over.
>>
The caret package has a function, createDataPartition, that does the
split taking into account the distribu
Hi Deepayan,
Thank you very much for the tip. After removing the 'more' argument and
another couple of hours, I finally found something that works for my
multi-page multi-graph plots. For documentation, the script is:
library(lattice)
library(grid)
foo <- data.frame(x=1:10,y=1:10)
# Defines so
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("%", "\%", temp1, fixed=TRUE)
[1] "mean" "sd" "0%" "25%" "50%" "75%" "100%"
Warning m
Hi.
I am trying to model data on movements (direction) of birds and the
response variables are compass directions (0 to 360).
I have found two packages CircStats and Circular that can implement
linear models for a circular response, which will do what I need for
the data set I am currently wor
On May 15, 2009, at 9:46 AM, Liviu Andronic wrote:
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("%", "\%", temp1, fixed=TRUE)
[1] "mean
The original problem posed was:
On 14/05/2009 7:31 AM, Graves, Gregory wrote:
> I have 3 columns: flow, month, and monthname, where month is 1-12,
and
> monthname is name of month. I can't get the plot to replace the 1-12
> with monthname using ticks.lab. What am I doing wrong?
>
> plot(flow
On Fri, May 15, 2009 at 3:38 PM, Romain Francois
wrote:
> Hi,
>
> You can either parse and eval the string you are making, as in:
>
> eval( parse( text = paste("avg_",colname, " <- 0;", sep='') ) )
>
>
> Or you can do something like this:
>
> df[[ paste( "avg_", colname, sep = "" ) ]] <- 0
>
Than
Thanks all for the prompt responses. Now Hmisc::latex() no longer
generates errors on Rcmdr::numSummary() objects (with `tempa' below
being such an object).
> colnames(tempa$table) <- gsub("%", "\\%", colnames(tempa$table), fixed=TRUE)
> latex(tempa$table, cdec=3)
Best regards,
Liviu
On Fri, May
Peter Menzel wrote:
> Hi everyone,
>
> I have a problem with adding points to scatter plots.
> The plot is drawn with the scatterplot() function from the car library:
>
> scatterplot(data[,2] ~ data[,1],
> data=data,smooth=F,reg.line=F,xlim=c(0.5,1),ylim=c(0.5,1),ylab="ML",xlab="Freq",cex.lab=1.9
Dear Amit,
The following should get you started. What I'm doing is creating an
identifiers (g) with the "names" of the columns you want to group for and
then use a combination of apply() and tapply() to get the mean for each row
in the levels of g. In your case, you have more columns than I have in
On Wed, May 13, 2009 at 5:21 PM, wrote:
>
> Hello.
>
> I am trying to optimize a set of parameters using /optim/ in which the
> actual function to be minimized contains matrix multiplication and is of
> the form:
>
> SUM ((A%*%X - B)^2)
>
> where A is a matrix and X and B are vectors, with X as p
I would like to preform a t.test to each of the measured variables
(sand.silt etc.) with a mean and sd for each of the treatments (up or
down), and out put this as a table I am having a hard time
starting- maybe it is to close to lunch. Any suggestions would be
greatly appreciated.
Stephen S
Dear everyone,
My question involves the use of the survival object.
We can have
Surv(time,time2,event, type=, origin = 0)
(1)
As detailed on p.65 of:
http://cran.r-project.org/web/packages/survival/survival.pdf
My data (used in my study) is 'right ce
On 15-May-09 14:46:27, Liviu Andronic wrote:
> 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("%", "\%", temp1, fixed=TRUE)
> [1] "m
Hello,
I saw this nice trick I want to replicate but I lost the source and I hope
one of you can point me to the solution. My problem is that I don't know
the correct words to query this.
When I print to screen a matrix or data.frame the columns are split and
printed below the previous ones; eve
Hello,
I am using: save(data,file="D:/mayData.RData"), and I have the following error:
Error in save(data, file = "D:/mayData.RData") : error writing to connection
Thank you very much in advance,
Stefo
[[alternative HTML version deleted]]
Hi
I'm trying to write a generic script for processing some data which finishes
off with some plots. Given Im never sure how many columns will be in my
dataframe I wanted to using the following
plot(spectra.wavelength, cormat, type = "l", ylim=c(-1,1), xlab="Wavelength
(nm)", ylab="Correlation"
Hello everyone,
(This is my second question posted today on the R list).
I am carrying out a competing risks analysis using the cuminc function...this
takes the form:
cuminc(ftime,fstatus,group)
In my study, fstatus has 3 different causes of failure (1,2,3) there are also
censored cases (0).
On Thu, May 14, 2009 at 3:36 PM, G. Jay Kerns wrote:
> set.seed(something)
> x <- rnorm(100)
> y <- runif(500)
> # bunch of other stuff
...
> 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.imag
Hi
I'm trying to write a generic script for processing some data which finishes
off with some plots. Given Im never sure how many columns will be in my
dataframe I wanted to using the following
plot(spectra.wavelength, cormat, type = "l", ylim=c(-1,1), xlab="Wavelength
(nm)", ylab="Correlation"
Another possibility (maybe more readable, gives the option of a list, probably
not faster):
Replicate(1000, rexp(15,1) )
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-proj
Marc Schwartz wrote:
>
> On May 15, 2009, at 9:46 AM, Liviu Andronic wrote:
>
>> 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
Dear Avraham:
For problems with many parameters to estimate, I highly recommend
Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus
(Springer). This book includes numerous examples showing how to use the
"nlme" package. The value of this book is greatly enhanced by the
Greg Snow wrote:
> Another possibility (maybe more readable, gives the option of a list,
> probably not faster):
>
> Replicate(1000, rexp(15,1) )
>
I think that should be "replicate"
The matrix form is quite a bit faster, but don't know if that will
matter -- times below are for doing this
Dear Doug, et al.:
What would you recommend for analyzing a longitudinal abundance
survey of 22 species, when the species were not selected at random? A
prominent scientist tried to tell me that mixed-effects modeling is
inappropriate in that case because the species were selected
pur
> "AC" == Adrián Cortés
> on Fri, 15 May 2009 08:58:04 -0700 writes:
AC> Hello,
AC> I saw this nice trick I want to replicate but I lost the source and I
hope
AC> one of you can point me to the solution. My problem is that I don't
know
AC> the correct words to query
On May 15, 2009, at 10:58 AM, Adrián Cortés wrote:
Hello,
I saw this nice trick I want to replicate but I lost the source and
I hope
one of you can point me to the solution. My problem is that I don't
know
the correct words to query this.
When I print to screen a matrix or data.frame the
Thank you both very much for your replies. What makes this a little less
straightforward, at least to me, is that there needs to be constraints on
the solved parameters. They most certainly need to be positive and there
may be an upper limit as well. The true best linear fit would have negative
en
On May 15, 2009, at 8:22 AM, Stefo Ratino wrote:
Hello,
I am using: save(data,file="D:/mayData.RData"), and I have the
following error:
Error in save(data, file = "D:/mayData.RData") : error writing to
connection
Thank you very much in advance,
Stefo
Presuming that drive 'D' exists an
On 5/15/2009 9:22 AM, Stefo Ratino wrote:
Hello,
I am using: save(data,file="D:/mayData.RData"), and I have the following error:
Error in save(data, file = "D:/mayData.RData") : error writing to connection
Do you have permission to create a file there? Try it from outside R.
Duncan Murdoc
Thanks for Peter, William, and Hadley's helps.
Your codes are much more concise than mine. :P
Both William and Hadley's comments are the same. Here are their codes.
f <- function(dataMatrix) rowMeans(datamatrix=="02")
And Peter's codes are the following.
apply(yourMatrix, 1, f
I wrote "replicate" but the darn e-mail program "fixed" it for me. I expected
replicate to be a bit slower, but not by that amount. I just wanted to include
replicate as a more readable version of lapply while still improving over the
loop approach.
--
Gregory (Greg) L. Snow Ph.D.
Statistica
On 5/15/2009 12:43 PM, christophe dutang wrote:
Hi,
I would like to draw arrows in a classic 2D plot. Which package should I
use? is there R base functions that do job?
On google, I could not find any useful discussion about this topic, except a
link to the function 'grid.arrows' of the grid pa
Hi,
I would like to draw arrows in a classic 2D plot. Which package should I
use? is there R base functions that do job?
On google, I could not find any useful discussion about this topic, except a
link to the function 'grid.arrows' of the grid package.
My problem is I would like to draw arrows
>
> Set.seed takes an integer argument, that is, 2^32-1 distinct values
> (cf NA_integer_), so the very simplest approach, brute-force search,
> has a hope of working:
>
> whatseed <- function (v) {
> i <- as.integer(-2^31+1); max <- as.integer(2^31-1)
> while (i }
>
>> (OK, being able to figu
I would like to know about any workshops/meetings on the topics of (1) using
some version of BUGS with R (2) resampling methods (3) other advanced
courses.
Thanks for any ideas.
Kevin Wright
[[alternative HTML version deleted]]
__
R-help@r-pro
Hi William,
Thanks for the comments and explanation.
It is really good to know the details of rowMeans.
I did modified Peter's codes from length(x[x=="02"]) to sum(x=="02"), though it
improved only in few seconds. :)
Best,
Mike
-Original Message-
From: William Dunlap [mailto:wdun...@tib
Hello,
I am using barplot to generate a histogram of population by county. I
need to plot the bars for about 35 counties, and would like to rotate
the county name labels on the x-axis to a vertical orientation so that I
can fit them all. An example of my syntax is below:
r.barplot(x,main=main,
xl
On May 15, 2009, at 12:18 PM, Bill Hudspeth wrote:
Hello,
I am using barplot to generate a histogram of population by county. I
need to plot the bars for about 35 counties, and would like to rotate
the county name labels on the x-axis to a vertical orientation so
that I
can fit them all. An
The arrow "<-" is used to assign a value to a variable, the equals sign "=" is
used to specify the value for a function argument. Recent versions of R allow
"=" to be used for "<-" at the top level and certain circumstances which some
people find more convenient, but can also lead to confusion
Greg Snow wrote:
> Another possibility (maybe more readable, gives the option of a list,
> probably not faster):
>
> Replicate(1000, rexp(15,1) )
>
>
provided that simplify=FALSE:
is(replicate(10, rexp(15, 1)))
# "matrix" ...
is(replicate(10, rexp(15, 1), simplify=FALSE))
# "
Duncan mentioned the arrows function, which may do everything you want. But,
also look at the my.symbols function in the TeachingDemos package for another
way to draw arrows, or to draw your circles and arrows in 1 step.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Hea
I suggest you try to translate your constraints into an
unconstrained constrained problem using logarithms, then do "nonlinear
mixed effects modeling" as described in chapters 6-8 of Pinheiro and
Bates (2000). To do this, I would first start with the simpler linear
estimation problem to g
Thanks, I'll take a look.
Christophe
Le 15 mai 09 à 20:11, Greg Snow a écrit :
> Duncan mentioned the arrows function, which may do everything you
> want. But, also look at the my.symbols function in the
> TeachingDemos package for another way to draw arrows, or to draw
> your circles and
G. Jay Kerns wrote:
I want it to be *difficult* for students to figure out the seed and
automatically generate solutions on their own.
Hmmm Would it really be a bad thing if someone reverse engineered
this to generate answers given the problem set? If it's hard enough to
do that, it'd b
Thanks guys!
Duncan's hints regarding "character" (which I was naturally using ;0) and
the double "readBin" solved my problem - I'm extracting an index from a
REALLY big XML file to get fast direct access to subsections, so that I only
have to parse them rather than the whole thing (only SAX-st
cls59 wrote:
>
> install.packages('pgfSweave',repos='http://www.rforge.net')
>
For others that are not on Linux. I would suggest using the r-forge site for
binary installation. The binaries on rforge.net are not completely up to
date in some cases.
install.packages("pgfSweave", repos="http:/
Hi,
I think "quadratic programming" is the way to go. Look at "solve.QP" or
"limSolve" package.
Here is a toy example that I had worked out some time back for a linear
least squares problem with simple box constraints:
# Problem: minimize ||Ax - y||, subject to low <= x <= upp
require(limSolve
On Fri, May 15, 2009 at 12:07 PM, Stavros Macrakis
wrote:
> system.time(whatseed(runif(1)))
Sorry, though I got lucky and my overall result is roughly correct,
this is an incorrect time measure. It should be
r <- runif(1); system.time(whatseed(r))
because R's call-by-need semantics don't e
On 15 May 2009 at 13:08, G. Jay Kerns wrote:
| Thanks very much to Warren and Stavros for their additional insight.
| Putting all of this together, I think I am now ready to formulate my
| question intelligently:
|
| Using Sweave, I want to distribute randomly generated problems AND
| answers to
How can I convert an integer or double to and from their internal
representation as raws of length 4 and 8?
The following works for positive integers (including those represented
as floats):
# Convert integer (represented as integer or double) to sequence
# of raw bytes, least-significant byte fi
Dear all,
I have some problems how to increase memory in R.
I tried to start R by calling e.g. :(in the Properties, Shortcut tab, Target
field)
Rgui.exe --max-mem-size=2Gb (Is this correct?)
But the error message still continue:
> X<-princomp(MAT2D.AltGeop61.90)
Error: cannot allocate vect
1 - 100 of 112 matches
Mail list logo