Skip to content
Prev 248513 / 398506 Next

Need help with my homework

Dear Gaja,

Here are a couple suggestions:

1) Read the R posting guide (
http://www.r-project.org/posting-guide.html ).  There you will (would
have) find out that A) the R-help list is not for homework questions
and B) you will typically get more help if you show what you have
tried (e.g., your attempts to write the function) and had searched the
R-help archives.

2) Random walks are extremely common, if you search the R-help
archives, you will find several relevant examples.  Also, the Internet
is full of example code (plenty using R), that you could read to get
ideas (googling "random walk R code" turned up 426,000 results, with
several on the first page that looked useful).

3) Homework is meant to be a learning exercise for the person to whom
it was assigned, not for experts who already know what to do.  Now you
might say, "I am planning on learning from your examples and doing
additional practice", in which case see number 4.

4) I am sure your instructor did not assign this homework unless he or
she already knew how to do it, so if it is okay for you to see and
work off of someone else's example code, then why not talk with your
instructor about getting a sample?

5) Suppose your instructor expects you to do this on your own, but you
would rather have someone else do it for you.  You can probably find
someone willing, but then you need to practice how you phrase your
request for help.  For example, "I am doing research in ____________
and it uses random walks.  I know how to do this in Python (or some
other programming language), but I am having trouble implementing it
in R code, which I want to do because R has the most beautiful graphs
(flattery never hurts when you're asking for a favor).  II have this
algorithm (insert some statistical algorithm for how your random walk
will work, possibly directly copied from a HW assignment or other
book).  Any suggestions?"  If you phrased your question like that, we
could respond with complete solution code, while still feeling good
about ourselves, and not like we'd just helped someone cheat, or
contributed to you not gaining the most possible benefit from your
class (which you are probably paying for), thus, in essence, cheating
you out of your money's value, and the institution out of it's good
name (when you have passed the course but lack the actual knowledge).

So, in summary try (in order):

(re)Reading your lecture note, textbook, or ... and just spending the
time to learn it yourself. Searching the R-help archives (
http://finzi.psych.upenn.edu/search.html ). Searching Google (rule 5
states: "there exists code of it", in this case even in your desired
programming language).  Going to your instructor and asking for help
(crazy, I know).  Asking us in a way that we can pretend it is not
homework and feel like we are contributing to science (or possibly
small orphaned pets).

Best of luck with whatever option you try (I would particularly love
to see an example of how writing some random walk code for you would
help orphaned pets)

Cheers!

Josh
On Wed, Jan 26, 2011 at 1:06 PM, gaja <gajahorvat at hotmail.com> wrote: