search for: cplx

Displaying 13 results from an estimated 13 matches for "cplx".

Did you mean: cpl
2015 Oct 07
3
read.table reads "i" as NA_complex_
I just noticed that read.table() and type.convert() interpret the string "i" as a missing value of type complex. > str(read.table(text=c("i\ni\ni\ni\n"))) 'data.frame': 4 obs. of 1 variable: $ V1: cplx NA NA NA ... > str(type.convert("i")) cplx NA If there are other strings in the column it makes the column character so most people will not notice > str(read.table(text=c("i\nii\niii\niv\n"))) 'data.frame': 4 obs. of 1 variable: $ V1: Factor...
2015 Oct 16
1
[RFC V3 7/8] armv7, armv8: Optimize fixed point fft using NE10 library
Hi Timothy, Sorry for late reply. I have upstreamed the patch to fix the regression here: https://github.com/projectNe10/Ne10/commit/ee5d856cd9cb8c4a15ace567df4239f4e788d043 I have tested it with Vish's branch: http://git.linaro.org/people/viswanath.puttagunta/opus.git/shortlog/refs/heads/rfcv3_fft_fixed) Both unit test dft and unit test mdct passed on ARM v7/v8, floating point/fixed
2008 Jun 03
3
matlab eigs function in R
Hello Does anybody know how one can compute d largest eigenvalues/eigenvectors in R, like in MATLAB eigs function ? eigen function computes all eigenvectors/eigenvalues, and they are slightly different than those generated by matlab eigs. Thanks in advance -- View this message in context: http://www.nabble.com/matlab-eigs-function-in-R-tp17619641p17619641.html Sent from the R help mailing list
2005 Oct 09
0
all.equal() improvements (PR#8191)
...rget) != data.class(current)) { + msg <- c(msg ,paste("target is ", data.class(target), ", current is ", + data.class(current), sep = "")) + return(msg) + } + lt <- length(target) lc <- length(current) cplx <- is.complex(target) - if(lt != lc) - return(paste(if(cplx)"Complex" else "Numeric", - ": lengths (", lt, ", ", lc, ") differ", sep = "")) + if(lt != lc) { + msg <- c(msg ,paste(if(cplx)"Complex...
2012 Nov 09
4
as.data.frame(do.call(rbind,lapply)) produces something weird
The following code: --8<---------------cut here---------------start------------->8--- > myfun <- function (x) list(x=x,y=x*x) > z <- as.data.frame(do.call(rbind,lapply(1:3,function(x) c(a=paste("a",x,sep=""),as.list(unlist(list(b=myfun(x),c=myfun(x*x*x)))))))) > z a b.x b.y c.x c.y 1 a1 1 1 1 1 2 a2 2 4 8 64 3 a3 3 9 27 729
2015 Oct 07
0
read.table reads "i" as NA_complex_
...t;wdunlap at tibco.com> wrote: > > I just noticed that read.table() and type.convert() interpret the string "i" > as a missing value of type complex. >> str(read.table(text=c("i\ni\ni\ni\n"))) > 'data.frame': 4 obs. of 1 variable: > $ V1: cplx NA NA NA ... >> str(type.convert("i")) > cplx NA > > If there are other strings in the column it makes the column character so > most people will not notice >> str(read.table(text=c("i\nii\niii\niv\n"))) > 'data.frame': 4 obs. of 1 va...
2014 Jan 19
1
formals() adds 0 to complex function arguments
Dear list, I'm facing an issue with the automated documentation of a function using roxygen2. The function has a complex-valued default argument, which is picked up by roxygen2 using formals() to generate the corresponding Usage section of the Rd file. Unfortunately, it appears that formals() reformats complex numbers. Consider the example below, test <- function(a = 1+2i){} >
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
2018 Feb 24
3
include
On 24/02/2018 1:53 PM, William Dunlap via R-help wrote: > x1 = rbind(unique(preval),mydat) > x2 <- x1[is.na(x1)] <- 0 > x2 # gives 0 > > Why introduce the 'x2'? x1[...] <- 0 alters x1 in place and I think that > altered x1 is what you want. > > You asked why x2 was zero. The value of the expression > f(a) <- b > and assignments
2019 Aug 29
2
Complex proposal v2
...y be casted to other complex types: c32 %res = fptrunc c64 %a to c32 c64 %res = fpext c32 %a to c64 insertvalue and extractvalue may be used with the special index values "real" and "imag": %real = f32 extractvalue c32 %a, real %real = c64 insertvalue c64 undef, f64 %r, real %cplx = c64 insertvalue c64 %real, f64 %i, imag The pseudo-value "real" shall evaluate to the integer constant zero and the pseudo-valid "imag" shall evaluate to the integer constant one, as if extractvalue/insertvalue were written with 0/1. The use of any other index with a complex...
2009 Dec 16
2
What is the fastest way to see what are in an RData file?
Currently, I load the RData file then ls() and str(). But loading the file takes too long if the file is big. Most of the time, I only interested what the variables are in the the file and the attributes of the variables (like if it is a data.frame, matrix, what are the colnames/rownames, etc.) I'm wondering if there is any facility in R to help me avoid loading the whole file.
2019 Oct 22
4
Complex proposal v3 + roundtable agenda
...ecialness is allowing bitcasts of vector of complex to equal-width vectors of their underlying type. insertvalue and extractvalue may be used with the special index values "real" and "imag": %real = f32 extractvalue c32 %a, real %real = c64 insertvalue c64 undef, f64 %r, real %cplx = c64 insertvalue c64 %real, f64 %i, imag The pseudo-value "real" shall evaluate to the integer constant zero and the pseudo-valid "imag" shall evaluate to the integer constant one, as if extractvalue/insertvalue were written with 0/1. The use of any other index with a complex...
2020 Nov 12
0
Complex proposal v3 + roundtable agenda
...f complex to equal-width > vectors of their underlying type. > > insertvalue and extractvalue may be used with the special index values "real" > and "imag": > > %real = f32 extractvalue c32 %a, real > %real = c64 insertvalue c64 undef, f64 %r, real > %cplx = c64 insertvalue c64 %real, f64 %i, imag > > The pseudo-value "real" shall evaluate to the integer constant zero and the > pseudo-valid "imag" shall evaluate to the integer constant one, as if > extractvalue/insertvalue were written with 0/1. The use of any other...