[R] Error message with scan() function

2010-10-04 Thread Tariq Perwez
Hi Everyone, I am new R user and am trying to learn by reading the online manual "An Introduction to R" from the R web site. I am trying to practice using the scan() function as explained in the manual. For this I first created three vectors (one a character vector and two numeric one) and saved f

[R] R packages and assess to data in packages

2009-12-05 Thread Tariq Perwez
Hi Everyone, I have two very basic questions and would appreciate your help. 1. I would like to see/access the data that comes with a given R package by using a function like read.table(). For example, I just installed car package from CRAN. I know that somewhere within the package, there is Dunca

[R] Help with unstack() function

2009-11-15 Thread Tariq Perwez
Hi Everyone, I am trying to understand the unstack() function but after struggling for two days, I have given up. More specifically, I am trying the exercises at the end of Chapter 1 of Data Analysis and Graphics Using R by Maindonald and Braun, 2nd ed. Exercise 18 (p. 41) asks to unstack the Rab

[R] Help with history() in Emacs/ESS

2009-10-25 Thread Tariq Perwez
Hi Everyone, I am a beginner running R 2.9.2 under Ubuntu and typically use Emacs w/ESS. However, I am confused with history() command. When I issue command history() in Emacs within an R session, this is what get: > history() Error in savehistory(file) : no history available to save Similarly,

[R] R binaries for linux on G4 Powerpc?

2008-08-26 Thread Tariq Perwez
Hi Everyone I just installed Yellow Dog Linux (v 5.02) on an old G4 Powerpc replacing the Mac OSX. The system is running beautifully. I would like to install R on this system. I am not sure how to go about doing it. I have installed R on my Ubuntu system as well as on Mac OSX but there are binarie

[R] Help Updating and Installing R Packages

2008-07-15 Thread Tariq Perwez
Hi Everyone, I have a few fairly basic questions about upgrading and installing R packages. First off, I am using Ubuntu Hardy Heron and have R 2.7.1 installed and working perfectly. I usually access R via Emacs ESS interface which I am still trying to get the hang of. My questions and issues are

[R] Controlling the length of line with abline(lm())

2008-06-18 Thread Tariq Perwez
Hi I just realized that when I use linear regression to draw a line through my data points with something like the following: abline(lm(y ~ x)) the length of the line is infinite, i.e., the line goes beyond the smallest and the largest data values. This seems not very right to me (not to mention

[R] Help with axis labels

2008-06-18 Thread Tariq Perwez
Hi I have patched together (from various sources) the following code to get semi-logarithmic plot. Unfortunately, my labels come out also at intermediate places between 10^2, 10^3, 10^4 etc. Since I put the code together from various sources and do not understand fully how the code is working, I ha

[R] Specifying fonts in R

2008-06-15 Thread Tariq Perwez
Hi I am a novice user of R. I got hold of "R Graphics" by P. Murrell the other day and am trying to follow examples in the book. In chapter 3, the section on font specification gives 16 "basic" font families and face combinations available in R (Figure 3.9). However, the book also warns that even i

[R] Plotting multiple continuous lines with symbols

2008-06-10 Thread Tariq Perwez
Hi, I am trying to plot multiple lines on one plot such that all lines are of the same color (black) and continuous. I need to distinguish these multiple plots from each other by using different symbols (I am using pch=). However, all my lines are broken on both sides of the symbols. This unfortuna

[R] Superscript/Subscript in main title

2008-06-04 Thread Tariq Perwez
I have been trying to figure out how to get superscript/subscript in the main title for a plot. I have tried various approaches and suggestions but none of them work. I am trying to get the following as the main title of my plot: Emission of CO2 with time (but note that 2 is subscript.) I have t