FAQ

# R>r-help>October 2009

## 1,011 discussions - 3,298 posts

• 18

#### [R] SPSS long variable names

Hello guys I am new to this list and for R too. I am wondering if there is a patch for the SPSS reading code on the foreign package, in order to be able to read long variable names. Right now ...
 Orvalho AugustoOct 10, 2009 at 4:14 pmOct 15, 2009 at 8:22 pm
• 15

#### [R] Bayesian regression stepwise function?

Hi everyone, I am wondering if there exists a stepwise regression function for the Bayesian regression model. I tried googling, but I couldn't find anything. I know "step" function exists for regular ...
 Allan.YOct 22, 2009 at 5:09 pmOct 30, 2009 at 3:54 pm
• 13

#### [R] how do you know which functions are being debugged?

This is kind of a dumb question: I know you can use isdebugged() to find out if a specific function is flagged for debugging, but is there a way to list all the functions that are flagged for ...
 Andrew YeeOct 23, 2009 at 5:28 pmOct 24, 2009 at 12:44 am
• 13

#### [R] How to use Subpopulation data?

Dear Helpers I have a sample frame and i have sampled from it using three methods and now i want to calculate the statistics but i only get the population parameters. H <- matrix(rnorm(100, ...
 KABELI MEFANEOct 1, 2009 at 10:06 amOct 2, 2009 at 11:53 pm
• 12

#### [R] Non-normal residuals.

Hello, I asked a question about what the most likely process to follow if after a time-series fit is performed the residuals are found to be non-normal. One peron responded and offered to help if I ...
 RkevinburtonOct 27, 2009 at 7:33 pmNov 12, 2009 at 5:02 pm
• 12

Hi User's, This might be a simple question but it is giving me a hard time as I am a new user. I installed R version 2.9.2 (2009-08-24) 1. I just copied a short script from Fox (2002) as a practice ...
 ValOct 28, 2009 at 2:04 pmOct 28, 2009 at 5:22 pm
• 11

#### [R] "The system cannot find the file specified"

What is the problem here? I did an install package from the Rgui menu. Windows Vista <SNIP trying URL 'http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.9/mvtnorm_0.9-8.zip' Content type ...
 Mark KnechtOct 29, 2009 at 1:11 pmOct 29, 2009 at 7:13 pm
• 11

#### [R] puzzle using gsub (and encodings maybe)

Hello, Below is some output that shows my issue. I have a variable x that I read from a file (more on this below) [1] "NEW YORK-NEW ENGLAND" I'm sure the problem has to do with the way I read the ...
 Adrian DragulescuOct 14, 2009 at 5:30 pmOct 16, 2009 at 3:58 pm
• 11

#### [R] histogram

Hi all, I have a question about hist() 1) $breaks [1] 1 2 3 4 5$counts [1] 2 1 1 1 why is there 2 counts for 1? And should the counts be '1 1 1 1 1' ? Is there any other function to count frequency ...
 Khanh NguyenOct 8, 2009 at 7:47 pmOct 14, 2009 at 7:31 am
• 11

#### [R] Creating a Clustered-Stacked Column Chart

Hi all, In R, is there some functions or ways to create a Clustered-Stacked Column Chart as the example in the following page http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html? I have ...
 Zhijie zhangOct 9, 2009 at 9:31 amOct 12, 2009 at 9:46 am
• 11

#### [R] Second y-axis --- alternative to par(new=

Hi is there an alternative to par(new), for ading data to a plot for a different y-axis? My problem with par(new=TRUE) is, that it re-defines all axis and labels (as in example 1) and one has to use ...
 Rainer M KrugOct 7, 2009 at 8:29 amOct 8, 2009 at 12:30 pm
• 11

#### [R] R on Linux, and R on Windows , any difference in maturity+stability?

Will R have more glitches on one operating system as opposed to another, or is it pretty much the same? robert
 Robert WilkinsOct 6, 2009 at 1:41 amOct 6, 2009 at 8:23 pm
• 10

#### [R] population variance and sample variance

It seems that var() computes sample variance. It is straight forward to compute population variance from sample variance. However, I feel that it is still convenient to have a function that can ...
 Peng YuOct 19, 2009 at 3:30 pmFeb 5, 2010 at 4:21 am
• 10

#### [R] avoiding loop

Hi all, I am trying to figure out a way to improve my code's efficiency by avoiding the use of loop. I want to calculate a conditional mean(?) given time. For example, from the data below, I want to ...
 ParkbomeeOct 31, 2009 at 9:01 pmNov 3, 2009 at 11:29 pm
• 10

#### [R] Temperature Prediction Model

Greetings! As part of my research project I am using R to study temperature data collected by a network. Each node (observation point) records temperature of its surroundings throughout the day and ...
 AneetaOct 21, 2009 at 4:31 pmOct 30, 2009 at 9:38 am
• 10

#### [R] reset par() within plot layout

Dear list, I would like to produce a matrix of plots, where par() is reset after each plot (see below [simplified] example). When I use layout() to do so, I seem to also reset the layout. I have not ...
 Janke ten HoltOct 23, 2009 at 12:26 pmOct 27, 2009 at 12:01 pm
• 10

#### [R] Counting

*Hi all, * *Assume that I have the following data set with tow variables and I want count the number of observation with identical values * ** *x1 x2* * 1 1 * * 1 0 * * 0 1* * 0 1* * 0 0* * 1 1* * 0 ...
 AshtaOct 13, 2009 at 12:20 pmOct 20, 2009 at 6:41 pm
• 10

#### [R] How to read plain text documents into a vector?

I'm new to R. I'm working with the text mining package tm. I have several plain text documents in a directory, and I would like to read all the files with extension .txt in that directory into a ...
 Richard LiuOct 13, 2009 at 7:42 amOct 14, 2009 at 8:25 am
• 9

#### [R] PDF too large, PNG bad quality

I wish to save a scatter plot comprising approx. 2 million points in order to include it in a LaTeX document. Using 'pdf(...)' produces a file of size about 20 MB, which is useless. Using ...
 Lasse KliemannOct 22, 2009 at 7:07 pmOct 30, 2009 at 6:49 am
• 9

#### [R] Creating a sparse matrix from a file

Hi all, I am new to R and learning the same. I would like to create a sparse matrix from an existing file whose contents are in the format "rowIndex,columnIndex,value" for ex: 1,2,14 2,4,15 I would ...
 Pallavi PalletiOct 26, 2009 at 9:06 amOct 28, 2009 at 4:47 pm
• 9

#### [R] Cannot activate chm help in R 2.10

Dear all, I just tried to be fast for once, installed R 2.10 and also newly installed all previously-installed packages. However, now all my help files are text only, which is of course a pity with ...
 Ulrike GroempingOct 26, 2009 at 8:53 pmOct 28, 2009 at 10:36 am
• 9

#### [R] data frame is killing me! help

Usage data(gasoline) Format A data frame with 60 observations on the following 2 variables. octane a numeric vector. The octane number. NIR a matrix with 401 columns. The NIR spectrum and I see the ...
 BbsloverOct 22, 2009 at 6:35 pmOct 26, 2009 at 4:44 pm
• 9

#### [R] data file with columns of unequal length

I am running an expt that presents a point process input x and measures a point process output y. The times of each event are recorded. The lengths of the data records of x and y are necessarily ...
 William SimpsonOct 23, 2009 at 8:58 amOct 23, 2009 at 11:32 am
• 9

#### [R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

Start the REvolution without me... http://danesecooper.blogs.com/divablog/2009/10/start-the-revolution-without-me.html *From Danese Cooper's Blog* Some of you may have become aware of REvolution ...
 Ajay ohriOct 21, 2009 at 5:51 pmOct 21, 2009 at 8:58 pm
• 9

#### [R] Pausing R

Hello, I?m currently running a script that takes several days to complete, and have therefore chosen to start two instances of R, each doing half the work (since I have a two-processor machine). The ...
 Anders CarlssonOct 19, 2009 at 11:45 amOct 19, 2009 at 2:30 pm
• 9

#### [R] currency conversion function?

Dear all Is there any R function that would perform currency conversion using up-to-date exchange rates? I would be looking for a function that allows to download recent exchange rates (say, from ...
 Liviu AndronicOct 14, 2009 at 9:40 amOct 16, 2009 at 2:07 pm
• 9

#### [R] permutations

Question 1. I would calculate all the permutations of numbers (23,46,70,71,89) How can I write correctly the code? (Load gregmisc) Question 2. It's possible permute a string? ..for example: EIGER ...
 EigerOct 10, 2009 at 2:05 pmOct 11, 2009 at 4:20 pm
• 9

#### [R] else if statement error

Hello, I am doing a simple if else statement in R. But it always comes out error such as 'unexpected error' There are two variables. ini and b. when ini=1, a=3; when ini 1 and b 2, a=5; all other ...
 Chen GuOct 3, 2009 at 3:54 pmOct 6, 2009 at 3:23 pm
• 8

#### [R] Normal distribution

Hi, I am dealing with how to check in R if some data that I have belongs to a normal distribution or not. I am not interested in obtaining the theoreticall frequencies. I am only interested in ...
 Noela SánchezOct 1, 2009 at 4:46 pmNov 8, 2009 at 11:18 pm
• 8

#### [R] Plots with k-means

Hi, I'm doing a k-means cluster with 6 clusters and 15 variables. Any suggestions on how to plot the results? I've tried the standard xy plot, but couldn't get much of it. Thansk in advance, Iuri.
 Iuri GavronskiOct 31, 2009 at 2:42 amNov 3, 2009 at 9:07 am
• 8

#### [R] matrix^(-1/2)

Dear R-Help Team, as a R novice I have a (maybe for you very simple question), how do I get the following solved in R: Let R be a n x n matrix: \mid R\mid^{-\frac{1}{2}} solve(A) gives me the inverse ...
 Kajan SaiedOct 31, 2009 at 8:39 pmNov 1, 2009 at 11:52 pm
• 8

#### [R] Sandard deviation calculation

Dear all I am trying to learn R I was trying to calculate standard deviation here are the commands and outputs in R the problem is that, i could not understand why the third command could not give ...
 Ms.comOct 26, 2009 at 9:44 amOct 27, 2009 at 7:30 pm
• 8

#### [R] Multiple line commands in R scripting

I'm wondering whether there is a character to let R know to expect more input for a command on subsequent lines. Here is an example: test_1.R: x <- c(1,2,3,4) / c(1,2,3,4) x R CMD BATCh test_1.R ...
 Neil StewartOct 25, 2009 at 12:53 pmOct 26, 2009 at 10:37 pm
• 8

#### [R] Putting names on a ggplot

Putting names on a ggplot Can anyone suggest what I am doing wrong here. I am plotting daily temperatures at Ottawa Ontario for 2008 broken down by months, I seperate them by lines and want to put ...
 John KaneOct 17, 2009 at 9:04 pmOct 22, 2009 at 1:57 pm
• 8

#### [R] TukeyHSD no longer working with aov output?

I can prove I've done this before, but I recently installed Rexcel (and it was easiest to reinstall R and some other bits to make it work) and now its no longer working. Before I would do an ANOVA ...
 Clayton CoffmanOct 20, 2009 at 8:17 pmOct 21, 2009 at 4:23 am
• 8

#### [R] reference on fisher.test()

Can somebody point me a book on Fisher's exact test? I looked a few webpages. But the descriptions on the webpages are not very complete. Is there a book on that covers all the aspect of Fisher's ...
 Peng YuOct 15, 2009 at 8:56 pmOct 16, 2009 at 1:38 pm
• 8

#### [R] is that possible to graph 4 dimention plot

Suppose there are 4 variables d is a function of a , b and c I want to know how a, b and c change will make d change It will be straightforward to see it if we can graph the d surface if d is only a ...
 Gcheer3Oct 4, 2009 at 7:14 pmOct 13, 2009 at 8:00 am
• 8

#### [R] add lines() to 1st plot in layout() after calling 2nd plot()?

Dear R users, I create a graphic with two plots side by side using layout(), like this: layout(matrix(c(1,2),1)) plot(1:10,main="left plot") lines(c(3:7,7:3),col="red") plot(10:1,main="right plot") ...
 Marianne PrombergerOct 3, 2009 at 7:15 pmOct 12, 2009 at 6:17 pm
• 8

#### [R] row selection

Hi all, I have a matrix named x with N by C I want to select every 5 th rrow from matrix x I used the following code n<- nrow(x) } Error: subscript out of bounds Can any body point out the problem?
 AshtaOct 8, 2009 at 8:14 pmOct 11, 2009 at 10:32 am
• 8

#### [R] Running R scripts from a GUI interface

It appears several that of my scripts are beginning to reaching maturity, so I am curious if it is possible to add an external GUI to run the scripts from this simplified GUI interface. The scripts ...
 Jason RupertOct 10, 2009 at 5:05 amOct 11, 2009 at 2:59 am
• 8

#### [R] Parameters of Beta distribution

Supose I have a data pertaining to credit loss as amounts <- c(46839.50,31177.12,35696.69,21192.57,29200.91,42049.64,42422.19, 44976.18, 32135.36,47936.57,27322.91,37359.09,43179.60, 48381.02, ...
 Maithili ShivaOct 7, 2009 at 12:39 pmOct 9, 2009 at 7:24 am
• 8

#### [R] sort (all columns of) a matrix

Dear R-Help Team, I have been trying to sort (all columns of) a matrix: [,1] [,2] [1,] 1 1 [2,] 3 3 [3,] 4 4 [4,] 6 6 [5,] 6 6 [6,] 4 4 [7,] 6 6 [8,] 56 56 [9,] 4 4 [10,] 64 64 [11,] 86 86 [12,] 39 ...
 Kajan SaiedOct 8, 2009 at 4:50 pmOct 8, 2009 at 8:32 pm
• 8

#### [R] removing missing values from a matrix

Hi! All, I am working with a large matrix of dimension 23689 x 162. Some of the values of this matrix is missing (NA). And it looks something like that: [,1] [,2] [,3] [,4] [,5] [1,] 2 NA 4 9 6 [2,] ...
 Amit KumarOct 1, 2009 at 5:54 pmOct 2, 2009 at 9:26 am
• 7

#### [R] Multiple time series and their names

Suppose I have multiple time series with names for each one, for example, x <- ts(matrix(rnorm(30,0,1),10,3), names=c("Juan", "Tuey", "Trey"), frequency=4) So now, as I start to explore these series, ...
 David StofferOct 3, 2009 at 3:15 amNov 15, 2009 at 6:53 pm
• 7

#### [R] Help with RGDAL

Hello, We (two mac users) have been attempting to install rgdal from "http://www.kyngchaos.com/software:frameworks", given that it is not available as a binary on the CRAN (binaries) of the "Package ...
 Pablo AlvarezOct 30, 2009 at 5:51 pmNov 4, 2009 at 9:33 pm
• 7

#### [R] Removing & generating data by category

Dear R users, Basically, from the following arbitrary data set: a <- ...
 Steven KangOct 29, 2009 at 1:30 amOct 30, 2009 at 9:04 am
• 7

#### [R] Stack overflow in R 2.10.0 with sub()

Hi R developers: Congratulations for the new R 2.10.0 version. It is a huge effort! Thank you for your work and dedication. I just want to ask how to make this "strip blank" function to work again ...
 Kenneth Roy Cabrera TorresOct 27, 2009 at 12:15 pmOct 29, 2009 at 12:30 am
• 7

#### [R] How to union the elements in a list?

Suppose that I have a list of vectors. I want to compute the union of all the vectors in the list. I could use 'for' loop to do so. But I'm wondering what would be a better solution that does not ...
 Peng YuOct 28, 2009 at 7:07 pmOct 28, 2009 at 8:37 pm
• 7

#### [R] Unable to get Legend with survplot rms package

Hello, I apologize for the post as I am certainly overlooking a simple solution to my difficulties with getting a legend to print on a survplot from the rms package. I am plotting the following ...
 Aric GregsonOct 26, 2009 at 7:56 pmOct 26, 2009 at 11:16 pm
• 7

#### [R] as.POSIXct month problem

Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20091026/2ce79ea0/attachment.pl
 Guillaume chaumetOct 26, 2009 at 8:31 pmOct 26, 2009 at 9:49 pm