search for: 1,9

Displaying 20 results from an estimated 382 matches for "1,9".

Did you mean: 1,8
2004 Sep 28
5
Bug? using { as a function in lapply
This seems like a bug to me. Can someone verify this? First we define a function f that returns its second argument and lapply it to 1:2 using 9 as the second argument and all seems well. Note that "{" as a function does the same thing as f, as illustrated with f(1,9) and "{"(1,9); however, when we attempt to use "{" in the very same way we used f in lapply, we get an error message about ... being...
2011 Mar 10
3
lattice xscale.components: different ticks on top/bottom axis
...ave the same scale but different tick marks. I tried user-defined xscale.component function but it does not produce desired results. Can anybody suggest where my use of xscale.component function is incorrect? For example, the code below tries to create a plot where horizontal axes limits are c(0,10), top axis has ticks at odd integers, and bottom axis has ticks at even integers. library(lattice) df <- data.frame(x=1:10,y=1:10) xscale.components.A <- function(...,user.value=NULL) { # get default axes definition list; print user.value ans <- xscale.components.default(...) pri...
1997 Aug 22
2
R-alpha: eigen
eigen(matrix(rep(1,9),ncol=3),only.values=T) works repeatedly but eventually (after 3 or 4 goes) gave a core dump of 11mb (I think only the first answer was right). if I type gc() immediately after the first call, I get a core dump right away (this might possibly be related to my huge core dumps with nlm) eigen(ma...
2010 Mar 12
4
Getting multiple matrix-values using a single command
Dear all! I'm trying to get multiple values from a matrix by using a single command. Given a matrix A A <- matrix(seq(1,9),nrow=3,ncol=3) How can I get e.g. the values A[1,2] = 4 and A[3,3] = 9 with a single command and without using any loop? My first idea was to generate a row- and a column vector for the indices, i.e. c(1,3) indicating row number 1 (for A[1,2]) and row number 3 (for A[3,3]) and similar for...
2012 Jul 02
4
how to do a graph with tree different colors??
hi i try to do a graph of a time series which shows in red the values > -0.05, in blue the values >0.05 and in white the values between -0.05 and 0.05 for un exemple :http://www.appinsys.com/globalwarming/enso.htm thanks !!!!! denisse -- View this message in context: http://r.789695.n4.nabble.com/how-to-do-a-graph-with-tree-different-colors-tp4635206.html Sent from the R help mailing
2012 Feb 06
5
I bet apply has a solution
Hi all For the data below, I would like to return a logical value indicating differences in the data. #Create data Data..<-data.frame(a=rep(1,10),b=c(rep(1,9),2),c=c(rep(1,8),2,2)) a b c 1 1 1 1 2 1 1 1 3 1 1 1 4 1 1 1 5 1 1 1 6 1 1 1 7 1 1 1 8 1 1 1 9 1 1 2 10 1 2 2 So what I want is to return logical value telling me if all the values are the same. So the result would be a b c DidChange 1 1 1 1 FALSE 2 1 1 1 F...
2007 May 29
1
rgl.postscript
Hi, I am having an issue when creating a postscript file from RGL window. It seems to cut off some of the axis labels. Here is the code I am using. I created a 3D plot using RGL_0.71 with R 2.5 on Windows XP. z1<-c(5,4,1,4.5,2,3,2,1,1) z2<-c(6,8,7,7.5,5,3.5,4,1,1) z3<-c(3,2,4,7,3,4.5,6,2,3) x1<-seq(1,9) x2<-seq(1,9) x3<-seq(10,18) y1<-seq(8,0) y2<--1*y1 y3<-rep(0,9) m1<-cbind(x1,y1,z1) m2<-cbind(x2,y2,z2) m3<-cbind(x3,y3,z3) m3<-rbind(m2...
2007 Aug 01
1
constrOptim
Hi, I'm having trouble using the constrOptim function to generate the 9-component vector argmin of the function ELfsds: ELfsds <- function(pvechat){ LG=0 for(i in 1:9){ LG=LG+log(pvechat[i]) } return(-LG) } with accompanying gradient function: gradfunc <- function(thetavec){ g=1/(9*thetavec) return(g) } The constraints on the optimization problem are: 1 - components of potentialargmin must add to 1. 2 - each potentialargmin component must be (weak...
2010 Mar 20
1
grid lines aligned on each ticks with a log scale
Hi all, for publication purpose I must provide a graph with grid lines aligned with each tick mark. Thing is that the graph has a log scale on the x-axis. I looked at the grid() and par() documentation but still don't figure out how to get it done. simple example plot(seq(1,9), log="x", panel.first=grid()) how to get lines at x = 2 and 5 on the graph? Of course the option "nx" in grid() is not valid, as it does not align the grid lines with the ticks in a log scale... Thanks for giving a hand. Regards/Cordialement ------------- Benoit Bouling...
2008 Oct 22
3
retrieving matrix elements by giving pairs of row AND column numbers?
Hi, this is probably a very trivial question but I can't figure out the right terms to find the solution in the list archive. I have a matrix or a data.frame or the like: > m <- matrix(ncol=3,seq(1,9)) > m [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 and now I wonder if one can provide somehow two vectors, one containing row numbers, the other column numbers and thereby retrieve the corresponding elements? E.g., providing the 2 vectors c(1,2,3) and c(1,3...
2008 May 23
3
nls diagnostics?
Hi, All: What tools exist for diagnosing singular gradient problems with 'nls'? Consider the following toy example: DF1 <- data.frame(y=1:9, one=rep(1,9)) nlsToyProblem <- nls(y~(a+2*b)*one, DF1, start=list(a=1, b=1), control=nls.control(warnOnly=TRUE)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates This example is obviously stupi...
2010 Apr 18
2
Calculating a Maximum for a row or column with NA's
Is there a simple way to calculate the maximum for a row or column of a matrix when there are NA,s present. # given a matrix that has any number of NA per row > m<-matrix(c(seq(1,9)),nrow=3) > m [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 > m[3,1]=NA > m[1,]=NA > m [,1] [,2] [,3] [1,] NA NA NA [2,] 2 5 8 [3,] NA 6 9 # applying max to rows doesnt work as max returns # NA if any of the elements is NA...
2012 Nov 13
2
multiply each row in a matrix with the help of the for loop
Dear R users, I have this program aa<-array(rep(0,27),dim=c(3,3,3)) a<-matrix(rep(1,9),ncol=3) n<-0 for (i in 1:3) {            a[i,]<-a[i,]*(-1)       n<-n+1       aa[,,n]<-a[i,] } but i real want to multiply each row  with -1 according to for loop and after that to put it in the array.  I will give an example for what excaclty want -1 -1 -1  1  1  1  1  1  1 -1...
2011 Jun 28
4
Separator of data
Hi all, I have a matrix like this: 188556644 225588666 558888555 I try to read the table using read table but if I put sep="" I have seen it expects a white space, is there a "sep" option to read this matrix so each single number is a position of the matrix You see this matrix would be an 3x9 matrix I tried oth...
2011 May 24
3
Beginner Question: List value without Levels
Hey folks, I'm new to the R Project so I'm facing a great problem. I've read a file into R: >myVal I V L F C M A G T W S Y P H Q D N E K R 1 4,5 4,2 3,8 2,8 2,5 1,9 1,8 -0,4 -0,7 -0,9 -0,8 -1,3 -1,6 -3,2 -3,5 -3,5 -3,5 -3,5 -3,9 -4,5 > mode(myVal) [1] list Now I want to multiplicate each of this values with this one: >data A C D E F G H I K L M N P Q R S T V W Y 28 8 11 14 17 34 7 26 15 26 10 9 12 8...
2009 Jan 20
2
Stacked barplot with two stacked bars besides each other
Hi, I have a particular barplot I would like to generate, but I am having trouble getting it to work. What I would like is in effect two barplots with stacked bars merged into one. For example, I have two samples (yoda1,yoda2) on which I measure whether two variables (var1,var2) are present or absent for a number of measurements on that sample. > var1 <- data.frame(yoda1=c(3,7), yoda2=c(1,9)) > var2 <- data.frame(yoda1=c(8,2), yoda2=c(5,5)) For each variable I can plot a barplot > barplot(as.matr...
1999 Nov 23
3
problems with postscript device
Hi! The postscript device in 0.90 does not produce symbols (pch=) as it should. E.g.: postscript(file="test.ps",width=8,height=6.4,horizontal=FALSE) plot(1:10,1:10,pch=1:5) legend(1,9,letters[1:5],pch=1:5) dev.off() The result looks quite different compared to the X-windows version. The symbol 1 (pch=1) is much to small, while the other symbols seem to big. Is it a bug? How can I work it around? Wolfgang Koller -------------------------------...
2017 Nov 28
2
[PATCH v4] s390/virtio: add BSD license to virtio-ccw
...Make it dual-licensed with GPLv2, as the whole kernel is GPL2. Acked-by: Christian Borntraeger <borntraeger at de.ibm.com> Acked-by: Cornelia Huck <cohuck at redhat.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- arch/s390/include/uapi/asm/virtio-ccw.h | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/s390/include/uapi/asm/virtio-ccw.h b/arch/s390/include/uapi/asm/virtio-ccw.h index 967aad3..2b605f7 100644 --- a/arch/s390/include/uapi/asm/virtio-ccw.h +++ b/arch/s390/include/uapi/asm/virtio-ccw.h @@ -1,13 +1,9 @@ -/* SPDX-License-I...
2017 Nov 28
2
[PATCH v4] s390/virtio: add BSD license to virtio-ccw
...Make it dual-licensed with GPLv2, as the whole kernel is GPL2. Acked-by: Christian Borntraeger <borntraeger at de.ibm.com> Acked-by: Cornelia Huck <cohuck at redhat.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- arch/s390/include/uapi/asm/virtio-ccw.h | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/s390/include/uapi/asm/virtio-ccw.h b/arch/s390/include/uapi/asm/virtio-ccw.h index 967aad3..2b605f7 100644 --- a/arch/s390/include/uapi/asm/virtio-ccw.h +++ b/arch/s390/include/uapi/asm/virtio-ccw.h @@ -1,13 +1,9 @@ -/* SPDX-License-I...
2009 Apr 26
7
Bumps chart in R
Hi there, I would like to make a 'bumps chart' like the ones described e.g. here: http://junkcharts.typepad.com/junk_charts/bumps_chart/ Purpose: I'd like to plot the proportion of people in select countries living for less then one USD pr day in 1994 and 2004 respectively. I have already constructed a barplot - but I think a bumps chart would be better # The barplot and data countries <- c("U-lande", "Afrika syd for sahara", "Europa og Centralasien", "Lantinamerika og Caribien","Mellem?stenog...