[R] Translating a basic Python script into R

sun shine phaedrusv at gmail.com
Sun Dec 29 12:08:20 CET 2013


On 29/12/13 10:45, YuHong wrote:
>
> In my opinion, the best usages of Python and R should be for different 
> type of tasks respectively.  For example, Python is good for 
> automating miscellaneous tasks, while R is good for list data 
> processing and statistical modelling.  Therefore when you become more 
> familiar with Python and R, you shall not use the two for exactly the 
> same thing.
>
<snip>

That makes sense. The point I was trying to make really concerned the 
structure of conditional statements, as well as statements such as 
"print" and the declaration of the variables. I wasn't actually 
referring to any programming similarities. In any event, this opinion 
was made by someone with little experience in programming, so from the 
"outside" the similarities are more apparent probably than to someone 
with the more sophisticated awareness of the "inside" dissimilarities.

My original intent had been to use Meadows' models to try to get my hand 
in for modelling and since I know a (very) little about Python I started 
off with that, which gave me a rough idea of how I could approach such 
tasks, and it worked; R is something else I'd like to learn, so thought 
that I would try to do the same thing in R which is where I ran aground 
and hence was very appreciative of Ishta taking the time to demonstrate 
how to do such things in R.



More information about the R-help mailing list