similar to: help with vector construction

Displaying 20 results from an estimated 20000 matches similar to: "help with vector construction"

2008 Jan 17
1
Res: vector generation
hi Juan, It is not so elegant, but work fine. I know that our colleagues can do it on a simple line. z<-c(526,723,110,1110,34,778,614,249,14) v1<-NULL v2<-NULL for (i in 1:(length(z)-1)) { for (j in i:length(z)) { v1<-rbind(v1,z[i]) v2<-rbind(v2,z[j]) } } df<-data.frame(cbind(v1=v1,v2=v2)) names(df)<-c("v1","v2") df$ratio<-df$v1/df$v2 Kind regards,
2007 Nov 22
4
more outrageous plotting
Dear Contributors: I have the next matrix: "X" "Y" "Z" 1 2 526 2 5 723 3 10 110 4 7 1110 5 9 34 6 8 778 7 1 614 8 4 876 9 6 249 10 3 14 I want to order the matrix from bigest Z (1110) to lower Z (14). Then I want to asign a color scale vector from blue ( bigest Z) to orange
2009 Feb 22
2
filtering a simple matrix
Hi all, I have the next matrix: a b c 1 2 23 2 3 42 3 0 54 4 5 23 5 0 22 6 7 21 7 1 20 8 9 19 I want to filter the rows with the values of b higher than 1 in a way that leaves me the next matrix: a b c 1 2 23 2 3 42 4
2007 Feb 27
4
ordered matrix question
Hi all, Is there an easy way to generate an object wich will be the same matrix, but ordered by de cfp value? The data frame consists of numeric columns: "Block" "X" "Y" "cfp" "yfp" "ID" 0 524 244 213.41795 7.18482109 1 0 556 270 65.383904 9.568372661 2 0 528 316 40.789474
2008 Jan 17
3
vector generation
Dear Contributors: I have the next vector: "Z" 526 723 110 1110 34 778 614 249 14 I want to generate a vector containing the ratios of all the values versus all the values of the z vector. I mean a vector containing the values of 526/723, 526/110, and so on, 723/723, 723/110, and so on, and so on. Is this doable in a simple way?? Thanks in advance again, Juan Pablo Fededa
2008 Jan 24
4
two histograms in the same graph
Dear Contributors: I have two vectors x and z, and I want to display the histograms of both vectors in the same graph, x in red bars, z in blue bars. If you have any clue on how to do that, I will be very glad to hear it!!!!!! Thanks in advance again, Juan Pablo Fededa [[alternative HTML version deleted]]
2008 May 15
1
value transformations in a vector
Dear contributors: I have vector A composed of numbers wich have values equal to 1 and different to 1. I want to transform de components with a value=1 to a component of value=0, and those with a value different to1, to a value=1. Then I want to take out the components=0. Thanks in advance, Juan Pablo [[alternative HTML version deleted]]
2009 Apr 14
2
matrix merge problem
Dear r-help contributors, I have two questions: first: I have a matrix A and a vector B. I want to make a new matrix C, which is made of the rows of A having a value included in B. Second: I have two matrixes A and B, of different dimensions. B has unique values in column 2 and A has not unique values on column 2. I want to merge this two matrixes by the values in the columns 2 of B and 2 of
2009 Apr 07
1
matrix filtering and reordering
I have two matrixes, red: a 123 c 200 d 400 e 650 g 127 f 100 and blue: a 10 b 20 c 30 d 40 e 50 f 60 g 70 is there any easy way to get the next matrix: a 10 123 b 20 0 c 30 200 d 40 400 e 50 650 f 60 100 g 70 127 i.e. to add in the third column of blue the [,2] values of red corresponding to the file with same [x,1] value of blue, adding a cero in the case that there is no [x,1]
2010 Oct 11
2
compare histograms
Hello How to compare  two statistical histograms? How i can know if these histograms are equivalent or not??   Regards [[alternative HTML version deleted]]
2007 Nov 22
1
axis invertion
Hi all, I want to invert the y axis of a plot, how can I do that in an easy way? Thanks in advance, Juan Pablo
2012 Mar 10
2
Window on a vector
Dear all, I have a large vector (lets call it myVector) and I want to plot its value with the logic below yaxis<-myVector[1] yaxis<-c(xaxis,mean(myvector[2:3]) yaxis<-c(xaxis,mean(myvector[4:8]) yaxis<c(xaxis,mean(myvector[9:16]) yaxis<c(xaxis,mean(myvector[17:32]) this has to stop when the new ..... yaxis<c(xaxis,mean(myvector[1024:2048]) will not find the correspondent number
2007 Dec 18
6
All anchored series from a vector?
>From: Johannes Graumann <johannes_graumann at web.de> >Date: 2007/12/18 Tue PM 04:40:37 CST >To: r-help at stat.math.ethz.ch >Subject: [R] All anchored series from a vector? lapply(1:length(myvector) function(.length) { c(myvector[1}:myvector[.length]) }) but test it because i didn't. >Hi all, > >What may be a smart, efficient way to get the following result:
2010 Sep 01
2
Error: Domain ''winXP'' does not exist.
Hi, I''m tying to load a full HVM enviroment with windows XP to test my first xen VM. This is my config file http://dpaste.org/pbJd/ <http://dpaste.org/pbJd/>when i run the command : xm create winxp.cfg i got Error: Domain ''winXP'' does not exist. Somebody can help me with this? i did read docs about config files, everyting seems to be in place thanks --
2009 Jan 26
3
GPLPV
Hello list; I´ve updated my windows 2k3 GPLPV drivers from 0.9.9 to 0.9.12-pre13. But now, i have two xen block devices; (of course, one of them is not working and is marked with the yellow exclamation). How can i fix it, or how can i uninstall the GPLPV drivers in order to make a clean install? Thanks Juan Pablo _______________________________________________ Xen-users mailing list
2010 Sep 02
2
How to change default interface from eth0 to eth3?
I got this message when i''m trying to create the VM. Error: Device 0 (vif) could not be connected. Could not find bridge device xenbr0 Is there a way to change de interface from eth0 to eth3? thanks -- *-----* *Juan Pablo Lopez Bergero* *Cell: 15-3957-3455* * * _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com
2002 Feb 25
4
replace NAs
Dear R community: it is possible to replace NA?s in a data frame with zeroes? what should I do? Thanks in advance Juan Pablo _________________________________________________________________ MSN Photos es la manera m?s sencilla de compartir e imprimir sus fotos: http://photos.latam.msn.com/Support/WorldWide.aspx -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2009 Jan 21
1
Paravirtualized Debian (on CentOS host)
In order to create a paravirtualized guest/DomU, should i use the same distro as the host/dom0 is? Or is it possible to install a paravirtualized Debian (as a guest / DomU) into a CentOS (host / Dom0) ? Juan Pablo On Tue, Jan 20, 2009 at 8:42 AM, Ferenc Wagner <wferi@niif.hu> wrote: > Juan Pablo Torres <juanpablotorres@gmail.com> writes: > > > Im trying to install a
2006 Sep 13
2
Retrieving value computed in inner function call
Dear R users, Consider the following example function: f = function(a,b) { g = function(x) a*x + b h = function(x) g(x)^2 + x^2 opt = optimize(h,lower = -1, upper = 1) x.min = opt$minimum h.xmin = opt$objective g.xmin = g(x.min) return(c(x.min, h.xmin, g.xmin)) } In my real problem the function that plays the role of "g" is costly to compute. Now, to
2008 Jul 10
2
Finding Values that Occur Most Often in a Vector
Hi, Is there a way to do it? For example I have the following vector: > print(myvector) > [1] -295.8045 -295.8045 -295.8045 -295.8045 -325.4754 -295.8045 -295.8045 [8] -295.8045 -413.2099 -295.8045 I want it to return -295.8045, which occur most often. - Gundala Viswanath Jakarta - Indonesia