[R] using a package function inside another function

Alison Callahan alison.callahan at gmail.com
Thu Oct 7 17:47:01 CEST 2010


Hello all,

I am trying to use the micEcon 'insertRow' function inside a function
I have written. For example:

insert_row_test <- function(m){

  insertRow(m,nrow(m)+1,v=0,rName="test")

}

However, when I try to call the 'insert_row_test' function (after
loading the micEcon package), it does not insert a row into the matrix
I pass in. When I call the insertRow function exactly as above in the
R console, it works with no problem.

Can anyone tell me why this is, and how to fix this problem?

Thank you!

Alison Callahan
PhD candidate
Department of Biology
Carleton University



More information about the R-help mailing list