search for: a_flag

Displaying 12 results from an estimated 12 matches for "a_flag".

Did you mean: f_flag
2017 Nov 22
6
assign NA to rows by test on multiple columns of a data frame
Given this data frame (a simplified, essential reproducible example) A<-c(8,7,10,1,5) A_flag<-c(10,0,1,0,2) B<-c(5,6,2,1,0) B_flag<-c(12,9,0,5,0) mydf<-data.frame(A, A_flag, B, B_flag) # this is my initial df mydf I want to get to this final situation i<-which(mydf$A_flag==0) mydf$A[i]<-NA ii<-which(mydf$B_flag==0) mydf$B[ii]<-NA...
2017 Nov 22
0
assign NA to rows by test on multiple columns of a data frame
Do you mean like this: mydf <- within(mydf, { is.na(A)<- !A_flag is.na(B)<- !B_flag } ) > mydf A A_flag B B_flag 1 8 10 5 12 2 NA 0 6 9 3 10 1 NA 0 4 NA 0 1 5 5 5 2 NA 0 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and stick...
2017 Nov 23
1
assign NA to rows by test on multiple columns of a data frame
...quot; <massimo.bressan at arpa.veneto.it> Cc: "r-help" <r-help at r-project.org> Inviato: Mercoled?, 22 novembre 2017 17:32:33 Oggetto: Re: [R] assign NA to rows by test on multiple columns of a data frame Do you mean like this: mydf <- within(mydf, { is.na(A)<- !A_flag is.na(B)<- !B_flag } ) > mydf A A_flag B B_flag 1 8 10 5 12 2 NA 0 6 9 3 10 1 NA 0 4 NA 0 1 5 5 5 2 NA 0 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and stick...
2017 Nov 22
1
assign NA to rows by test on multiple columns of a data frame
...2 novembre 2017 11:49:08 Oggetto: Re: [R] assign NA to rows by test on multiple columns of a data frame Hello, Try the following. icol <- which(grepl("flag", names(mydf))) mydf[icol] <- lapply(mydf[icol], function(x){ is.na(x) <- x == 0 x }) mydf # A A_flag B B_flag #1 8 10 5 12 #2 7 NA 6 9 #3 10 1 2 NA #4 1 NA 1 5 #5 5 2 0 NA Hope this helps, Rui Barradas On 11/22/2017 10:34 AM, Massimo Bressan wrote: > > > Given this data frame (a simplified, essential reproducible example) > > &...
2017 Nov 22
0
assign NA to rows by test on multiple columns of a data frame
Hello, Try the following. icol <- which(grepl("flag", names(mydf))) mydf[icol] <- lapply(mydf[icol], function(x){ is.na(x) <- x == 0 x }) mydf # A A_flag B B_flag #1 8 10 5 12 #2 7 NA 6 9 #3 10 1 2 NA #4 1 NA 1 5 #5 5 2 0 NA Hope this helps, Rui Barradas On 11/22/2017 10:34 AM, Massimo Bressan wrote: > > > Given this data frame (a simplified, essential reproducible example) > > &...
2017 Nov 22
1
assign NA to rows by test on multiple columns of a data frame
...* > > On Wed, Nov 22, 2017 at 5:34 AM, Massimo Bressan < > massimo.bressan at arpa.veneto.it> wrote: > >> >> >> Given this data frame (a simplified, essential reproducible example) >> >> >> >> >> A<-c(8,7,10,1,5) >> >> A_flag<-c(10,0,1,0,2) >> >> B<-c(5,6,2,1,0) >> >> B_flag<-c(12,9,0,5,0) >> >> >> >> >> mydf<-data.frame(A, A_flag, B, B_flag) >> >> >> >> >> # this is my initial df >> >> mydf >> >> >...
2017 Nov 22
0
assign NA to rows by test on multiple columns of a data frame
...simo,* *Try this.* *a <- mydf==0mydf[a] <- NAHTHEK* On Wed, Nov 22, 2017 at 5:34 AM, Massimo Bressan < massimo.bressan at arpa.veneto.it> wrote: > > > Given this data frame (a simplified, essential reproducible example) > > > > > A<-c(8,7,10,1,5) > > A_flag<-c(10,0,1,0,2) > > B<-c(5,6,2,1,0) > > B_flag<-c(12,9,0,5,0) > > > > > mydf<-data.frame(A, A_flag, B, B_flag) > > > > > # this is my initial df > > mydf > > > > > I want to get to this final situation > > > > &gt...
2010 Feb 01
1
Comparing Variables and Writing a New Column
...2570 1880 2072 2712 2904 Previously, I took this table and finished my analysis in Excel using Excel's "=if" function. However, I am sure it can be done in R. What I want to do is set up a new data.frame with a new column for Accuracy Flags (a_flag) as shown below. Lab_ID Analysis_Soil Results -4MAD -2.5MAD +2.5MAD +4MAD a_flag 55003 Calcium-2008-116 900 961 1121.5 1656.5 1817 **L 55003 Calcium-2008-117 3321 2175 2380.5...
2006 Nov 26
0
[759] trunk/wxruby2/Changelog: Roy & Alex''s recent fixes and additions
...r to_s output, esp for Colour, Point, Rect, Size (Alex Fenton) +- Restored client data stuff in samples(Roy Sutton) +- Re-enable ListBox methods that accept new client data (Roy Sutton) +- Added typemap to fix ListBox.get_selections (Roy Sutton) +- Added wxUInt32 typedef, fixing FindReplaceData.new(a_flag) (Roy Sutton) +- Give more info on failed assertions but don''t raise exception (Alex Fenton) +- Corrected some typemapped method signatures in documentation (Alex Fenton) </ins><span class="cx"> - Un-disabled evt_toolbar on Linux and OS X (Alex Fenton) </span>&l...
2008 Nov 24
0
[LLVMdev] how to track down a kernel miscompilation?
...volatile related. Now bugpoint has some ways to run the code by some external agent which I haven't investigated yet. Oh and if you are trying to construct an entire kernel bitcode file, the following rule will help: cmd_ll_as = echo "module asm \"" > $@ ; $(ASMCC) $(a_flags) -c -o - -S $< |perl -npe s/\"/\\\\22/g >> $@ ; echo "\"" >> $@ Andrew On Mon, Nov 24, 2008 at 5:49 AM, Török Edwin <edwintorok at gmail.com> wrote: > Hi, > > I am trying to build the Linux kernel with LLVM. > 'ARCH=um' appears to work...
2008 Nov 24
4
[LLVMdev] how to track down a kernel miscompilation?
Hi, I am trying to build the Linux kernel with LLVM. 'ARCH=um' appears to work, now I am trying to get 'ARCH=x86' to work. So far it seems there is something wrong with the boot vga code (it finds no video modes), the acpi code, and the serial console code. I am now trying to compile drivers/ with llvm-gcc and the rest with gcc-4.2 (I have a wrapper script), I am compiling to
2007 Apr 18
33
[RFC PATCH 00/33] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths