similar to: differences between 1.7 and 1.7.1 glmnet versions

Displaying 17 results from an estimated 17 matches similar to: "differences between 1.7 and 1.7.1 glmnet versions"

2010 Aug 03
4
Need help on upper.tri()
HI, I am really messing up to make a symmetrical matrix using upper.tri() & lower.tri() function. Here is my code:   > set.seed(1) > mat = matrix(rnorm(25), 5, 5) > mat            [,1]       [,2]       [,3]        [,4]        [,5] [1,] -0.6264538 -0.8204684  1.5117812 -0.04493361  0.91897737 [2,]  0.1836433  0.4874291  0.3898432 -0.01619026  0.78213630 [3,] -0.8356286  0.7383247
2009 Jun 22
2
Help on creating a sequence of vectors
I want to create a number of vectors like : vec1 <- rnorm(1) vec2 <- rnorm(2) vec3 <- rnorm(3) and so on........... Here I tried following : for (i in 1:10) paste("vec", i, sep="") <- rnorm(i) However obviously that is not working. Here vectors I need to be seperated i.e I do not want to create a "list". How to modify above code? -- View this
2011 Feb 02
0
How column names/row names are preserved in matrix calculation?
Can somebody tell me that, if I do some arithmetic calculation over 2 matrices then how the column names and row names are preserved? It seems that, for multiplication, column names and row names of the 2nd matrix are preserved and for additional, there seems not having any explicit rule: > set.seed(1) > dat1 <- matrix(rnorm(25), 5); colnames(dat1) = rownames(dat1) =
2011 Jan 17
3
to append a column to a data frame, has I use loop/if in my case?
days=Sys.Date()-1:70 price=abs(rnorm(70)) regular=rep(c(0,0,0,0,1,0,1,0,0,1),c(7,7,7,7,7,7,7,7,7,7)) y=data.frame(cbind(days,price,regular)) y is like days price regular 1 14990 0.16149463 0 2 14989 1.69519358 0 3 14988 1.57821998 0 4 14987 0.47614311 0 5 14986 0.87016180 0 6 14985 2.55679229 0 7 14984 0.89753533 0 the output I want:
2007 May 28
1
where did the factor name go
> tmp <- data.frame(y=rnorm(12), a=factor(rep(letters[1:4],3))) > tmp y a 1 -0.60866099 a 2 0.55500538 b 3 0.12231693 c 4 -0.24613790 d 5 -0.09253593 a 6 -1.54652581 b 7 0.17204210 c 8 -1.22778942 d 9 1.22151194 a 10 -0.43982577 b 11 -1.25444287 c 12 -0.97251060 d > tmp.aov <- aov(y ~ a, data=tmp) > summary(tmp.aov) Df Sum Sq Mean Sq F value
2006 Oct 02
1
CCF and ACF
Dear all, given two numeric vectors x and y, the ACF(x) at lag k is cor(x(t),x(t+k)) while the CCF(x,y) at lag k is cor(x(t),y(t-k)). See below for a simple example. > set.seed(1) > x <- rnorm(10) > y <- rnorm(10) > x [1] -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078 -0.8204684 0.4874291 0.7383247 0.5757814 -0.3053884 > y [1] 1.51178117 0.38984324
2011 Jan 25
1
NA printing
Hi. I'm writing a print method for an object that includes a numeric matrix for which the lower diagonal elements are not meaningful. So I make the lower diagonal of my matrix NA and print it. But my co-author does not like NA there and wants a dash. I have tried coercing the matrix to character, essentially by M[is.na(M)] <- "-" but this interferes with the pleasing column
2010 Sep 03
2
Matrix to list
Dear all, suppose I have following matrix:   > mat <- matrix(rnorm(25), 5) > > mat             [,1]       [,2]        [,3]       [,4]       [,5] [1,]  0.97056228 -1.3278509 -0.73511792  2.1650629 -0.4411997 [2,]  0.58613700 -0.2559899 -1.18334248 -1.4990907  1.8138846 [3,] -1.03333313  2.0227887  0.89622681  0.6483973 -1.5523283 [4,]  0.38968833  0.2490004 -0.02301061 -0.2705150
2009 Jul 28
2
Check functions in package
Hi, I run R on a server via SSH, over a terminal. After loading a specific package, how do I know what functions are in that package? Is there any way to list or display them? tia. -- View this message in context: http://www.nabble.com/Check-functions-in-package-tp24707084p24707084.html Sent from the R help mailing list archive at Nabble.com.
2011 Dec 13
0
bug in glmnet 1.7.1 for multinomal when alpha=0?
Dear all, If I am not mistaken, I think that I have found a bug in glmnet 1.7.1 (latest version) for multinomial when alpha=0. Here is the code > library(glmnet) Loading required package: Matrix Loading required package: lattice Loaded glmnet 1.7.1 > x=matrix(rnorm(40*500),40,500) > g4=sample(1:7,40,replace=TRUE) > fit=glmnet(x,g4,family="multinomial",alpha=0) >
2009 Jul 15
0
strategy to iterate over repeated measures/longitudinal data
Hi Group, Create some example data. set.seed(1) wide_data <- data.frame( id=c(1:10), predictor1 = sample(c("a","b"),10,replace=TRUE), predictor2 = sample(c("a","b"),10,replace=TRUE), predictor3 = sample(c("a","b"),10,replace=TRUE), measurement1=rnorm(10), measurement2=rnorm(10)) head(wide_data) id
2008 Jul 22
2
How to....
Hi everyone, I am not new to R, but its been over a year since I've used it, so I don't remember how to do some things. I have a data set (in excel currently, but will be converted to text), that has date, country and price, with a price for every country for every date. I need to find the mean and median of the interval between price changes for each country and the mean and median
2011 Jul 08
2
Selecting subset of a given vector
Hi there, given a numeric vector, I can select numbers within a specific range. However presently, I have something related but different problem. Suppose I have a numeric vector. Now take an arbitrary number. Goal to to chose a specific subset with a given length, from that given vector, so that those chosen numbers are centered around that given constant. Here is one example: ### My original
2017 Sep 25
0
Fw: passing different sample sizes
Your code is full of syntactic errors. What do you think 1.71(se) means? After you clean up your code, something like this might be what you want: out <- lapply(seq(40,500,by = 25), f) To get plots, just stick in a plot statement after you define m and d. Have you gone through any R tutorials? You seem to be confused about basics that tutorials could help you with. This list is not meant
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2008 Jul 26
1
Marking Interval Length
Hi everyone, I'm trying to break down data into intervals because I need to analyze data according to the intervals between each change in value. What I have done is merged the attached data files, and filled in the missing values this way: > fmt<-"%m/%d/%y" > dd<-read.csv("Desktop/R/CDSdate.txt") > dd$Date<-as.Date(dd$Date, fmt) >library(zoo)