On 20 Feb 2014, at 06:07 , IZHAK shabsogh wrote:
> please, how can i generate ten different estimated parameter with multiple y,
> response from the following response.
You did. You're just only printing the last one... (sapply(list, coef) to
extract the coefficients in matrix form, if that's
how do i use set.seed? for example i want to generate fix x with different
value of y each time i.e
genarate x<-rnorm(10)
generate y<-rnorm(10)
i want have x fix but y changes at each iteration. this what i try but is not
working
{
set.seed(100)
x<-10*runif(10)
}
x
set.seed(y<-rnorm(10))
y
Thanks a lot, it works perfectly!
f.
--
Francesca Pancotto
Università degli Studi di Modena e Reggio Emilia
Palazzo Dossetti - Viale Allegri, 9 - 42121 Reggio Emilia
Office: +39 0522 523264
Web: https://sites.google.com/site/francescapancotto/
---
Hello there,
I've got a netCDF file which I want to read, modify, and save, which works
well with 'ncdf4'-package.
The problem is, that the grid representing the data (temperature values) is
irregular, and I am not able to output an irregular grid. In the original
file I have two variables ('lat'
Dear all,
I’m trying to use the saveHTML() function with the svg graphics device (
ani.dev= “svg”) in order to obtain animation with vector graphics.
For this device the unit is in inch, while the units for ani.height and
ani.width options seems to be in px.
As a result, something like
ani.opti
Hello,
I'm not sure I understand the question. When you use set.seed, it will
have effect in all calls to the random number generator following it. So
the value for y is also fixed.
As for your code, you don't need the second set.seed. And though it is
not syntatically incorrect, the way you a
[see at end]
On 20-Feb-2014 10:47:50 Rui Barradas wrote:
> Hello,
>
> I'm not sure I understand the question. When you use set.seed, it will
> have effect in all calls to the random number generator following it. So
> the value for y is also fixed.
> As for your code, you don't need the second s
On 20/02/2014 12:00, (Ted Harding) wrote:> [see at end]
>
> It seems clear that Izhak seeks to detach the random generation of y
> from the random generation of x after using set.seed(). On my reading of
>?RNG
> once set.seed has been used, as RUI says, it affects all subsequent
> calls to the
Your code produces four line graphs, one above the other. What
do you mean by drawing a contour line for the entire panel? A
contour map requires three vectors, two for the horizontal
position and one for the elevation or height. You have four
vectors of y variables with the same x. Since you do no
Hi
You probably will get more answers when you post your question to
Crossvalidated or Stackoverflow as it is more about statistics than about R.
Petr
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of PQuery
> Sent: Wednesda
I am baffled why you have gone so far down this road, Ted. Considerable effort
has gone into making prediction of value N of the RNG sequence unrelated to
value N-1 of the sequence as long as you don't know the internal state of the
RNG. This is true for both the R internal RNG and the platform-
To Whom It May Concern:
I am subscribed to this listserv, but I would like to switch my settings so
that I receive a daily batched email rather than individual messages. Is it
possible to do that, or do I need to unsubscribe and then resubscribe?
Best,
Simone Gill
[[alternative HTML ver
Hello Bart,
I solved your problem.
Please find the code given below,
dat <-structure(list(Batch = c(1L, 1L, 2L, 2L, 3L, 3L, 4L, 4L, 4L, 4L,
4L, 4L), Test =
Hi,
I'm analyzing data from an unbalanced (non-orthogonal) factorial experiment
(counts as being dependent on two nominal variables and one continuous
variable) using GLM model with quasi-Poisson distribution.
Which function (library) accounting for non-orthogonality in the data
(something like A
Dear R users,
we try to submit a package to CRAN. One of our function pbcOptim.R uses
lbfgsb.cpp which is a slight modification of optim.c. In the documentation for
pbcOptim.R we said
"The code for pbcOptim is based on that of \code{\link{optim}}. In particular,
pbcOptim calls /src/lbfgsb.cpp
Dear All,
my problem case: I want to use the apriori-function to analyze my test data.
Take a look (the data is attached).
WarenGruppe is a hierarchical higher class for Item. I analyzed with apriori()
Customer and Item but I want also to start a cross-rule-mining. That means for
example that
I'm trying to install various packages like lme4, ndl and RcppEigen but
they all fail with similar error messages:
install.packages("RcppEigen")
Installing package into '/home/matias/R/x86_64-pc-linux-gnu-library/3.0'
(as 'lib' is unspecified)
probando la URL '
http://cran.at.r-project.org/src/con
I believe this is what you should do:
* In the lbfgsb.cpp from base R, include the GPL blurb and R
copyright holders. Also add your own names. (see e.g.
https://github.com/hadley/pryr/blob/master/src/typename.cpp)
* In the DESCRIPTION, add the R core team as a contributor,
https://github.com/had
Hi,
Try:
library(stringr)
res <-
transform(dat[rep(1:nrow(dat),str_count(dat$Result,"-")+1),],Result=unlist(strsplit(as.character(dat$Result),"
- ")),Batch=ave(Batch,Batch,FUN=function(x) paste0(x,letters[seq_along(x)])))
row.names(res) <- 1:nrow(res)
# Based on the expected results, it coul
On 20.02.2014 14:45, Simone Gill-Alvarez wrote:
To Whom It May Concern:
I am subscribed to this listserv, but I would like to switch my settings so
that I receive a daily batched email rather than individual messages. Is it
possible to do that, or do I need to unsubscribe and then resubscribe?
The vector, vec, below represents a time series of the number of some
events recorded
for 208 two-week intervals from 2005/01/01 up to the end of 2012. I
want to
represent this together with the date information. I tried ts(), but
don't quite understand
how to use the start=, end= and frequ
Dear R community;
I'm kind of stuck with the following situation and would appreciate any
hint. Let's assume I have the following data frame:
dat <- data.frame(ID = c(rep("01",18), rep("02",16)), USE = c(c("001","004",
"005","007","001","004","005","007","012","001","004","005","007","001","004",
Hi,
Try:
dat$ID2 <- with(dat,ave(seq_along(USE),ID,FUN=function(x){x1 <- USE[x] =='001';
ifelse(!x1,'',cumsum(x1))}))
A.K.
On Thursday, February 20, 2014 3:31 PM, Pedro Mardones
wrote:
Dear R community;
I'm kind of stuck with the following situation and would appreciate any
hint. Let's assu
If the data are two week intervals, the frequency is 52/2 = 26
and that matches the amount of data 8*26=208:
> vec.ts <- ts(vec, start=c(2005, 1), frequency=26)
> str(vec.ts)
Time-Series [1:208] from 2005 to 2013: 1 0 0 0 1 1 1 0 2 0 ...
> print(vec.ts, calendar=TRUE)
p1 p2 p3 p4 p5 p6 p7 p8
Depending what you really want to achieve, the following may be useful or
educational:
dat$ID2x <- with( dat, ave( rep( 1, nrow( dat ) ), ID, USE, FUN=cumsum ) )
dat$ID2y <- dat$ID2x
dat$ID2y[ dat$USE != "001" ] <- NA
On Thu, 20 Feb 2014, arun wrote:
Hi,
Try:
dat$ID2 <- with(dat,ave(seq_along
Hi Michael
What about using zoo you can convert to ts if required
library(zoo)
tv <- seq(as.Date('2005/01/01'),as.Date('2013/01/01'),by=14)
zt <- zoo(vec,tv)
head(zt)
2005-01-01 2005-01-15 2005-01-29 2005-02-12 2005-02-26 2005-03-12
1 0 0 0 1
We are happy to inform you that abstract submission for
useR! 2014 is now available online, see
http://user2014.stat.ucla.edu/
The R User Conference, useR! 2014 is scheduled for July 1-3, 2014 at
the University of California, Los Angeles. Before the official
program, half-day tutorials will
Hello,
Assuming that I have a data frame
A<-data.frame(A=c(10,100,1000,30,50,60,300),
B=c(0,1,1,1,0,0,0),
C=c(0,0,0,0,1,1,0),
D=c(1,0,0,0,0,0,1))
What I would like is to introduce a new column Variable such that:
Hi,
May be this helps:
A$Variable <- rep(colnames(A[,-1]),nrow(A))[t(!!A[,-1])]
A.K.
On Thursday, February 20, 2014 5:55 PM, ioanna ioannou wrote:
Hello,
Assuming that I have a data frame
A<-data.frame(A=c(10,100,1000,30,50,60,300),
B=c(0,1,1,1,0,0,0),
Dear all,
I would like to fit some data (few samples and a much larger number of
features), using linear regression with lasso regularization.
So far I have used the packages enet and lars, that perform very well and
of which I really appreciated the easy interface.
Unfortunately, while on the maj
Also,
rownames(which(t(!!A[,-1]),arr.ind=TRUE))
A.K.
On Thursday, February 20, 2014 6:48 PM, arun wrote:
Hi,
May be this helps:
A$Variable <- rep(colnames(A[,-1]),nrow(A))[t(!!A[,-1])]
A.K.
On Thursday, February 20, 2014 5:55 PM, ioanna ioannou wrote:
Hello,
Assuming that I have a da
... and yet another approach (written for generalization)
> names(A)[-1][as.matrix(A[,-1])%*%(seq_len(ncol(A)-1))]
[1] "D" "B" "B" "B" "C" "C" "D"
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
I have a data frame of vehicle trajectories. Here's a snapshot:
>dput(head(df))structure(list(vehicle = c(2L, 2L, 2L, 2L, 2L, 2L), frame =
>43:48, globalx = c(6451214.156, 6451216.824, 6451219.616, 6451222.548,
>6451225.462, 6451228.376), class = c(2L, 2L, 2L, 2L, 2L, 2L), velocity =
Please read the Posting Guide, which offers several applicable tips, such as:
Don't post in HTML format... it tends to corrupt your code samples.
Please provide a hand-generated example result that should be what the solution
should transform your sample data into.
Please show the code that did no
Thank you so much Arun:)
On Wednesday, February 19, 2014 6:06 PM, arun wrote:
Hi Farnoosh,
Try:
library(plyr)
res <- join(`DATA-A`,`DATA-B`,by="Var1",type="right")[,c(3,1:2,4)]
head(res)
# ID Var1 Var2 var3
#1 1 AETNA CARDINAL CARE TIER 2 10
#2 2
On Feb 20, 2014, at 12:03 PM, Michael Friendly wrote:
>
> The vector, vec, below represents a time series of the number of some events
> recorded
> for 208 two-week intervals from 2005/01/01 up to the end of 2012. I want to
> represent this together with the date information. I tried ts(), bu
On 20/02/2014 15:54, Matías Guzmán Naranjo wrote:
I'm trying to install various packages like lme4, ndl and RcppEigen but
they all fail with similar error messages:
install.packages("RcppEigen")
Installing package into '/home/matias/R/x86_64-pc-linux-gnu-library/3.0'
(as 'lib' is unspecified)
pr
37 matches
Mail list logo