Displaying 3 results from an estimated 3 matches for "101x1000".
2012 Nov 19
6
loop to subtract arrays / error
...csv", header = TRUE, sep =",") # see
> data below
> Vobsr <- as.matrix(Vobsr[,-1]) # remove column 1 from analysis thus Vobsr
> is 101x1 double matrix (column 1 is date information)
> Vsimr <- as.matrix(Vsimr[,-1]) # remove column 1 from analysis thus Vsimr
> is 101x1000 double matrix (column 1 is date information)
> Vobsr - Vsimr
Error in Vobsr - Vsimr : non-conformable arrays
Thus I attempted to create the loop below to perform the subtraction
operation for each of the 1000 columns.
> dim(Vsimr)[2]
[1] 1000
> for (i in 1:dim(Vsimr)[2]) {
Xjj <...
2012 Nov 28
1
how to keep all zeros in 1st row (not NA)
...moved, but the row headers are the numbers 1 to 1000 and they will remain
in the matrix.
In the previous post I mentioned that R makes the 1000 columns and the 101
rows into a "101x0 character matrix" once I removed the 1st column "Time
(day)". Instead I want this to be a "101x1000 double matrix".
What needs to be done to make the .csv into a double matrix rather than a
character matrix when the first row is all zeros (0s)?
Thank-you.
Irucka Embry
This is the code that I am using:
Input <- as.matrix(read.csv("Input_Parameter.csv", header = TRUE, sep =...
2012 Nov 18
0
subtract multiple columns from single column for Nash Sutcliffe efficiency
...v("1000Samples_Vsim.csv", header = TRUE, sep =",") # see
data below
Vobsr <- as.matrix(Vobsr[,-1]) # remove column 1 from analysis thus Vobsr is
101x1 double matrix (column 1 is date information)
Vsimr <- as.matrix(Vsimr[,-1]) # remove column 1 from analysis thus Vsimr is
101x1000 double matrix (column 1 is date information)
How can I subtract each row in "Vsimr" from each row in "Vobsr" (Vobsr -
Vsimr)? That is the problem that I am having that keeps me from using the
following code below for NSE (Nash-Sutcliffe efficiency):
NSE(Vobsr,Vsimr)
NSE = 1 -...