similar to: "Error : requires numeric/complex matrix/vector arguments‏"

Displaying 20 results from an estimated 100000 matches similar to: ""Error : requires numeric/complex matrix/vector arguments‏""

2013 Oct 20
3
Errore : requires numeric/complex matrix/vector arguments
Dear R users,I'm a new user of R. I'm trying to do a LM test an there is this type of error: Error in t(mX) %*% mX : requires numeric/complex matrix/vector arguments. To be clear I write down the code in which mY ( 126,1 ) mX (126,1) mZ(126,1) are matrix. LMTEST <- function(mY, mX, mZ)#mY, mX, mZ must be matrices!#returns the LM test statistic and the degree of freedom{iT =
2019 Mar 01
0
Bug: as.matrix.data.frame() treats numeric vectors with "levels" attribute as factors
Hello, I think I've found a bug in as.matrix.data.frame().? The function's documentation says: "The method for data frames will return a character matrix if there is only atomic columns and any non-(numeric/logical/complex) column, applying as.vector to factors and format to other non-character columns. Otherwise, the usual coercion hierarchy (logical < integer < double
2008 May 21
1
split character string in matrix into character vector and numeric vector
Hello, I've got a matrix consisting of one column with n rows. Each field in the matrix is filled with a character vector. I would like to convert this matrix into a character vector containing the B03_MAH-type entries from the beginning of each row and a data.frame that contains the numeric data, but I am stuck. I have tried to use textConnection with sep = " " but since
2009 Jul 28
3
character vector -> numeric matrix ??
Dear R users... I'd like to change this character vector, "zz", zz <- c("12","56","89") to the following numeric matrix. [,1] [,2] [1,] 1 2 [2,] 5 6 [3,] 8 9 Actually, "zz" vector has a long length. Any comments will be greatly appreciated. Kathryn Lord -- View this message in context:
2011 Jan 05
4
Match numeric vector against rows in a matrix?
Two posts in one day is not a good day...and this question seems like it should have an obvious answer: I have a matrix where rows are unique combinations of 1's and 0's: > combs=as.matrix(expand.grid(c(0,1),c(0,1))) > combs Var1 Var2 [1,] 0 0 [2,] 1 0 [3,] 0 1 [4,] 1 1 I want a single function that will give the row index containing an exact match
2011 Aug 01
2
5 arguments passed to .Internal(matrix) which requires 7
Hello, I am having a problem with the function matrix. Specifically, when I pass three arguments (two more being instantiated in the function), I get the following error message: Error in matrix(0, 30, 10) : 5 arguments passed to .Internal(matrix) which requires 7 I looked into it, and someone has suggested that this may be the function from an old version of R. I recently changed my source
2006 Jan 11
1
complex matrix manipulation question
I've done stuff like this before but it's been a while and I'm stuck. Suppose I have a matrix with one column x and another column y and both are numeric and let the row index of the matrix be i Starting at index i ( i would equal on the first iteration ) when the cumulative sum of x_i+1 - x_i is greater than W = some constant, I want to mark that spot in the row, call it i^* and
2004 May 24
1
as.matrix.data.frame() in R 1.9.0 converts to character when it should (?) convert to numeric
Conversion of a data frame to a matrix using as.matrix() when a column of the data frame is POSIXt and all other columns are numeric has changed in R 1.9.0 from R 1.8.1. The new behavior issues a warning message and converts to a character matrix. In R 1.8.1, such an object was converted to a numeric matrix. Here is an example. #### R 1.9.0 #### > foo <- data.frame(
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){} >
2002 Feb 07
0
Gamma function for complex arguments
Hi everybody, unfortunately, the gamma function for complex arguments is not implemented in R (Base package). Are there any packages/functions or approximations to solve that problem? Thanks in advance, Matthias Dr. Matthias Fischer Friedrich-Alexander-Universit?t Erlangen-N?rnberg Lehrstuhl f?r Statistik und ?konometrie Lange Gasse 20 90403 N?rnberg Telefon: 0911 / 5302-271 Telefax: 0911
2004 Jan 08
0
gamma() function for complex arguments
Hello everyone before I reinvent the wheel, has anyone out there coded up the gamma() function for complex arguments? -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel +44(0)23-8059-7743 initialDOTsurname at soc.soton.ac.uk (edit in obvious way; spam precaution)
2010 Sep 05
4
converting string vector to integer/numeric vector
Hi, Is it possible to convert a string vector to integer or numeric vector? In my situation I receive data in a string vector and have to convert it based on a given type. -- Rajesh.J [[alternative HTML version deleted]]
2023 Apr 12
1
converting a character matrix into numeric....
Isn't this like trying to tie up the horse after it has left the barn? Why not figure all this out _before_ converting to xts? On April 12, 2023 12:29:49 PM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote: >Dear Rui, > Not working. I have entirely removed the column containing % but am still bootless: > >> head(coredata(INFYTX)) > INFY
2005 Dec 08
2
how to change a dataframe with characters to a numeric matrix?
hi netters, i have a dataframe TEST like this: Y1 Y2 Y3 X1 4 7 8 X2 6 2 Z X3 8 0 1 i would like to change it to a numeric matrix, replacing "Z" with NA Y1 Y2 Y3 X1 4 7 8 X2 6 2 NA X3 8 0 1 i've tried the function data.matrix but it didn't work. is there any easy way to do this? thanks a lot!
2013 Mar 21
2
Check if a character vector can be coerced to numeric?
Given an arbitrary set of character vectors: myvect1 <- c("abc","3","4") myvect2 <- c("2","3","4") I would like to develop a function that will convert any vectors that can be PROPERLY converted to a numeric (myvect2) into a numeric, but leaves character vectors which cannot be converted (myvect1) alone. Is there any simple way
2006 Jan 28
1
Complex Matrix Exponentials.
Hello, I was curious if there was a complex valued matrix exponential function available for R? I have some Laplace transforms of occupation times for a hidden Markov model. The matrix exponential function in the msm package does not seem to handle complex values. For example > MatrixExp(diag(1i,2)) [,1] [,2] [1,] 1 0 [2,] 0 1 Warning message: imaginary parts
2023 Apr 12
1
converting a character matrix into numeric....
Dear Rui, Not working. I have entirely removed the column containing % but am still bootless: > head(coredata(INFYTX)) INFY Historical Data INFY Historical Data INFY Historical Data INFY Historical Data [1,] "47.26" "44.28" "47.56" "44.28" [2,] "46.30" "44.92"
2011 Aug 03
4
Convert matrix to numeric
I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433",
2016 Mar 18
1
formatting of complex matrix
While working on the printing code, my colleague Zbyn?k ?lajchrt noticed that complex matrixes are sometimes misaligned: > { matrix(1i,2,13) } [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i [2,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i (the values in the last four columns
2006 Apr 19
0
Basic vector operations was: Function toapproximate complex integral
Yup, thanks, all . I tried outer but didn't sum the elements before I posted. Thanks -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Marc Schwartz (via MN) Sent: Wednesday, April 19, 2006 3:46 PM To: Doran, Harold Cc: r-help at stat.math.ethz.ch Subject: Re: [R] Basic vector operations was: Function toapproximate