similar to: listing a sequence of vectors in a matrix

Displaying 20 results from an estimated 10000 matches similar to: "listing a sequence of vectors in a matrix"

2006 Aug 11
2
Colour-coding intervals on a line
Hi, This is a simple version of something that I am trying to do. If I can sort the problem basically, I figure I should be able to sort it for the program I'm writing (which would take longer to explain). I need to know if there is any way of using different colours for different intervals of a line on a graph. Eg. If I plot the line y=x for x=1:10, and split this line into 106 intervals
2013 Oct 11
3
matrix values linked to vector index
Hi, In the example you showed: m1<- matrix(0,length(vec),max(vec)) 1*!upper.tri(m1) #or ?m1[!upper.tri(m1)] <-? rep(rep(1,length(vec)),vec) #But, in a case like below, perhaps: vec1<- c(3,4,5) ?m2<- matrix(0,length(vec1),max(vec1)) ?indx <- cbind(rep(seq_along(vec1),vec1),unlist(tapply(vec1,list(vec1),FUN=seq),use.names=FALSE)) m2[indx]<- 1 ?m2 #???? [,1] [,2] [,3] [,4] [,5]
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
2012 Sep 11
2
.NAME in .Fortran
Hi all I've been getting some emails from the R package maintainers that I need to update some code in a CRAN packge that uses FORTRAN, to comply with (not so recent) changes. I've been a little busy... I'm having trouble adjusting my code. I hope someone can help. The package was working fine, and a few R functions in my package had lines like this: tmp <- .Fortran(
2008 Nov 20
1
different ACF results
Dear all, I have one Model (M3) fitted using the lme package, and I have checked the correlation structure of within-group errors using plot(ACF (M3,maxLag=10),alpha=0.05) But now I am not sure how to interpret this plot for the empirical autocorrelation function. The problem is that I am used to see/interpret diagrams in which all the autocorrelation Lags, except lag-1, are inside the
2013 Nov 03
0
[LLVMdev] loop vectorizer issue
Hi Sarah, the loop vectorizer runs not on the C code but on LLVM IR this c code was lowered to. Before the loop vectorizer runs many other optimization change the shape of this IR. You can see in the LLVM IR you referenced below, a preceding LLVM IR transformation has change your loop from: > for(int k=20;k<50;k++) > dataY[k] = dataY[k-1]; to > int a = d[19]; >
2013 Nov 03
3
[LLVMdev] loop vectorizer issue
Actually what I meant in my original loop, that there is a dependency between every two consecutive iterations. So, how the loop vectorizer says 'we can vectorize this loop'? for(int k=20;k<50;k++) dataY[k] = dataY[k-1]; From: Henrique Santos [mailto:henrique.nazare.santos at gmail.com] Sent: Sunday, November 03, 2013 4:28 PM To: Sara Elshobaky Cc: <llvmdev at
2018 Oct 16
4
Problema de memoria de R
Buenas tardes, Solicito por favor ayuda con este error: Error: OutOfMemoryError (Java): Java heap space Estoy trabajando con matrices de grandes dimensiones y el programa no logra completarse porque dice le falta memoria. Gracias [unnamed] Sara Suarez Zapata Estudiante en práctica - Unidad Gestion Bolsa de Energia. Tel: (574) 380 61 18 Correo: sara.suarez en
2013 Nov 03
0
[LLVMdev] loop vectorizer issue
Notice that the code you provided, for globals and stack allocations, at least, is semantically equivalent to: int a = d[19]; for(int k = 20; k < 50; k++) dataY[k] = a; Like so, the load you see missing was redundant, probably hoisted by GVN/PRE and replaced with "%.pre". H. On Sun, Nov 3, 2013 at 11:26 AM, Sara Elshobaky <sara.elshobaky at gmail.com>wrote: >
2009 Sep 01
2
cbind objects using character vectors
Dear list, I have a character vector such vec.names<- c("a", "b") It happens that I have also two R objects called "a" and "b" that I would like to merge. Is it possible to do something like cbind(vec.names[1], vec.names[2]) ending up with the same result as cbind(a,b) Bellow is a reproducible example of what I need to to: dat<-
2011 Jul 27
2
Placing brackets around the values in a data frame
Lets say I have the following data frame. df = data.frame(word = c("David", "James", "Sara", "Jamie", "Jon")) df I was trying to place brackets , [ ] , around each string. I'll be exporting it with write.table and quotes=FALSE, so it will eventually look like: [David] [James] [Sara] .... Can anyone help with this task? I'd like to
2013 Oct 07
1
[LLVMdev] llvm jit
So, what is the use of the profile passes in LLVM? Also, does llvm detect hot blocks of code for recompilation? On Mon, Oct 7, 2013 at 4:44 PM, Amara Emerson <amara.emerson at arm.com> wrote: > No, the JIT does not do any profile guided optimizations for any > architecture. It just uses the static compilation components before loading > the object into memory and running its own
2006 Feb 08
2
Reference for R
Hello! Could anyone please tell me how should I include R in a text section for References? Regards, Sara Mouro [[alternative HTML version deleted]]
2006 Apr 04
1
Indexing a vector by a list of vectors
Hello R-help - I have vec <- c("string1", "string2", "string3") ind <- list(c(1,2),c(1,2,3)) I want "vec" indexed by each vector in the list "ind". The first element of the list I want would be vec[c(1,2)], the second element would be vec[c(1,2,3)], like the following. [[1]] [1] "string1" "string2" [[2]] [1]
2007 Mar 13
4
selecting rows with more than x occurrences in a given column (data type is names)
Despite a long search on the archives, I couldn't find how to do this. Thanks in advance for what is likely a simple issue. I have a data set where the first column is name (i.e., 'Joe Smith', 'Jane Doe', etc). The following columns are data associated with that person. I have many people with multiple rows. What I want is to get a new data frame out with only the people who
2011 May 12
3
lm and anova
Hi! We have run a linear regression model with 3 explanatory variables and get the output below. Does anyone know what type of test the anova model below does and why we get so different result in terms of significant variables by the two tables? Thanks! /Sara > summary(model) Call: lm(formula = log(HOBU) ~ Vole1 + Volelag + Year) Residuals: Min 1Q Median 3Q Max
2009 Dec 11
4
extracting vectors from lists of lists
Good evening I often have as output from simulations a list of various values, vectors and matrices. Supposing that I then run said simulation several times, I often want to extract a particular result from each simulation for plotting and, ideally, put it in a matrix. A simple example v1 <- 1:5 v2 <- 6:10 other1 <- "stuff" other2 <- "stuff" set1 <-
2013 Oct 04
1
[LLVMdev] Runtime optimizer
Hello, Please, I need more information on the runtime optimizer used in the LLVM JIT. - Where can I find it in the LLVM source code? - Are those runtime optimizations done on the LLVM representation code or on the machine code? Sara -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Aug 11
2
create file with unique names
Hei, is it possible to create from R a series of files with unique(random) names? I have tryed with file.create and dir.create but did not manage to do it. Thanks a lot for help Sara [[alternative HTML version deleted]]
2011 Mar 15
2
graph lines don;t appear
Hi I am trying to plot two simple graphs with a grid in background. The axis and grid appears in correct position, but the actual data are not there.... Can somebody provide me a hint what is missing? The code is: pln <- read.table(file="PLN.txt", header=TRUE, dec=",") par(mfrow=c(1,2)) plot(pln[,1], type="l", lwd="2", ylab="EUR/PLN",