search for: myvar

Displaying 20 results from an estimated 153 matches for "myvar".

2008 Oct 20
5
Combining all possible values of variables into a new...
...and i get weird 'context overflow' errors. So I wonder if there is a more efficient way of doing this. For illustrational purposes, let's say i have: x<-c(1,0,0,1,0,0,1,0,0,1) y<-c(1,3,2,3,2,1,2,3,2,3) z<-c(1,2,1,2,1,2,1,2,1,2) d<-as.data.frame(cbind(x,y,z)) and i do: d$myvar <- ifelse(d$x == 0 & d$y==1 & d$z==1 , d$myvar <- 1, ifelse(d$x == 0 & d$y==1 & d$z==2 , d$myvar <- 2, ifelse(d$x == 0 & d$y==2 & d$z==1 , d$myvar <- 3, ifelse(d$x == 0 & d$y==2 & d$z==2 , d$myvar <- 4, ifelse(d$x == 0 & d$y==3 & d$z==1 , d$myv...
2016 Apr 06
2
LTO renaming of constants with inline assembly
...directives that limit their scope to > inline asm blocks. > > Specifically, we could teach the frontend to produce a mapping from symbol > names to globalvalues, for any internal names with the used attribute, and > attach that mapping to inline asm blocks. > > For example, if myvar were renamed to myvar.6, the IR would look like this: > > @myvar.6 = global i8 [...] > > [...] > > call asm("movzbl myvar(%rip), ...", ..., "myvar")(..., i8* @myvar.6) > > The backend would produce assembly that would look like this: > > .rename my...
2016 Apr 06
2
LTO renaming of constants with inline assembly
...name, the >> LTO linking will rename the second. However, the renaming doesn't propagate >> to inline assembly, resulting in the wrong output. >> >> For example, let's say we have two modules with inline assembly that >> writes a local constant var named "myvar" into the memory pointed to by its >> parameter "v", and a simple main that calls each function: >> >> $ cat inlineasm1.c >> static const unsigned char __attribute__((used)) __attribute__ ((aligned >> (1))) myvar = 1; >> >> void foo(unsigned...
2012 May 24
1
svychisq using two frames
...out how to do this across what is currently two data frames. I haven?t actually tried to run a svychisq with the two frames yet as I am waiting on the data for the second frame. I?m trying to plan out the logic ahead of time. So, let?s say I have survey design frame Year1 with variables Wt1 and MyVar, and survey design frame Year2 with variables Wt2 and MyVar ? remember the variable name is the same in both frames. My first inclination is that I would use a statement like: svychisq(~MyVar+MyVar, Year1+Year2, statistic=?Chisq?) However, it seems from reading the help files that I can only use...
2016 Apr 13
2
LTO renaming of constants with inline assembly
...bol renaming idea, but with directives that limit their scope to inline asm blocks. Specifically, we could teach the frontend to produce a mapping from symbol names to globalvalues, for any internal names with the used attribute, and attach that mapping to inline asm blocks. For example, if myvar were renamed to myvar.6, the IR would look like this: @myvar.6 = global i8 [...] [...] call asm("movzbl myvar(%rip), ...", ..., "myvar")(..., i8* @myvar.6) The backend would produce assembly that would look like this: .rename myvar, myvar.6 movzbl myvar...
2013 Mar 21
2
Howto create variable from the name of another one and get content of it
Hello, I have a variable created like ... Set(__myVar=${ARG1}) ... Set(__${myVar}STATUS=) If ARG1 is abcd, variable is abcdSTATUS and should be empty. This is OK. Now I would like to get the value of abcdSTATUS. How to do it? ${${myVar}STATUS}} isn't working, nor ${{myvar}STATUS} Thanks for any hint -- Daniel
2008 Mar 21
1
Problem with Makefile.win and environment variable
Dear all, When porting my package to WinXP I have the following problem: I need to create an environment variable "MYVAR=c:\mypath" which I have saved in the control panel "System->My Computer" (under the `Advanced' tab). I have two files which need to access MYVAR: config.win, Makefile.win While "config.win" does recognize MYVAR correctly, "Makefile.win" is not able to r...
2000 Dec 20
2
Names
...which have similar names. They have a common part and an extra unique part. I am sure I have seen questions on this before but I have been unable to find it in the archive. There are examples of sets of names for columns of a data frame, but not for individual vectors. Suppose I want vectors named myvar.1 myvar.2 etc. I tried: > as.name(paste("myvar","1",sep="."))<-1:10 Error: Target of assignment expands to non-language object But: > is.language(as.name(paste("myvar","1",sep="."))) [1] TRUE Any suggestions as to how to do thi...
2011 Jul 14
2
cbind in aggregate formula - based on an existing object (vector)
Hello! I am aggregating using a formula in aggregate - of the type: aggregate(cbind(var1,var2,var3)~factor1+factor2,sum,data=mydata) However, I actually have an object (vector of my variables to be aggregated): myvars<-c("var1","var2","var3") I'd like my aggregate formula (its "cbind" part) to be able to use my "myvars" object. Is it possible? Thanks for your help! Dimitri Reproducible example: mydate = rep(seq(as.Date("2008-12-01"), length...
2016 Apr 06
2
LTO renaming of constants with inline assembly
...ly referencing local constants with the same name, the LTO linking will rename the second. However, the renaming doesn't propagate to inline assembly, resulting in the wrong output. For example, let's say we have two modules with inline assembly that writes a local constant var named "myvar" into the memory pointed to by its parameter "v", and a simple main that calls each function: $ cat inlineasm1.c static const unsigned char __attribute__((used)) __attribute__ ((aligned (1))) myvar = 1; void foo(unsigned long int *v) { __asm__ volatile("movzbl myvar(%%ri...
2010 Oct 06
5
Create variable by name
Can one create a variable through a function by name createVariable <- function(name) { outputVariable = name name <- NULL } after calling createVariable("myVar") I would like to have a variable myVar initialized with NULL in my environment. Is this possible? Ralf
2006 May 03
2
Conditional statement style
This is a bit of a nuby question methinks but i''ve had a play/search around and it''s just bugging me now :0) Say I have a conditional statement, testing a variable against a number of values. The first way i did this is like so: if myvar != "" and myvar != 0 and myvar != nil # .. code end This seems a bit messy - is there neater way of doing this? I thought of: if myvar != ("" || 0 || nil) but ||, as i understand it, is a conditional assigner that causes the current value the fall through to the preceedin...
2007 Feb 14
2
Problem with a template file
...templates in Puppet. In my node declarations, i set (or not) some special variables to activate (or not) some part of my configuration. When i don''t need the configuration part, i don''t declare the variable. I then use something like this in my templates: ... <% if defined? myvar %> ... myvalue = <%= myvar %> ... <% end %> ... The problem is that it doesnt work with Puppet. If i don''t declare "myvar" in my node, the "if" part is not taken into account (this is the right behaviour). Buf if i try to use a "myvar" in my no...
2011 Mar 02
2
[1.4] Comparing value of string with spaces?
Hello I haven't found an example on how to compare the value of a string variable with spaces in it, and the While loop below never exits: ========== extensions.conf exten => start,n,Set(MYVAR="Dummy value") exten => start,n,NoOp(${MYVAR}) ;BAD TOO ;exten => start,n,While(!$[${MYVAR} : "Some string"]) exten => start,n,While($[${MYVAR} != "Some string"]) exten => start,n,Set(MYVAR="Some string") exten => start,n,EndWhile() ======...
2019 Dec 27
2
AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
Just trying out a node agi package (https://github.com/sergey12313/ts-agi/ , and it wasn't behaving as I expected, but when turning on agi debug, it looks like it might be Asterisk (using 17.1.0) This works as expected <Local/1000 at default-00000020;2>AGI Rx << SET VARIABLE myVar "Hello World!!!" <Local/1000 at default-00000020;2>AGI Tx >> 200 result=1 <Local/1000 at default-00000020;2>AGI Rx << GET VARIABLE myVar <Local/1000 at default-00000020;2>AGI Tx >> 200 result=1 (Hello World!!!) But GET FULL VARIABLE just returns the N...
2007 Jan 24
2
attr_accessor vs attr_accessible
Please guide me how to use those two methods. I can''t differentiate them. I was doing something on my model and I have put one field in the attr_accessible method. After that when I try to run the app the app always says my other fields are blank, but they''re all filled up. What''s wrong with it? Thanks --~--~---------~--~----~------------~-------~--~----~ You received
2013 Mar 25
2
ifelse can't return a list? Please explain (R-2.15.3)
...thods base other attached packages: [1] rockchalk_1.5.5.10 car_2.0-16 nnet_7.3-5 MASS_7.3-23 loaded via a namespace (and not attached): [1] compiler_2.15.3 tools_2.15.3 I realize I can code around this, but I'm just curious about why ifelse hates me so much :( > if (1) myvar <- list(a, b, c) else myvar <- list(x, y, z) > myvar [[1]] [1] 4 [[2]] [1] 5 [[3]] [1] 6 > myvar <- if (1) list(a, b, c) else list(x, y, z) > myvar [[1]] [1] 4 [[2]] [1] 5 [[3]] [1] 6 -- Paul E. Johnson Professor, Political Science Assoc. Director 1541 Lilac Lane, Roo...
2008 Sep 22
1
Deleting multiple variables
...nable to find one. Can anyone recommend a neat way of deleting multiple variable? I see, i need to use dataframe$VAR<-NULL to get rid of one variable, In my situation i need to delete all vars between two points. I've used the 'which' function to find these out and have assigned to myvar >myvars [1] 2 17 but i can't figure out how i should apply this? Should i loop through the values? (Psydo code below?) for (x in c(myvars[1]:myvars[2])) (M_UC$x<-NULL)) Any help gratful Mike [[alternative HTML version deleted]]
2011 Dec 12
2
[LLVMdev] GetElementPtr
For the gep: %idx1 = getelementptr i32* %MyVar, i32 0 i32* is the type that MyVar is pointing to and i32 is the type of the offset value, or what? If it's the type of offset value, then the size of the pointer shouldn't be less than i32, correct? The index is 0, so in this example, the address computation is idx1 = &MyVar+0. What...
2004 Nov 26
1
Coplot Given text
Greetings: I am unsuccessful in suppressing "Given : myvariable" from a coplot. There was such a question in the past but the thread breaks down. I am sure this is a "for dummies" question :-). I tried: coplot(myvar~myvar | myvar, show.given=FALSE, xlab="....", ylab="...", main=" ") and some other variations (i...