search for: vsim

Displaying 2 results from an estimated 2 matches for "vsim".

Did you mean: vsi
2012 Nov 19
5
help on matrix column removal based on another matrix results
...> source("/home/ie/Documents/TTU/GA_Research/GLUE/R-Project/R_GLUE_Example/NSEr.R") NSEr <- function (obs, sim) { {jjh <- (as.vector(obs) - sim)^2 Xjjhs <- apply(Xjjh, 2, sum) Yii <- (obs - mean(obs))^2 Yiis <- apply(Yii, 2, sum) NSEr <- 1 - (Xjjhs/Yiis) } NSEr} > Vsim <- read.csv("1000Samples_Vsim.csv", header = TRUE, sep =",") > Vsim <- as.matrix(Vsim[,-1]) # remove column 1 from analysis > Vobs <- read.csv("Observed_Flow.csv", header = TRUE, sep =",") > Vobs <- as.matrix(Vobs[,-1]) # remove column 1...
2009 Mar 05
1
Using vectors of names in calls for functions
...1_P2_plot<-function(df, x, y, z) { ? ? ? ? ? ? ? ?pp<-ggplot(df, aes(x = x, y= y , z = z )) ? ? ? ? ? ? ? ?pp<-pp + geom_tile(aes(fill= z)) ? ? ? ? ? ? ? ?return(pp) ? ? ? ? ? ?} that would allow this type of call : j<-c("k", "l") i<-"m" m<-rnorm(25) vsim<-cbind(expand.grid(k=1:5, l=1:5*10), m) V1_P2_plot(df=vsim, x=j[1], y=j[2], z=i) This is obviously not working, and I understand from the numerous discussion on the R help list that this is related to references and calls. I spend the whole afternoon on these topics and it did not allowed me t...