Journaling on estrip is free and easy. get started today

Last Visit 2018-05-04 21:42:20 |Start Date 2007-04-01 15:09:25 |Comments 9,860 |Entries 1,012 |Images 1,430 |Sounds 30 |SWF 1 |Videos 221 |Mobl 27 |

Category: r statistics

11/14/11 03:09 - ID#55510

Where is R installed on Linux?

Simple yet frustrating question for those who want to view the code behind the base functions.

whereis R

Turns out R on linux is installed in the following directory structures:
  • /usr/bin/R : this is the executable binary
  • /usr/lib64/R


bin COPYING etc include lib library modules NEWS NEWS.pdf SVN-REVISION
  • /usr/include/R


Rconfig.h Rembedded.h R.h Rinternals.h Rversion.h
Rdefines.h R_ext Rinterface.h Rmath.h S.h
  • /usr/share/R


encodings java library licenses locale make R sh texmf
  • /usr/share/man/man1/R.1.gz : possibly the manual pages
print addComment

Permalink: Where_is_R_installed_on_Linux_.html
Words: 100
Last Modified: 11/14/11 03:18

Category: r statistics

10/26/11 10:41 - ID#55380

Writing Functions in R: Part 2

I skipped all the in-between bits of writing functions. Maybe I will return to them in the future.

But for now, I think it's super important to know how to apply a function once I have written it using what else but...

  • The output of Apply can be a vector or array or list of values
  • The input of Apply is always a matrix. So make sure to insert a "as.matrix" before anything you want to apply your function on.

Basic syntax:

apply(as.matrix(some object which is not a matrix already), Starting Row, function)

For eg.
Out <- apply(as.matrix(list of element), 1, function)
print addComment

Permalink: Writing_Functions_in_R_Part_2.html
Words: 113
Last Modified: 10/26/11 10:43

Category: r statistics

10/24/11 07:21 - ID#55372

Writing Functions in R: Part I

I have been learning how to write functions in R. They are core to learning the language instead of just using what other people have written for their purposes. They make tailored manipulations in R easier. I am going to document the function writing system here, step by step so I can progressively write better functions and yet not forget the basics

Basic Syntax

NewFunction <- function (input){
answer <- some manipulation with the input

  • NewFunction is the name of the new function.
  • function is the R function that creates functions.
  • input is the "argument" of a function
  • { delimits the beginning of the function
  • } delimits the end of the function
  • the last statement (in this case, just "answer", returns the answer as the output of the function. I could also have said return(answer).

print addComment

Permalink: Writing_Functions_in_R_Part_I.html
Words: 139
Last Modified: 10/24/11 07:26



New Site Wide Comments

joe said to mike
New years resolution to top (e:strip)?...

twisted said to twisted
Oh yeah, that works! I'll update my inlinks tomorrow. Thanks!...

paul said to twisted
Oh wow, long time no see - we should catch up. This site needs some serious updating. I think the ...

mike said to mike
Well really I did not bury the hatched in my mind I guess because now 5 years later, I just saw him ...