search for: v2+

Displaying 20 results from an estimated 23 matches for "v2+".

Did you mean: v2
2013 May 01
3
Adding Column to Data Frames Using a Loop
...=3,byrow=T)) z=as.data.frame(matrix(c(1,2,3, 1,2,3, 1,2,2, 1,2,2, 1,1,1),ncol=3,byrow=T)) for(i in letters[24:26] ) assign( i, subset(get(i), select=-c(V1)) ) x y z And I figured how to do further processing using functions: myfunc<-function(DF){ DF$V4<-DF$V2+DF$V3 return(DF) } for(i in letters[24:26] ) assign( i, myfunc(get(i))) But if I want to do a rather simple calculation and store it as a new column in each data frame such as x$V4<-x$V2+x$V3 y$V4<-y$V2+y$V3 z$V4<-z$V2+z$V3 is there a simpler way to do this than building a function as...
2010 Jul 07
2
Sum vectors and numbers
We want to sum many vectors and numbers together as a vector if there is at least one vector in the arguments. For example, 1 + c(2,3) = c(3,4). Since we are not sure arguments to sum, we are using sum function: sum(v1,v2,...,n1,n2,..). The problem is that sum returns the sum of all the values present in its arguments: sum(1,c(2,3))=6 sum(1,2,3)=6 We do not want to turn sum(v1,v2,...,n1,n2,..) to v1+v2+...+n1+n2+... So do you know easy way to sum vectors (v1,v2,...) and numbers (n1,n2,...) as a vector without using...
2010 Sep 22
2
defining set of variables in a formula
Dear fellow R users, I am trying to conduct a regression analysis. I have thousands of variables. The names are V1, V2,........V2000 Is there an easy way to include these variables in the regression? my model is something like that: model<- lm(y~V1+V2+.....+V2000, data=data) Thanks so much in advance, Ozlem
2009 Apr 25
2
Extracting an object name?
...esting student's models against a different data-set, called rclnow, for "recall now". The problem is, that the instructor never specified to the students, what they should name their "lm" object. So what they created was: "arbitrary variable name" <- lm(Y~(V1+V2+.... more stuff), learn_data_frame) Now there are 1500+ files that are named: "BIOtotals_students_name_class_name_date_other_info..." "BIOtotals_more_stuff_2.." "BIOtotal_more-stuff_3 ...................... ...................... Now I always get this error in the "...
2011 Mar 14
2
code for "permutative" operation
Hello, I need some form of a "permutative" operation on a numeric vector x x = (v1, v2, v3, ..., vN) that produces x.r = (v1, v1+2, v1+v2+v3, ... v1+v2+...+vN) If the operation is sum() I can run x <- 5:8 m <- matrix(rep(x, length(x)), ncol=length(x)) (x.r <- rowsum(m * upper.tri(m, diag=TRUE), rep(1, length(x)))) But there's two things I don't know and kindly r...
2011 Jun 16
1
prediction intervals
...me being, I want to combine the results across all cities and have overall prediction intervals. Because I assuming that they're independent can I just add together the degrees of freedom from each model (i.e. total degrees of freedom=df1+df2+...) and the variance-covariance matrices (i.e. V=V1+V2+...) in order to calcalate the overall prediction intervals? Any help would be most appreciated. Regards, Dave [[alternative HTML version deleted]]
2012 Jun 04
1
simulation of modified bartlett's test
...5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt(100) g1<-rnorm(n1,mu,sd1) g2<-rnorm(n2,mu,sd2) g3<-rnorm(n3,mu,sd3) x=c(g1,g2,g3) group=c(rep(1,n1),rep(2,n2),rep(3,n3)) N=60 k=3 v1=var(g1) v2=var(g2) v3=var(g3) #pooled variance A=((n1-1)*v1+(n2-1)*v2+(n3-1)*v3)/(N-k) #calculate B B=((N-k)*(log(A)))-((n1-1)*log(v1)+(n2-1)*log(v2)+(n3-1)*log(v3)) #calculate C C=1+(1/(3*(k-1))*(((1/(n1-1))+(1/(n2-1))+(1/(n3-1)))-(1/(N-k)))) #calculate layard estimator xbar1=mean(g1) xbar2=mean(g2) xbar3=me...
2013 Feb 03
1
Adding complex new columns to data frame depending on existing column
Hello I have a data frame as below V1 V2 V3 V4 V5 V6 chr1 18884 C CAAAA 2 0 chr1 135419 TATACA T 2 0 chr1 332045 T TTG 0 2 chr1 453838 T TAC 2 0 chr1 567652 T TG 1 0 chr1 602541 TTTA T 2 0 on which I want to perform complex rearrangement such t...
2014 Oct 24
1
[PATCH v3] daemon: Remove custom Augeas lenses.
v3: - Don't remove the LVM transform.
2014 Oct 24
1
[PATCH v2] daemon: Remove custom Augeas lenses.
v2 of previous patch, which fixes some missing bits. For now I'm going to go with Pino's RHEL 7.1 patch, since it is at least smaller than this. So I'm sending this to the list just to have it archived for later. Rich.
2012 Jun 14
0
Query about TSRV
...1,P2,...P301,P302,...P22500 are the prices at each timestamp, then we are effectively doing the below (using simple returns for illustration only): (P301/P1)^2 + (P601/P301)^2 + (P901/P601)^2 + .... + (P22201/P21901)^2 = V1 (P302/P2)^2 + (P602/P302)^2 + (P902/P602)^2 + .... + (P22202/P21902)^2 = V2 (P303/P3)^2 + (P603/P303)^2 + (P903/P603)^2 + .... + (P22203/P21903)^2 = V3 .... .... .... (P600/P300)^2 + (P900/P600)^2 + (P1200/P900)^2 + .... + (P22500/P22200)^2 = V300 Then we average the Vi's (V1+V2+....+V300)/300. This gives us the 5 min realized volatility. Please correct me if I'...
2014 Aug 19
2
Samba 3.0.37 license confusion
Hello Jeremy and samba maintainers, I am using Samba 3.0.37 and I am confused about the license. On one hand both the COPYING file in the 3.0.37 tarball and your website indicates that version 3.0.37 is GPLv2. http://news.samba.org/announcements/samba_gplv3/ On the other hand, in the 3.0.37 tarball, there are many files with GPLv3 headers without any exception. For instance, several file in source/client directory. So my question is if it is released under GPLv2, why there are so many GPLv3 license on...
2014 Oct 24
2
[PATCH] daemon: Remove custom Augeas lenses.
..._lvm_conf.aug deleted file mode 100644 index ffa5b01..0000000 --- a/appliance/guestfs_lvm_conf.aug +++ /dev/null @@ -1,74 +0,0 @@ -(* -Module: LVM - Parses LVM metadata. - -Author: Gabriel de Perthuis <g2p.code+augeas@gmail.com> - -About: License - This file is licensed under the LGPL v2+. - -About: Configuration files - This lens applies to files in /etc/lvm/backup and /etc/lvm/archive. - -About: Examples - The <Test_LVM> file contains various examples and tests. -*) - -module Guestfs_LVM_conf = - autoload xfm - - (* See lvm2/libdm/libdm-config.c for tokenisation; - * lib...
2016 Nov 10
5
[PATCH v5 0/3] v2v and augeas
Augeas 1.7.0 was released a couple of days ago. By encouraging everyone to upgrade to this we can drop several calls to aug_transform and also our custom copies of two lenses, and a lot of related code. Rich.
2019 Nov 25
0
[PATCH nbdkit 1/2] python: For v2 API, avoid copy by passing a buffer to pread.
...ot;%s: value returned from pread does not support the " - "buffer protocol", - script); - goto out; - } + if (py_api_version == 1) { + /* In API v1 the Python pread function had to return a buffer + * protocol compatible function. In API v2+ it writes directly to + * the C buffer so this code is not used. + */ + if (PyObject_GetBuffer (r, &view, PyBUF_SIMPLE) == -1) { + nbdkit_error ("%s: value returned from pread does not support the " + "buffer protocol", +...
2019 May 29
4
[PATCH 0/3] Simple augeas-related changes
- bump the augeas requirement to 1.2.0, and drop an old hack - add a small helper in the generator Pino Toscano (3): build: raise augeas requirement to 1.2.0 appliance: remove custom Shadow augeas lens daemon: implement OptString for OCaml APIs appliance/Makefile.am | 6 +-- appliance/guestfs_shadow.aug | 72 ------------------------------------ daemon/augeas.c | 21
2013 Mar 31
1
Rock Ridge for core/fs/iso9660
Hi, i have now a retriever of Rock Ridge names from ISO directory records and their eventual Continuation Areas. Further i have a detector for SUSP and Rock Ridge signatures. Both have been tested in libisofs by comparing their results with the Rock Ridge info as perceived by the library. 50 ISO images tested. Some bugs repaired. Now they are in sync. (The macro case
2006 Jul 30
2
NIST StRD linear regression
...precision. I am using R 2.3.1 for Windows XP. rm(list=ls()) require(gsubfn) defaultPath <- "my path" data.base <- "http://www.itl.nist.gov/div898/strd/lls/data/LINKS/DATA" reg.data <- paste(data.base, "/Filip.dat", sep="") model <- "V1~V2+I(V2^2)+I(V2^3)+I(V2^4)+I(V2^5)+I(V2^6)+I(V2^7)+I(V2^8)+I(V2^9)+I (V2^10)" filePath <- paste(defaultPath, "//NISTtest.dat", sep="") download.file(reg.data, filePath, quiet=TRUE) A <- read.table(filePath, skip=60, strip.white=TRUE) lm.data <- lm(formula(model), A)...
2019 Nov 25
3
[PATCH nbdkit 0/2] python: Implement pread passing buffer for v2 API.
As suggested by Nir, here: https://www.redhat.com/archives/libguestfs/2019-November/thread.html#00220
2014 Sep 04
10
[PATCH 0/5] use augeas for /etc/shadow
Hi, currently /etc/shadow is edited manually when needed (i.e. when setting the password for an user), and it is not changed when removing users. Import the upstream shadow.aug (currently in their development serie, but not part of any released version yet), and use it only when the augeas version is less than a potential 1.2.1 (covering also the case when the new version is just 1.3.0). Pino