.Rprofile file and .First function

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

.Rprofile file and .First function

markleeds
I am new to R ( and windows XP )  and am in the process of setting it up  I put an options (repos=http://.fhcrc.org") file in my .Rprofile file
and it works but that's all I put in and i don'tknow what to put in my .First function. I understand that .Rprofile is used for more general options
and .First for options specific to that working directory.

would someone mind to send me an example of a .Rprofile file and a .First function just so I can get an idea. Thanks a lot.


 
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: .Rprofile file and .First function

Gabor Grothendieck
There is some example code in ?Startup

On 5/12/06, MARK LEEDS <[hidden email]> wrote:

> I am new to R ( and windows XP )  and am in the process of setting it up  I put an options (repos=http://.fhcrc.org") file in my .Rprofile file
> and it works but that's all I put in and i don'tknow what to put in my .First function. I understand that .Rprofile is used for more general options
> and .First for options specific to that working directory.
>
> would someone mind to send me an example of a .Rprofile file and a .First function just so I can get an idea. Thanks a lot.
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: .Rprofile file and .First function

Robert Citek
In reply to this post by markleeds

On May 12, 2006, at 4:06 PM, MARK LEEDS wrote:
> would someone mind to send me an example of a .Rprofile file and  
> a .First function just so I can get an idea. Thanks a lot.

I don't have a .First function, but here's my .Rprofile:

# options for the interactive environment
options(prompt="\nR > ") ;
options(width=1000) ;
quit <- "To quit, type q()" ;
exit <- "To exit, type q()" ;
q <- "Almost there.  To quit, type q()" ;

# familiar aliases / functions
h <- function() {
   history(max.show = Inf)
} ;

printf <- function (...) {
   cat(sprintf(...)) ;
} ;

Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software.  Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: .Rprofile file and .First function

Robert Citek

On May 13, 2006, at 9:22 AM, MARK LEEDS wrote:
> thanks robert.

You're welcome, Mark.

> if tyou don't ind me asking,  what do those statements quit, exit  
> and q do in the .Rprofile function ? Thanks.

I tend to work in a lot of different environments, each with their  
own way of exiting.  If I type any of those three variables, they  
remind me of the correct way to exit the R environment.

Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software.  Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html