Displaying 4 results from an estimated 4 matches for "lglvec".
Did you mean:
lglew
2018 Jan 22
2
as.character(list(NA))
...n 01/20/2018 08:24 AM, William Dunlap via R-devel wrote:
> I believe that for a list as.character() applies deparse() to each element
> of the list. deparse() does not preserve NA-ness, as it is intended to
> make text that the parser can read.
>
>> str(as.character(list(Na=NA, LglVec=c(TRUE,NA),
> Function=function(x){x+1})))
> chr [1:3] "NA" "c(TRUE, NA)" "function (x) \n{\n x + 1\n}"
>
This really comes as a surprise though since coercion to all the
other atomic types (except raw) preserve the NAs.
And also as.character(unlist(li...
2018 Jan 20
3
as.character(list(NA))
As of R Under development (unstable) (2018-01-19 r74138):
> as.character(list(NA))
[1] "NA"
> is.na(as.character(list(NA)))
[1] FALSE
2018 Jan 22
1
as.character(list(NA))
...m Dunlap via R-devel wrote:
> > I believe that for a list as.character() applies deparse() to each
> element
> > of the list. deparse() does not preserve NA-ness, as it is intended to
> > make text that the parser can read.
> >
> >> str(as.character(list(Na=NA, LglVec=c(TRUE,NA),
> > Function=function(x){x+1})))
> > chr [1:3] "NA" "c(TRUE, NA)" "function (x) \n{\n x + 1\n}"
> >
>
> This really comes as a surprise though since coercion to all the
> other atomic types (except raw) preserve the NAs.
>...
2018 Jan 22
0
as.character(list(NA))
...n 01/20/2018 08:24 AM, William Dunlap via R-devel wrote:
> I believe that for a list as.character() applies deparse() to each element
> of the list. deparse() does not preserve NA-ness, as it is intended to
> make text that the parser can read.
>
>> str(as.character(list(Na=NA, LglVec=c(TRUE,NA),
> Function=function(x){x+1})))
> chr [1:3] "NA" "c(TRUE, NA)" "function (x) \n{\n x + 1\n}"
>
This really comes as a surprise though since coercion to all the
other atomic types (except raw) preserve the NAs.
And also as.character(unlist(li...