3

I am trying to edit the R 'nnet' package. I have done some poking around, but am unfamiliar enough with R itself so as to not be able to make any headway.

I have tried trace("nnet", edit=TRUE), as outlined in a previous post here. This results in the editor being opened and displaying:

       function (x, ...) 
       UseMethod("nnet")

I'm not entirely sure what to do with this...

I've also found that it is part of the "VR Bundle"; it has been suggested here that the source bundle be opened to view the code, but don't know a) how to go about doing this or b) if that would achieve anything as I would then need to modify and run the code..

My goal is to add/modify a parameter minIt that would insure a minimum number of epochs be achieved prior to termination of the training.

Thanks!

Community
  • 1
  • 1
DMML
  • 1,422
  • 4
  • 22
  • 39
  • 1
    You can look at the methods: `methods(nnet)` and search for `[].formula`. –  Jul 23 '14 at 06:02
  • @Pascal I get: `Warning message: '.find.package' is deprecated. Use 'find.package' instead. See help("Deprecated") ` Thanks for taking the time, by the way! – DMML Jul 23 '14 at 06:05
  • I don't. Did you use the same command? –  Jul 23 '14 at 06:07
  • @Pascal Apologies. I added in quotes. I get: `[1] nnet.default nnet.formula` – DMML Jul 23 '14 at 06:08
  • So you've got it. You can `edit(nnet.formula)`. –  Jul 23 '14 at 06:09
  • @Pascal Bam! Thanks! `trace("nnet.default", edit=TRUE)` works as well! Post as a solution and I will mark it as solved. Thanks for your help! – DMML Jul 23 '14 at 06:11

1 Answers1

4

You can use:

methods(nnet)
[1] nnet.default nnet.formula

edit(nnet.formula)

As well as

trace("nnet.default", edit=TRUE)