similar to: sample() fails with double or integer NA input of length one

Displaying 20 results from an estimated 6000 matches similar to: "sample() fails with double or integer NA input of length one"

2023 Nov 08
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
So, to summarize, the open questions are: (1) Should as.complex(NA_character_) give complex(r=NA_real_, i=0) instead of NA_complex_? (2) Should the first argument in c(NA, x) and c(NA_integer_, x), where typeof(x) == "complex", be promoted to complex(r=NA_real_, i=0) instead of NA_complex_? My opinions: (1) No. The imaginary part of the
2023 Nov 06
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
Hmm, it is not actually at odds with help(c), it is just that the autocoercion works different that it used to, so that as.complex(NA) == as.complex(NA_real) == NA_real_+0i) which now differs from NA_complex although both print as NA. I haven't been quite alert when this change was discussed, but it does look a bit unfortunate that usage patterns like c(NA, 0+1i) does not give complex NA
2023 Nov 09
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
>>>>> Mikael Jagan >>>>> on Wed, 8 Nov 2023 11:13:18 -0500 writes: > So, to summarize, the open questions are: > (1) Should as.complex(NA_character_) give complex(r=NA_real_, i=0) > instead of NA_complex_? > (2) Should the first argument in c(NA, x) and c(NA_integer_, x), > where typeof(x) == "complex", be promoted
2023 Apr 14
1
Possible inconsistency between `as.complex(NA_real_)` and the docs
Hi all, Surprisingly (at least to me), `as.complex(NA_real_)` results in `complex(real = NA_real_, imaginary = 0)` rather than `NA_complex_`. It seems to me that this goes against the docs of `as.complex()`, which say this in the Details section: "Up to R versions 3.2.x, all forms of NA and NaN were coerced to a complex NA, i.e., the NA_complex_ constant, for which both the real and
2013 Dec 12
2
Status of reserved keywords and builtins
According to http://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words if else repeat while function for in next break TRUE FALSE NULL Inf NaN NA NA_integer_ NA_real_ NA_complex_ NA_character_ ... ..1 ..2 etc. are all reserved keywords. However, in R 3.0.2 you can do things like: `if` <- function(cond, val1, val2) val2 after which if(TRUE) 1 else 2 returns 2.
2023 Nov 06
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
>>>>> Michael Chirico >>>>> on Sun, 5 Nov 2023 09:41:42 -0800 writes: > This is another follow-up to the thread from September > "Recent changes to as.complex(NA_real_)". > A test in data.table was broken by the changes for NA > coercion to complex; the breakage essentially comes from > c(NA, 0+1i) > # vs
2023 Nov 07
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
Thanks Martin. My hang-up was not on what the outcome of as.complex(NA) should be, but rather, how I should read code like c(x, y) generally. Till now, I have thought of it like 'c(x, y)' is c(as(x, typeof(y)), y)` when "type(y) > type(x)". Basically in my mind, "coercion" in R <-> as.<newtype>(.) (or coerceVector() in C). So I tracked down the source
2023 Nov 05
2
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
This is another follow-up to the thread from September "Recent changes to as.complex(NA_real_)". A test in data.table was broken by the changes for NA coercion to complex; the breakage essentially comes from c(NA, 0+1i) # vs c(as.complex(NA), 0+1i) The former is the output we tested against; the latter is essentially (via coerceVector() in C) what's generated by our
2009 Jun 03
1
Print bug for matrix(list(NA_complex_, ...))
In R 2.8.0 on Windows (tested both under ESS and under R Console in case there was an I/O issue) There is a bug in printing val <- matrix(list(NA_complex_,NA_complex_),1). > dput(val) structure(list(NA_complex_, NA_complex_), .Dim = 1:2) > print(val) [,1] [1,] [,2] [1,] Note that a large number of spaces are printed instead of NA. Compare the unproblematic real case:
2000 Apr 28
4
problem need help
I've installed the openss* rpm's from metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386 on a redhat 6.2 system. sshd is running but refuses all connections from all hosts including localhost. The client reports debug: Connection established. ssh_exchange_identification: Connection closed by remote host debug: Calling cleanup 0x8056160(0x0)
2015 Jan 29
2
Tinc and OpenWRT
On Tue, Jan 27, 2015, Sandy McArthur Jr wrote: > I use the Tinc 1.0 series since I don't want to support my > own packages. <snip> > I wrote most of http://wiki.openwrt.org/doc/howto/vpn.tinc and that is > what I still use. Since then . . . Ok. I think I'll start with the 1.0 series packages that are already out there and get them working. and on Tue, Jan 27, 2015,
2002 Mar 06
3
Win2000 - Very Slow opening files from Samba Share
Hello, I hope you can be of some assistance. I am using Samba 2.2.0 on SCO Open Server 5.0.5. I have a number of various clients on the Network eg Win 98 and Win 2000. My Unix Server is a PIII 1000, dual CPU computer with dual Raid 1 (mirroring disks) Samba is working well from the Win 98 Machines. However, from the Win 2000 machines when I try to open an Excel file from one of the Shared
2010 Mar 31
2
Should as.complex(NaN) -> NA?
I'm having trouble grokking complex NaN's. This first set examples using complex(re=NaN,im=NaN) give what I expect > Re(complex(re=NaN, im=NaN)) [1] NaN > Im(complex(re=NaN, im=NaN)) [1] NaN > Arg(complex(re=NaN, im=NaN)) [1] NaN > Mod(complex(re=NaN, im=NaN)) [1] NaN > abs(complex(re=NaN, im=NaN)) [1] NaN and so do the following > Re(complex(re=1,
2015 Jun 13
2
Tinc and OpenWRT
Hey Saverio, I'd really like the idea of a tinc-1.1-pre package for OpenWRT. I'm currently using tinc-1.1 with an Ed25519-only network, really like the new features and CLI and want to add some OpenWRT routers into the mix. How do you plan to handle things with OpenSSL? tinc-1.1 from git should be able to compile without it (but will then only support the built-in algorithms). Depending
2014 Jun 01
1
Tips punching through tight firewalls
Any tips or guidance on improving the probability of being able to connect to a Tinc daemon. I am currently on a guest wifi at a hospital for my in-laws family. Wanting to pass time and be semi productive, I tried to VPN back to my private networks but it appears the default port Tinc users is blocked. Here is what I know about their firewall:
2018 Jan 22
2
as.character(list(NA))
On 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,
2007 Jul 28
0
[LLVMdev] Web Site Re-Design
On Jul 27, 2007, at 7:04 PM, Gabriel McArthur wrote: > I offered to do the web site a couple of weeks ago. Life got in > the way temporarily, and it took me a long time to make it look the > way that I wanted and to make it look the same in IE6. Anyway, I > wanted to get some feedback on what I had done. Note to self/dumba**: include web site next time.
2006 Aug 24
1
smb.conf template homedir
For local login to our samba server, we are using posix information stored in an openldap directory. - I can log in via shell with no problems. We are authenticating samba against AD2003. I can attach to the samba server from both windows and macintosh - just not access my home directory. Currently, "template homedir = /home/%U" - which results in a path of /home/<username> I
2013 Aug 01
3
filefrag and btrfs filesystem defragment and maybe snapshots
While exploring some btrfs maintenance with respect to defragmenting I ran the following commands: # filefrag /path/to/34G.file /path/to/5.7G.file /path/to/34G.file: 2406 extents found /path/to/5.7G.file: 572 extents found Thinking those mostly static files could be less fragmented I ran: # btrfs filesystem defragment -c /path/to/34G.file # btrfs filesystem defragment -c /path/to/5.7G.file and
2015 Oct 21
1
Confusing print method for Inf dates
x <- as.Date(Inf, origin = "1970-01-01") x #> [1] NA str(x) #> Date[1:1], format: NA unclass(x) #> [1] Inf It's not clear what the correct behaviour is. The documentation for ?Date has: "It is intended that the date should be an integer,", which suggests that -Inf and Inf are not valid dates. But if that's true the behaviour for max.Date() needs some