search for: val1

Displaying 20 results from an estimated 251 matches for "val1".

Did you mean: val
2011 Mar 10
1
How to use conditional statement
Dear R helpers Suppose val1 = c(10, 20, 35, 80, 12) val2 = c(3, 8, 11, 7) I want to select either val1 or val2 depending on value of third quantity val3. val3 assumes either of the values "Monthly" or "Yearly". If val3 = "Monthly", then val = val1 and if val3 = "Yearly", then val = v...
2007 Apr 18
2
[RFC, PATCH 17/24] i386 Vmi msr patch
...R_H #define __ASM_MSR_H +#include <mach_msr.h> + /* * Access to machine-specific registers (available on 586 and better only) * Note: the rd* operations modify the parameters directly (without using * pointer indirection), this allows gcc to optimize better */ -#define rdmsr(msr,val1,val2) \ - __asm__ __volatile__("rdmsr" \ - : "=a" (val1), "=d" (val2) \ - : "c" (msr)) - -#define wrmsr(msr,val1,val2) \ - __asm__ __volatile__("wrmsr" \ - : /* no outputs */ \ - : "c" (msr), "a" (val1), "d&q...
2007 Apr 18
2
[RFC, PATCH 17/24] i386 Vmi msr patch
...R_H #define __ASM_MSR_H +#include <mach_msr.h> + /* * Access to machine-specific registers (available on 586 and better only) * Note: the rd* operations modify the parameters directly (without using * pointer indirection), this allows gcc to optimize better */ -#define rdmsr(msr,val1,val2) \ - __asm__ __volatile__("rdmsr" \ - : "=a" (val1), "=d" (val2) \ - : "c" (msr)) - -#define wrmsr(msr,val1,val2) \ - __asm__ __volatile__("wrmsr" \ - : /* no outputs */ \ - : "c" (msr), "a" (val1), "d&q...
2018 Aug 06
2
Lowering ISD::TRUNCATE
...supported datatypes, which are 8 and 16 bits wide (i.e. no 32 bit long, float, ... yet). So far, a lot of the simple stuff like immediate loads and return values is very straightforward, but now I got stuck with ISD::TRUNCATE, as in: typedef unsigned char uint8_t; uint8_t Func(uint8_t val1) { return val1 + val1; } built with -O0 results in: target datalayout = "e-m:o-S8-p:16:8-p1:8:8-i16:8-i32:8-a:8-n8:16" target triple = "z80" ; Function Attrs: noinline nounwind optnone define dso_local zeroext i8 @Func(i8 zeroext %val1) #0 { entry:...
2009 Jun 08
1
Looking for easy way to normalize data by groups
...and all three timepoints there are 2 sets of four values. df <- data.frame(PID = c(rep("A", 12), rep("B", 12), rep("C", 12)), Time = rep(c(0, 0, 0, 0, 30, 30, 30, 30, 60, 60, 60, 60), 3), Dset = rep(c(1, 2),18), Val1 = rnorm(36), Val2 = rnorm(36), Val3 = rnorm(36), Val4 = rnorm(36)) You can plot the data nicely with x=Time and y=Val1 by grouping PID and facetting for Dset. p <- ggplot(df) + geom_line(aes(x=Time,y=Val1,group=PID)) + geom_po...
2012 Nov 23
2
Barplot with lines
Hi, I'm trying to plot stacked barplot with lines on it. Here is the data. emp days val1 val2 score 1 21 1 0 1200 2 35 1 1 na 3 42 na na 3000 4 53 2 1 2100 5 64 1 0 na 6 73 na na 1400 My X-axis is days. I'm looking to plot val1,val2 as stacked bars and score as lines with different y-axis. I could get the bar plot and lines on it but the problem is the bars and lines are not align...
2008 Oct 13
3
lattice panel question
...label? for example: someStuff <- data.frame(area = rep(c("SOUTH", "NORTH", "EAST", "WEST"), each = 25), group = rep(c("A","B","C","D"), each = 5), mytime = rep(1:4), val1 = sample(1:100, size=100, replace=TRUE), val2 = sample(1:100, size=100, replace=TRUE) ) xyplot(val1+val2 ~ mytime | area * group, data = someStuff, type = c("a", "p", "g")) I want to change each panel label/text from for example D/East or D/No...
2011 Feb 03
2
R-help
Hi, I have data like this.... print(x) ID VAL1 VAL2 1 B A 2 P Q 3 T S What I would like is data like this... ID VAL1 VAL2 1 A B 2 P Q 3 S T So that VAL1 and VAL2 are alphabetically ordered. Any advice is welcome! San. [[alternative HTML ver...
2009 Mar 03
2
preparing data for barplot()
What is the best way to produce a barplot from my data? I would like the barplot to show each person with the values stacked val1+val2+val3, so there is one bar for each person When I use barplot(data.matrix(realdata)), it shows one bar for each value instead. To post here, I created an artificical data set, but it works fine. fakedata <- as.data.frame(list(LETTERS[1:3])) colnames(fakedata) <- 'people' fakeda...
2010 Nov 07
3
Integrate and mapply
...1:15) t2<-c(1:5)%x%matrix(1,3,1) t3<-matrix(1,3,1)%x%c(1:5) t4<-c(1:3)%x%matrix(1,5,1) comb<-cbind(t1,t2,t3,t4) nu<-rchisq(15,4) gam<-matrix(rchisq(75,df=5),15,5) undint<-function(u){ prob<-function(i) { i1<-comb[i,1] i2<-comb[i,2] i3<-comb[i,3] i4<-comb[i,4] val1<-gam[((i3-1)*2+1):(i3*2),i4] vc1<-matrix(12,length(val1),1)-matrix(u,length(val1),1)-val1 distr1<-prod(pchisq(vc1,df=2)) p10<-distr1*1/(exp(-nu[i1])*(1+gam[i2,i4]))*(1-plogis((u+log(gam[i3,i4])-log(1+gam[i2,i4])),0,1)) p10 } val<-c(1:15) q<-sapply(val,prob) }
2009 Jan 06
1
[LLVMdev] Look-ahead instruction selection
Maybe I didn't describe the question very well. I want to match these patterns: (and (mul node:$val0, node:$val1)) (and (add node:$val0, node:$val1)) (and (sub node:$val0, node:$val1)) (and (udiv node:$val0, node:$val1)) into "four" different machines instructions, respectively: MUL_AND ADD_AND SUB_AND UDIV_AND That is, this machine is capable of doing an arithmetic operation and a...
2013 Sep 13
2
how to get values within a threshold
input: > values [1] 0.854400 1.648465 1.829830 1.874704 7.670915 7.673585 7.722619 > thresholds [1] 1 3 5 7 9 expected output: [1] 1 4 4 4 7 That is, need a vector of indexes of the maximum value below the threshold. e.g. First element is "1", because value[1] is the largest below threshold "1". Second element is "4", because value[4] is the
2016 Feb 10
4
Memory Store/Load Optimization Issue (Emulating stack)
...foo (On "stack") %sp_1 = getelementptr i8, i8* %sp, i32 -4 %sp_1_ptr = bitcast i8* %sp_1 to i32* store i32 %foo, i32* %sp_1_ptr, align 4 ; push bar %sp_2 = getelementptr i8, i8* %sp_1, i32 -4 %sp_2_ptr = bitcast i8* %sp_2 to i32* store i32 %bar, i32* %sp_2_ptr, align 4 ; val1 = pop (val1 = bar) %sp_3_ptr = bitcast i8* %sp_2 to i32* %val1 = load i32, i32* %sp_3_ptr, align 4 %sp_3 = getelementptr i8, i8* %sp_2, i32 4 ; val2 = pop (val2 = foo) %sp_4_ptr = bitcast i8* %sp_3 to i32* %val2 = load i32, i32* %sp_4_ptr, align 4 %sp_4 = getelementptr i8, i8* %sp_3,...
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
...f VMCore/JavaJITOpcodes.cpp Index: VMCore/JavaJITOpcodes.cpp =================================================================== --- VMCore/JavaJITOpcodes.cpp (revision 52951) +++ VMCore/JavaJITOpcodes.cpp (working copy) @@ -1008,7 +1008,7 @@ Value* val2 = popAsInt(); Value* val1 = popAsInt(); Value* mask = ConstantInt::get(Type::Int32Ty, 0x1F); - val2 = BinaryOperator::CreateAnd(val2, mask, "", currentBlock); + val2 = BinaryOperator::createAnd(val2, mask, "", currentBlock); push(BinaryOperator::createLShr(val1, val2, &quo...
2017 Feb 25
2
[DebugInfo] [DWARFv5] .debug_abbrev contents for different implicit_const values
Hello all, it looks like we have a bug here but I am not sure. Currently if we have two similar types with implicit_const attributes and different values we end up with only one abbrev in .debug_abbrev section. For example consider two structures: S1 with implicit_const attribute ATTR and value VAL1 and S2 with implicit_const ATTR and value VAL2. The .debug_abbrev section will contain only 1 related record: [N] DW_TAG_structure_type DW_CHILDREN_yes DW_AT_ATTR DW_FORM_implicit_const VAL1 // .... However it looks like we need to have two different abbreviations...
2004 Feb 27
1
Outer with Three Vectors
Hello, outer() is great for avoiding things like: for (val1 in val1s) { for (val2 in val2s)) { x[i,j] <- somefunction(val1, val2) } } The same can be obtained with: outer(val1s, val2s, somefunction) But what if there are three (or more) sets of values to loop over? Any way of avoiding the loops then? Thanks, -- Wolfgang Viechtbauer
2006 Oct 19
2
Getting group size in a data frame
...a NA for a measurement and sometimes the animal died, resulting in NA for all measurements. I have several groups of animals. How do I find the size of each group with only alive animals? And how do I find the size of the groups for each measurement? An example: l1 <- list(factor=c(24,24,24), val1=c(2, 3, NA), val2=c(4, NA, NA)) df <- as.data.frame(l1) df$factor <- factor(df$factor) The size of factors should be 2 and not 3. The number of measurement in val1 should be 2 and the number of measurements in val2 should be 1 Thanks in advance for any help and suggestions Ulrik [[altern...
2009 Feb 17
4
joining "one-to-many"
...butes at that location. The second table has the same locations, but only once with a different set of attributes. I would like to add the second set of attributes to the first table. Example: set.seed <- 123 loc <- c(rep("L1", 3), rep("L2", 5), rep("L3", 2)) val1 <- round(rnorm(10),2) val2 <- c("a", "b", "c", "a", "b", "d", "f", "e", "b", "e") t1 <- data.frame(loc, val1, val2) t2 <- data.frame(loc=c("L1","L2","L3"), v...
2016 Feb 08
2
Memory Store/Load Optimization Issue (Emulating stack)
...%foo, i32 %bar, i32 %sp) { ; push foo (On "stack") %sp_1 = sub i32 %sp, 4 %sp_1_ptr = inttoptr i32 %sp_1 to i32* store i32 %foo, i32* %sp_1_ptr, align 4 ; push bar %sp_2 = sub i32 %sp_1, 4 %sp_2_ptr = inttoptr i32 %sp_2 to i32* store i32 %bar, i32* %sp_2_ptr, align 4 ; val1 = pop (val1 = bar) %sp_3_ptr = inttoptr i32 %sp_2 to i32* %val1 = load i32, i32* %sp_3_ptr, align 4 %sp_3 = add i32 %sp_2, 4 ; val2 = pop (val2 = foo) %sp_4_ptr = inttoptr i32 %sp_3 to i32* %val2 = load i32, i32* %sp_4_ptr, align 4 %sp_4 = add i32 %sp_3, 4 %ret_1 = insertvalue { i...
2007 Dec 06
3
Setting Multiple Values via func_odbc ...?
...just stick with MySQL, but that's a pain in the ass because the asterisk-addons package has no default rpm spec file for building an RPM. I had something like this in func_odbc.conf: [VOX_LOG_CALL_LEG] dsn=MySQL write=INSERT into CallLog (Source,IDDCode,AreaCode,ProviderId,SIPReply) values (${VAL1},${VAL2},${VAL3},${VAL4},${VAL5}) but it doesn't like it. In order for this to work, I'd have to have several LOG_CALL_LEG functions, each taking one parameter, and then requiring several database updates! Doug. _________________________________________________________________...