FAQ

# R>r-help>September 2008

## 915 discussions - 2,998 posts

• 47

#### [R] Bug in "is" ?

Hi R users Is there anything wrong in "is" function? (R 2.7.2) I believe that everyone will agree that "7" is an integer, right? but why R shows 7 is not an integer [1] TRUE Thank you very much in ...
 CtuSep 24, 2008 at 4:40 amSep 30, 2008 at 4:33 am
• 33

#### [R] Truncating dates (and other date-time manipulations)

Dear all, I've been struggling to perform common operations on dates that I need to be able to correct draw date-time scales - in particular I need to be able to round/truncate/ceiling dates to ...
 Hadley wickhamSep 11, 2008 at 3:02 pmSep 12, 2008 at 4:25 pm
• 20

#### [R] FW: logistic regression

Sorry. Let me try again then. I am trying to find "significant" predictors" from a list of about 44 independent variables. So I started with all 44 variables and ran drop1(sep22lr, test="Chisq").. ...
 Darin BrooksSep 27, 2008 at 1:44 pmOct 7, 2008 at 3:21 am
• 17

#### [R] Manage huge database

Hello, Recently I have been trying to open a huge database with no success. It�s a 4GB csv plain text file with around 2000 rows and over 500,000 columns/variables. I have try with The SAS System, ...
 José E. LozanoSep 22, 2008 at 6:50 amSep 23, 2008 at 6:36 am
• 15

#### [R] Error Running TinnR with R

Hello All, I am using Tinn-R (v 2.0.0.7) integrated with R (v 2.7.2) on a 32-bit Windows Vista system. When I try to run a code and send it to R from Tinn-R, I get the following error message; ?Error ...
 VideepSep 14, 2008 at 3:52 amFeb 10, 2011 at 3:17 pm
• 15

#### [R] Oja median

Hi, Can we get the code for calculating Oja median for multivariate data Thanks and Regards Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyderabad On Net: 19 533 6363
 Rahul-A AgarwalSep 18, 2008 at 9:20 amOct 13, 2008 at 5:10 am
• 15

#### [R] Use of colour in plots

Dear all, I have 3 datasets all of which share the same longitude and latitude values, which I'm looking to plot onto a scattergraph. The third dataset has values which can only be either '1' or ...
 Steve MurraySep 5, 2008 at 1:10 pmSep 19, 2008 at 4:14 pm
• 14

#### [R] Question about multiple regression

Dear R-list, maybe some of you could point me in the right direction: Are you aware of any FREE Fortran or Java libraries/actual pieces of code that are VERY efficient (time-wise) in running the ...
 Dimitri LiakhovitskiSep 8, 2008 at 4:05 pmSep 9, 2008 at 10:51 am
• 13

#### [R] How to convert backslash to slash?

How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C:/foo/bar". Thanks, Shengqiao Li
 Shengqiao LiSep 23, 2008 at 8:00 pmSep 24, 2008 at 3:19 pm
• 13

#### [R] (no subject)

please delete me from this mailing list.... i is not an R user and I overload my mail... thanks
 Giovanni TarquinioSep 3, 2008 at 4:23 pmSep 19, 2008 at 12:09 am
• 13

#### [R] Fetching a range of columns

Hello, I realize that using: x[x 3 & x < 5] I can fetch all elements between 3 and 5. However I read in from a CSV file, and I would like to fetch all columns from within a range ( 842-2411). In teh ...
 Jason ThibodeauSep 14, 2008 at 4:22 pmSep 16, 2008 at 2:39 am
• 12

#### [R] RSiteSearch for words as one entity''.

I tried to search for a string of words as one entity'' following the example in the help file: and got the error message: 2008-09-11 08:55:41.356 open[823] No such file: /Users/rturner/http:/ ...
 Rolf TurnerSep 10, 2008 at 9:03 pmSep 11, 2008 at 5:42 pm
• 11

#### [R] Installing rgl

Hello. I'm having trouble installing rgl. I have a theory as to the problem. First, the error message and session info. trying URL 'http://probability.ca/cran/src/contrib/rgl_0.81.tar.gz' Content ...
 Kevin E. ThorpeSep 3, 2008 at 8:34 pmFeb 22, 2012 at 7:28 pm
• 10

#### [R] Novice question about getting data into R

I found it easy to use R when typing data manually into it. Now I need to read data from a file, and I get the following errors: Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, ...
 Ted ByersSep 19, 2008 at 5:01 pmJun 22, 2012 at 9:49 am
• 10

#### [R] fft inverse display help

I have a a simple function that generates a time series square wave: genseq <- function() { x <- numeric(4*365) s <- seq(as.Date("2005-01-01"), as.Date("2008-12-31"), by="month") ob <- ...
 RkevinburtonSep 30, 2008 at 7:17 pmOct 3, 2008 at 1:12 pm
• 10

#### [R] Logistic regression problem

I have a huge data set with thousands of variable and one binary variable. I know that most of the variables are correlated and are not good predictors... but... It is very hard to start modeling ...
 Milicic.markoSep 27, 2008 at 5:51 pmOct 1, 2008 at 5:12 pm
• 10

#### [R] R-2.7.2 infected?

I tried downloading R-2.7.2 (http://cran.cnr.berkeley.edu/bin/windows/base/R-2.7.2-win32.exe, both from Berkeley and cran) and both times I got a warning from Computer Associates eTrust Antivirus ...
 Dave DeBarrSep 23, 2008 at 12:38 amSep 30, 2008 at 10:27 am
• 10

#### [R] Conversion to Binary (base2)

Hello, Is there a simple way to take an input, and convert the decimal integers to binary? In this case, I have a CSV file, and I need to convert the first column of every line to binary. Thanks. -- ...
 Jason ThibodeauSep 25, 2008 at 7:33 pmSep 26, 2008 at 7:55 am
• 10

#### [R] Power PC with a linux distribution and R

This is an operating system question, but it is with the intent of using R on that operating system. I have an ibook G4 Power PC that I am going to install linux on. Is there a better, worse, or ...
 Stephen sefickSep 12, 2008 at 8:30 pmSep 17, 2008 at 4:21 am
• 10

#### [R] How to load functions in R

Hello, I am trying to use self created functions in other scripts than the one where they are stored. For the moment I am using the following structure of commands to do that: 1. Load the text file ...
 Mihai MirautaSep 11, 2008 at 1:30 pmSep 12, 2008 at 3:02 am
• 10

#### [R] How to preserve date format while aggregating

Hi I have a dataframe in which some subjects appear in more than one row. I want to extract the subject-rows which have the minimum date per subject. I tried the following aggregate function ...
 Erich StuderusSep 8, 2008 at 10:38 amSep 9, 2008 at 6:57 am
• 9

#### [R] Return a list

Dear R Users, another problem for me is the output of a function. I have several output variables which I give back with the list command. test <- function {return(list(a,b,c,d,e,f,g,...))} After the ...
 Stefan FritschSep 26, 2008 at 1:57 pmSep 26, 2008 at 10:05 pm
• 9

#### [R] how to keep up with R?

Dear Listers, I've been a big fan of R since graduate school. After working in the industry for years, I haven't had many opportunities to use R and am mainly using SAS. However, I am still forcing ...
 Wensui LiuSep 19, 2008 at 5:01 amSep 22, 2008 at 8:15 am
• 9

Hi, how can I create a rainbow gradient in R? For example, let's say I have a plot of y = x...and I want the plot to go from red - orange - yellow - green - blue - etc. Right now, I know how to do ...
 Gillian SilverSep 17, 2008 at 8:58 pmSep 19, 2008 at 3:10 am
• 9

#### [R] unix-type commandline keystrokes in the windows RGUI

Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]-K/Y) which work in the R commandline in *nix ...
 MfruminSep 17, 2008 at 1:26 pmSep 18, 2008 at 11:27 pm
• 9

#### [R] Creating smooth color regions with panel.contourplot()

When I use panel.contourplot() with filled color regions, the coloring follows the stair-step edge of the underlying grid instead the smooth contour lines themselves. How can I get the latter ...
 Waichler, Scott RSep 15, 2008 at 9:07 pmSep 18, 2008 at 8:54 pm
• 9

#### [R] request: most repeated component of a list

Dear R community I have stored the results of arrays in a list consist of J-components (say 200 components). Each component containing same no of columns but may be different no of rows. e.g [[1]] ...
 Muhammad AzamSep 10, 2008 at 3:49 pmSep 12, 2008 at 10:50 am
• 9

#### [R] Information on the number of CPU's

Dear R Users, I am on Windows XP SP2 platform, using R version 2.7.2 . I was wondering if there is a way to find out, within R, the number of CPU's on my machine ? I would use this information to set ...
 Tolga I UzunerSep 9, 2008 at 6:59 pmSep 10, 2008 at 3:11 pm
• 9

#### [R] R_USER - in which file should I include it?

Hello I am a newbie. I had my R upgraded from 2.7.1 to 2.7.2 and in doing so I decided to install all 2.7 versions under c:\program files\R\2.7 from now on (2.7.1 is located under .\2.7.1) Although I ...
 Eduardo M. A. M.MendesSep 7, 2008 at 12:28 pmSep 9, 2008 at 2:31 pm
• 8

#### [R] ON MAC, how to copy a plot on to Word document?

Yes, I don't know how to copy the plot on Mac and paste on to Word because you can't right click on the graph and say "copy as metafile." I'm so surprised I can't find any information about this ...
 Asdfjkl;Sep 7, 2008 at 5:46 amFeb 26, 2009 at 5:19 am
• 8

#### [R] Dream of a wiki GUI for R

Dear R fans ( and wiki fans), I am just writing a draft to introduce confidence intervals of various "effect sizes" to my students. Surely, I'll recommend the package MBESS in R. Currently, it means ...
 FreerowSep 28, 2008 at 6:53 pmOct 23, 2008 at 8:13 am
• 8

#### [R] List of varying length suitable for use as dimnames

Windows XP R 2.7.2 I need to create a list of varying length of the form SS1 SS2 SS3 . . . SSn I will be using the list for the dimnames of a matrix that will have varying dimensions. Any suggestions ...
 John SorkinSep 27, 2008 at 5:49 pmSep 28, 2008 at 8:34 pm
• 8

#### [R] Modifying output to Google Docs

Hi List, Graphical output to PDF's ,RTF ,CSV is known through R. Can it be modified for outputting to Google Docs (which is basically uploaded files ,published to become html pages) Is there any ...
 Ajay ohriSep 23, 2008 at 4:25 pmSep 24, 2008 at 6:03 pm
• 8

#### [R] How to plot "greater than" symbol on the x-axis

Hello everyone, I want to plot a "greater than" symbol (the "_" under " ") on the x-axis in the labels. Is it possible to do it? Thanks. Bingshan
 Li, BingshanSep 21, 2008 at 4:37 amSep 21, 2008 at 11:26 pm
• 8

#### [R] making spearman correlation cor() call fail with log(0) as input

Hi, How can I make the cor(x, y, method="spearman") call to produce an error when the input to it (x, y) produces an error? Here is a simple example: [1] -Inf 0.0000000 0.6931472 ## error, as ...
 Timur ShtatlandSep 10, 2008 at 8:04 pmSep 14, 2008 at 11:52 pm
• 8

#### [R] Free SQL Database with R

Hi all, could someone tell me which is the best user-friendly free/open source sql database system to use with R, particularly as a back-end for a data-hungry web page? Thanks in advance. Kind ...
 Chibisi Chima-OkerekeSep 2, 2008 at 1:16 pmSep 4, 2008 at 9:08 am
• 7

#### [R] birthday problem (factorial limit)

Hi, I tried to calculate the formula for the birthday problem (the probability that at least two people out of a group of n people share the same birthday) But the factorial-function allows me only ...
 Jörg GroßSep 28, 2008 at 5:43 pmNov 16, 2008 at 4:17 am
• 7

#### [R] rgl: ellipse3d with axes

Last week I asked about data ellipses with rgl:::ellipse3d() with lines showing the principal axes. (The goal is a visual demonstration of PCA as a rotation of variable space to component space.) I ...
 Michael FriendlySep 24, 2008 at 1:23 pmSep 24, 2008 at 6:39 pm
• 7

#### [R] Options for viewing / using results from lm

Hello, I would like to state what I am (trying) to do. I have data set. It has 5749 rows (including the header) and 23 columns. The data contains values related to spatial aspects of the 412 ...
 Michael JustSep 23, 2008 at 6:00 pmSep 24, 2008 at 5:09 pm
• 7

#### [R] How to draw the graph of f(x,y) = x * y ?

Dear All, The function curve() draws the graph of functions from R to R. Is there some homologous function to curve() to draw functions from R^2 to R? Thanks in advance, Paul
 Paul SmithSep 23, 2008 at 4:54 pmSep 24, 2008 at 4:56 pm
• 7

#### [R] print.data.frame : row.name = FALSE not having intended effect

Hi, Does anybody know if row.name = FALSE actually works in v2.6.2? Because it isn't working for me... here is some sample code and output: ====+====+====+====+====+====+====+====+====+====+ ...
 Matthew PettisSep 24, 2008 at 1:49 amSep 24, 2008 at 5:48 am
• 7

#### [R] reading in results from system(). There must be an easier way...

Hello, I am currently using R to run an external program and then read the results the external program sends to the stdout which are tsv data. When R reads the results in it converts it to to a list ...
 Michael A. GilchristSep 12, 2008 at 4:34 pmSep 22, 2008 at 5:33 pm
• 7

#### [R] Why isn't R recognising integers as numbers?

I have a number of files containing anywhere from a few dozen to a few thousand integers, one per record. The statement "refdata18 = read.csv("K:\\MerchantData\\RiskModel\\Capture.Week.18.csv", ...
 Ted ByersSep 22, 2008 at 1:01 amSep 22, 2008 at 8:30 am
• 7

#### [R] Plot availability

Is it possible to see if a plot is already open before I call lines()? -- View this message in context: http://www.nabble.com/Plot-availability-tp19572437p19572437.html Sent from the R help mailing ...
 John crepezziSep 19, 2008 at 1:32 pmSep 19, 2008 at 9:37 pm
• 7

#### [R] Difficulty understanding sem errors / failed confirmatory factor analysis

Hello, I'm trying to fit a pretty simple confirmatory factor analysis using the sem package. There's a CFA example in the examples, which is helpful, but the output for my (failing) model is hard to ...
 Adam D. I. KramerSep 18, 2008 at 5:01 pmSep 18, 2008 at 6:56 pm
• 7

#### [R] propensity score adjustment using R

Hi all, i am looking to built a simple example of a very basic propensity score adjustment, just using the estimated propensity scores as inverse probability weights (respectively 1-estimated weights ...
 Bunny, lautloscrew.comSep 18, 2008 at 3:31 pmSep 18, 2008 at 6:27 pm
• 7

#### [R] Greyed text in the background of a plot

Hi! Is there any way of having a greyed ("ghosted") text (i.e, 2006) in the background of a plot? I'm making a dynamic plot and would like to show the year of each time step as a big greyed text in ...
 Agustin LoboSep 12, 2008 at 12:35 pmSep 14, 2008 at 1:41 pm
• 7

#### [R] Compiling date

Hi, I have following kind of dataset (all are dates) in my Excel sheet. 09/08/08 09/05/08 09/04/08 09/02/08 09/01/08 29/08/2008 28/08/2008 27/08/2008 26/08/2008 25/08/2008 22/08/2008 21/08/2008 ...
 Megh DalSep 9, 2008 at 6:48 amSep 10, 2008 at 1:17 pm
• 7

#### [R] Problem with starting and using R

Dear all, I encountered a problem on starting and using the R v 2.7.2 installation on my PC running Windows Vista and would appreciate your help. When R was first started, the Rgui returned several ...
 Thomas LoSep 7, 2008 at 11:00 amSep 10, 2008 at 5:56 am
• 7

#### [R] Averaging 'blocks' of data

Dear all, I have a large dataset which I hope to reduce in size, to make it more useable. I hope to do this by taking an average of each 60 x 60 blockof values and forming a new data frame out of the ...
 Steve MurraySep 7, 2008 at 7:32 pmSep 8, 2008 at 10:18 pm