Displaying 16 results from an estimated 16 matches for "new_var".
Did you mean:
new_val
2010 Mar 30
2
Create a new variable
...vanced
aspects of R!
I have some data that looks like this:
Out Country1 Country 2 Country 3 ... CountryN
1 1 1 1 1
0 1 1 0 1
1 1 0 1 0
I want to create a new variable that counts the number of zeros in every
row whenever Out is equal to 1, and else it is a zero, so it would look
like this:
new_var
0
0
2
I have tried the following:
for (i in length(Out)){
if (Out == 1) {new_var <- sum(dat[i,] != 1)}
else {new_var <- 0}
}
but this gives me an error message.
Best, Thomas
2010 Oct 04
3
take input and store in variable
I am using a context to change values in a DB. Currently in my context, I
am passing it to
exten => s,1,WaitExten(7) ; 7 seconds to input
exten => s,n,Set(NEW_VAR=${EXTEN}) ;Here is my problem. This is the only
way I know how to 'grab' user input, which was normally from ${EXTEN} but
I realize this won't work for extension 's'......
The short google search I did didn't turn up anything concrete.
Thank you!
-Tom
2020 Apr 08
0
[PATCH nbdkit v3] tmpdisk: Pass any parameters as shell variables to the command.
...0) {
+ nbdkit_error ("'disk' parameter cannot be set on the command line");
+ return -1;
}
+
+ /* Any other parameter will be forwarded to a shell variable. */
else {
- nbdkit_error ("unknown parameter '%s'", key);
- return -1;
+ struct var *new_var;
+
+ new_var = malloc (sizeof *new_var);
+ if (new_var == NULL) {
+ perror ("malloc");
+ exit (EXIT_FAILURE);
+ }
+
+ new_var->next = NULL;
+ new_var->key = key;
+ new_var->value = value;
+
+ /* Append it to the linked list. */
+ if (vars == NULL...
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
V4 was here (incorrectly versioned on the mailing list as v3):
<http://mid.mail-archive.com/20230323121016.1442655-1-lersek at redhat.com>.
See the Notes section on each patch for the v5 updates.
Laszlo Ersek (2):
socket activation: generalize environment construction
socket activation: set LISTEN_FDNAMES
Richard W.M. Jones (2):
common/include: Copy ascii-ctype functions from nbdkit
2020 Apr 08
2
[PATCH nbdkit v3] tmpdisk: Generalize the tmpdisk plugin.
v2 was here:
https://www.redhat.com/archives/libguestfs/2020-April/msg00075.html
In v3:
- Add [VAR=VALUE ...] to manual.
- Various minor improvements to the manual.
- Work (at least, in theory - not tested) with block devices or
symlinks. I didn't document this because it's hard to ensure these
files or block devices would be cleaned up, so here be dragons.
- Remove O_NOCTTY.
-
2008 Oct 31
0
[PATCH][cfq-cgroups] Interface for parameter of cfq driver data
...STORE_FUNCTION
+static ssize_t
+cfq_cgroup_var_show2(unsigned int var, char *page)
+{
+ return snprintf(page, PAGE_SIZE, "%d\n", var);
+}
+
+static ssize_t
+cfq_cgroup_var_store2(unsigned int *var, const char *page, size_t count)
+{
+ int err;
+ char *p = (char *) page;
+ unsigned long new_var;
+
+ err = strict_strtoul(p, 10, &new_var);
+ if (err)
+ count = 0;
+
+ *var = new_var;
+
+ return count;
+}
+
+#define SHOW_FUNCTION2(__FUNC, __VAR, __CONV) \
+static ssize_t __FUNC(elevator_t *e, char *page) \
+{ \
+ struct cfq_data *cfqd = e->elevator_data; \
+ struct cfq_...
2017 Sep 08
1
nested loop
i have a vector containing values ranging from 0 to 24
i want to create another variable which can categorize those values like
this
please help me with an R code
Thanks
*Value New_Var*1 0 -5
3 0 -5
5 0 -5
9 6-10
7 6-10
5 6-10
4 0-5
11 11-15
12 11-15
18 16-20
23 21 -25
--
hemantsain.com
[[alternative HTML version deleted]]
2013 Jan 24
2
[LLVMdev] llvm alloca dependencies
> I tried methods related to point 1) suggested by you,
> but I still have problems of finding dependencies.
> What exactly I want to do:
>
> I have a chain like : Alloca -> Load(1) -> ... -> Computation
> where the variable might be changed -> Store(new_var) -> ... -> Load(n)
Your example is not very clear.
I don't understand what's involved in the "chain".
> Computation where the variable is changed = means that :
> I might have Alloca(a), c=a+7000*b[32], Load(c)...ICMP(c, ...)
>
> I want to get the correspondin...
2020 Aug 14
2
[PATCH nbdkit] New ondemand plugin.
...s the disk name to the command.
+ */
+ else if (strcmp (key, "disk") == 0) {
+ nbdkit_error ("'disk' parameter cannot be set on the command line");
+ return -1;
+ }
+
+ /* Any other parameter will be forwarded to a shell variable. */
+ else {
+ struct var *new_var;
+
+ new_var = malloc (sizeof *new_var);
+ if (new_var == NULL) {
+ perror ("malloc");
+ exit (EXIT_FAILURE);
+ }
+
+ new_var->next = NULL;
+ new_var->key = key;
+ new_var->value = value;
+
+ /* Append it to the linked list. */
+ if (vars == NULL...
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here:
<http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>.
See the Notes section on each patch for the v4 updates.
The series is nearly ready for merging: every patch has at least one R-b
tag, except "socket activation: avoid manipulating the sign bit".
The series builds, and passes "make check" and "make check-valgrind", at
2013 Jan 25
2
[LLVMdev] llvm alloca dependencies
...point 1) suggested by you,
> > but I still have problems of finding dependencies.
> > What exactly I want to do:
> >
> > I have a chain like : Alloca -> Load(1) -> ... -> Computation
> > where the variable might be changed -> Store(new_var) -> ... -> Load(n)
>
> Your example is not very clear.
> I don't understand what's involved in the "chain".
>
> > Computation where the variable is changed = means that :
> > I might have Alloca(a), c=a+7000*b[32], Load(c)...ICMP(c,...
2013 Jan 25
0
[LLVMdev] llvm alloca dependencies
...tried methods related to point 1) suggested by you,
> > but I still have problems of finding dependencies.
> > What exactly I want to do:
> >
> > I have a chain like : Alloca -> Load(1) -> ... -> Computation
> > where the variable might be changed -> Store(new_var) -> ... -> Load(n)
>
> Your example is not very clear.
> I don't understand what's involved in the "chain".
>
> > Computation where the variable is changed = means that :
> > I might have Alloca(a), c=a+7000*b[32], Load(c)...ICMP(c, ...)
> >
&g...
2013 Jan 25
0
[LLVMdev] llvm alloca dependencies
...by you,
>> > but I still have problems of finding dependencies.
>> > What exactly I want to do:
>> >
>> > I have a chain like : Alloca -> Load(1) -> ... -> Computation
>> > where the variable might be changed -> Store(new_var) -> ... ->
>> Load(n)
>>
>> Your example is not very clear.
>> I don't understand what's involved in the "chain".
>>
>> > Computation where the variable is changed = means that :
>> > I might have Alloca(a),...
2017 Sep 08
0
Nested loop R code
..., 8 Sep 2017 at 12:16 Hemant Sain <hemantsain55 at gmail.com> wrote:
> i have a vector containing values ranging from 0 to 24
> i want to create another variable which can categorize those values like
> this
> please help me with an R code
>
> Thanks
>
> *Value New_Var*1 0 -5
> 3 0 -5
> 5 0 -5
> 9 6-10
> 7 6-10
> 5 6-10
> 4 0-5
> 11 11-15
> 12 11-15
> 18 16-20
> 23 21 -25
>
>
> --
> hemantsain.com
>
[[alte...
2013 Jan 22
0
[LLVMdev] llvm alloca dependencies
On 1/21/13 5:22 AM, Alexandru Ionut Diaconescu wrote:
> Hello everyone !
>
> I am trying to determine for certain Load instructions from my pass
> their corresponding Alloca instructions (that can be in other previous
> blocks). The chain can be something like : `TargetLoad(var) -> other
> stores/loads that use var (or dependencies on var) -> alloca(var).` ,
> linked
2013 Jan 21
2
[LLVMdev] llvm alloca dependencies
Hello everyone !
I am trying to determine for certain Load instructions from my pass their
corresponding Alloca instructions (that can be in other previous blocks).
The chain can be something like : `TargetLoad(var) -> other stores/loads
that use var (or dependencies on var) -> alloca(var).` , linked on several
basic blocks. Do you know how can I do it?
I tried to use the methods from