search for: zadig_1

Displaying 6 results from an estimated 6 matches for "zadig_1".

Did you mean: zadig
2017 Jun 15
0
is.null(mylist[1]) and is.null(mylist$a) returns different values
Hi, Try > is.null(mylist[[1]]) [1] TRUE Notice the double square brackets. From: ?`[` "The most important distinction between [, [[ and $ is that the [ can select more than one element whereas the other two select a single element." On Thu, Jun 15, 2017 at 11:33 AM, ce <zadig_1 at excite.com> wrote: > Hi > > I have a list : > > mylist <- list( a = NULL, b = 1, c = 2 ) > >> mylist[1] > $a > NULL > >> is.null(mylist[1]) > [1] FALSE > >> is.null(mylist$a) > [1] TRUE > > why? I need to use mylist[1] > ______...
2017 Jun 15
0
is.null(mylist[1]) and is.null(mylist$a) returns different values
...you all , very informative, never thought of doing a str( mylist[1] ) -----Original Message----- From: "Jeff Newmiller" [jdnewmil at dcn.davis.ca.us] Date: 06/15/2017 11:56 AM To: r-help at r-project.org, "Huzefa Khalil" <huzefa.khalil at umich.edu>, "ce" <zadig_1 at excite.com> Subject: Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values I find that the str function is more helpful for understanding the difference between a null list and a list containing a null list than the implicit print function call that the interpreter invoke...
2017 Jun 15
1
is.null(mylist[1]) and is.null(mylist$a) returns different values
...]]) >[1] TRUE > >Notice the double square brackets. > >From: ?`[` >"The most important distinction between [, [[ and $ is that the [ can >select more than one element whereas the other two select a single >element." > >On Thu, Jun 15, 2017 at 11:33 AM, ce <zadig_1 at excite.com> wrote: >> Hi >> >> I have a list : >> >> mylist <- list( a = NULL, b = 1, c = 2 ) >> >>> mylist[1] >> $a >> NULL >> >>> is.null(mylist[1]) >> [1] FALSE >> >>> is.null(mylist$a) >>...
2017 Jun 15
4
is.null(mylist[1]) and is.null(mylist$a) returns different values
Hi I have a list : mylist <- list( a = NULL, b = 1, c = 2 ) > mylist[1] $a NULL > is.null(mylist[1]) [1] FALSE > is.null(mylist$a) [1] TRUE why? I need to use mylist[1]
2013 Jun 16
4
can't install rugarch and nloptr packages in R 3.01 opensuse linux
I can't install rugarch package because installation of nloptr package fails . I use opensuse 12.3 # uname -a Linux candide 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux my gcc version is 4.8.1 I compiled and installed R 3.01 . then I tried to install rugarch package but it fails because it can't install depended package nloptr.
2014 Jul 12
0
lapply returns NULL ?
Dear all, I have a list of arrays : foo<-list(A = c(1,3), B =c(1, 2), C = c(3, 1)) > foo $A [1] 1 3 $B [1] 1 2 $C [1] 3 1 > if( foo$C[1] == 1 ) foo$C[1] > lapply(foo, function(x) if(x[1] == 1 ) x ) $A [1] 1 3 $B [1] 1 2 $C NULL I don't want to list $C NULL in the output. How I can do that ?