similar to: .Rprofile file and .First function

Displaying 20 results from an estimated 9000 matches similar to: ".Rprofile file and .First function"

2006 May 09
3
Using DBI and RMySQL
Dear All, I am having a bit of problem using the DBI and RMySQL package. I have already installed DBI but now I want to connect to MySQL. So how do I do it. The CRAN package repository does not have RMySQL windows binary to install from? Regards, Indrajit Sen Gupta Business Analyst Mu Sigma Business Solutions Pvt Ltd #21/1-1, Nawab Towers Cunningham Road Bangalore 560 052, India Tel: +91 80
2006 May 11
2
R more Unix-like?
Is there a way to stream data into R so that it can be used in a command pipe? Most Unix commands read data via standard input and read the script from the command line. For example: $ seq 1 10 | sed -e 's/^/foo /' $ seq 1 10 | awk '{print "foo " $1}' $ seq 1 10 | perl -lane 'print "foo $F[0]"' In contrast, R seems to read the script
2006 May 12
6
text plots?
Is there a way to do text plots in R? I'd like to do some simple XY plots in R with the output in text (ascii). For example, with gnuplot I can do the following: echo 'set terminal dumb ; plot sin(x)' | gnuplot To generate a simple sin wave. Since I connect to a remote Linux machine using SSH, being able to generate a rough idea of what a plot will look like in text would be
2006 May 04
3
SQL like manipulations on data frames
Is there a cheat-sheet anywhere that describes how to do SQL-like manipulations on a data frame? My knowledge of R is rather limited. But from my experience it seems as though one can think of data frames as being similar to tables in a database: there are rows, columns, and values. Also, one can perform similar manipulations on a data frame as one can on a table. For example:
2006 May 04
3
screen wrapping
Hello all, How can I increase/decrease the line length for screen wrapping? Currently when I run the following the output appears to wrap at just under 80 columns: > c(1:100) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 37 38 39 40 41 42 43 44 45 46 47 48 49
2006 May 05
5
large data set, error: cannot allocate vector
Why am I getting the error "Error: cannot allocate vector of size 512000 Kb" on a machine with 6 GB of RAM? I'm playing with some large data sets within R and doing some simple statistics. The data sets have 10^6 and 10^7 rows of numbers. R reads in and performs summary() on the 10^6 set just fine. However, on the 10^7 set, R halts with the error. My hunch is that
2006 May 10
1
help with writing output from two different arrays to two columns in an output file
Hi, I am very new to R and I have written the following block of code to generate a gamma distribution for variable x (which is an array) and a function "y" whose array values depend on the individual array values of "x". The code is as follows: n=1000 x=rgamma(n,1.5,2) y=vector("numeric",n) for (i in 1:n){ y[i]=(2937/50000*exp(-1/1000*x[i])/x[i]) } now I want to
2006 May 10
2
importing a list
Hi, all. I'm trying to automate some regression operations in R leaving the possibility to modify the predictors in the regression. For example, I have saved in a list the results and then exported as a txt file, in which we can modify the predictors, putting for example lm(y~x^2) instead of having lm(y~x) as in the original model. Now, I need to import in R the txt file as a list to
2006 May 16
2
split the data.frame
Dear R folks: I wonder anyone has a elegent way of doing what I need to do. I have a data frame called with four columns: V1, V2, A1 and A2: V1 V2 A1 A2 A B 1.2 2.0 A D 1.2 4.0 A C 2.4 2.2 What I need to do is to convert it into the following data frame with a new column x, where x is just the stacked up of A1 and A2 placed with respective V1 and V2 in the first two
2008 Jul 14
2
.First and .Rprofile won't run on startup
I'm trying to source a file automatically every time I start R. I tried adding the following .First function in a file Rprofile.site in my $R_HOME/etc/ directory (verified $R_HOME by Sys.getenv()) as well as in a file .Rprofile in my $HOME directory and .Rprofile in the working directory: .First <- function(){ source(file.path(Sys.getenv("HOME"), "R",
2008 May 02
2
.Rprofile is being executed twice
Hi, After updating to R 2.7, my .Rprofile executes twice on startup. I confirmed this by putting in the following line: print("starting .Rprofile...") When I start R, I see: [1] "starting .Rprofile..." [1] "starting .Rprofile..." This seems like the obverse of the following FAQ:
2013 Oct 03
1
When to use RProfile.site or .Rprofile
I would appreciate some advice on what the preferred contents of RProfile.site vs. .Rprofile should be. A .First() function can reside in either one, but is it preferred to place it in .Rprofile? I currently use .First() in .Rprofile files placed in separate directories used for different RStudio projects. Thank you [[alternative HTML version deleted]]
2006 Jan 04
1
R newbie configuration
I think I did enough reading on my Own about startup ( part of the morning And most of this afternoon ) to not feel uncomfortable asking for confirmation of my understanding of this startup stuff. Obviously, the startup process is more complicated Than below but, for my R newbie purposes, It seems like I can think of the startup process as follows : Suppose my home directory =
2012 Feb 23
1
R devel [and R 2.14.1 patched]: R CMD build now sources ~/.Rprofile
I'd like to follow up on this one. It may be that I have misunderstood something, but on both R devel (2012-02-22 r58452) and R 2.14.1 patched (2012-02-18 r58394) I can't seem to avoid loading ~/.Rprofile when I run 'R CMD <cmd>', e.g. R CMD build. For me, the loading of ~/.Rprofile by 'R CMD' started a few weeks ago, and I haven't seen it before. More details
2012 Mar 01
1
Execution of Rprofile.site
Hi everyone. I have recently installed R 2.14.1 on my 64-bit Windows 7 laptop. I am attempting to include some favourite functions in the Rprofile.site file to run at R start-up as I did with my previous 32-bit XP machine. I have edited the Rprofile.site file in "C:\Program Files\R\R-2.14.1\etc\" but the added code doesn't seem to be executed when I run R, whether through Tinn-R
2005 Jan 31
2
Startup Files (RProfile) and R-Aqua
Hello, I'm having some difficulty understanding the documentation relative to the startup files with R-Aqua 2.0.1 for Mac OS X. Specifically, I'm wondering: where does R search for the startup files (my home directory at Users:<me>:?); how should they be named (.RProfile will be treated by Mac OS X as a system file and be hidden, so I'm wondering if it should just be
2001 Nov 28
1
Rprofile etc in Linux
Hi! I do not have an Rprofile file in $R_HOME/etc, but I do have one in $R_HOME/library/base/R. I thought I could include a .First() function in a new $R_HOME/etc/Rprofile file for attaching a couple files which have custom "always needed" functions. But would the new $R_HOME/etc/Rprofile create a conflict with $R_HOME/library/base/R/Rprofile (in particular because the later also has a
2003 Jan 13
1
Rprofile.site assignments occur in base package (PR#2448)
Not sure whether this is a feature or bug -- but it does not appear to be documented. R1.6.1 on Windows NT 4.00.1381 Objects assigned in the Rprofile.site file (e.g. foo<-'something') are put into package:base not .GlobalEnv on startup. Objects assigned in the .Rprofile file are put into .GlobalEnv. This doesn't seem consistent to me. The objects exist in base only for the
2009 Jul 21
1
Customization options with .Renviron, R_LIBS, .Rprofile etc
Hi, I am interested in customizing the installation of R. I have gone through the ?R Installation and Administration? manual. But some of the stuff is not clear to me and I would like to get clarifications on the following points (for a Windows installation with R_HOME=C:\\R\\R-2.9.1 ) : 1. I understand that I need to create a file, .Renviron with the following path : R_HOME\\etc\\.Renviron where
1999 Nov 27
1
.Rprofile results in corruption of .RData? (PR#346)
It could be that the following may be due to something wrong that I managed to do (I cannot think what...) but I submit this report in case it is something that you want to know about (I have solved the problem by removing .Rprofile as I describe below). 1. After compiling/installing R 0.90 (an uneventful process), it worked perfectly the first time, and it read .RData written by the previous