Re: [R] Running rscript in windows

2010-02-10 Thread Dieter Menne
vikrant wrote: > > Hi, > > I saved the function in test.R file on Desktop. Then after starting R I > changed my directory to desktop. > and tried the command source("test.R") it gave me following error > > > Error in file(file, "r", encoding = encoding) : > cannot open the connection > I

[R] Problem with retreaving numeric data

2010-02-10 Thread venkata kirankumar
Hi all, I am trying to get a value from a dataset in data set its stored as 001 but while i am trying to retreave it its giving as 1 can any one help me to retreave it as 001 thanks in advance kiran [[alternative HTML version deleted]] __ R-h

Re: [R] Failed install of package xlsReadWrite

2010-02-10 Thread Dieter Menne
david.luckett wrote: > > Does anyone have a work-around for a failed installation of this package? > >> library(xlsReadWrite) > xlsReadWrite version (cran shlib) > Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. > > !! Your installation contains the cran placeholder shlib (dll/so).

Re: [R] Question about rank() function

2010-02-10 Thread Moshe Olshansky
Hi, I believe that the reason is that even though the first 4 elements of your fmodel look equal (when rounded to 4 decimal places) they are actually not. To check this try fmodel[1:4]-fmodel[1] --- On Thu, 11/2/10, Something Something wrote: > From: Something Something > Subject: [R] Questio

[R] Question about rank() function

2010-02-10 Thread Something Something
Hello, I am trying to get the 'rank' function to work for me, but not sure what I am doing wrong. Please help. I ran the following commands: data = read.table("test1.csv", head=T, as.is=T, na.string=".", row.nam=NULL) X1 = as.factor(data[[3]]) X2 = as.factor(data[[4]]) X3 = as.factor(data[[5]])

Re: [R] Running rscript in windows

2010-02-10 Thread vikrant
Hi, I saved the function in test.R file on Desktop. Then after starting R I changed my directory to desktop. and tried the command source("test.R") it gave me following error Error in file(file, "r", encoding = encoding) : cannot open the connection In addition: Warning message: In file(fil

Re: [R] expand the inside of command with rep ?

2010-02-10 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 10.02.2010 21:32:29: > try this: > > > x <- 1:5 > > x.list <- lapply(1:15, function(a) x) > > do.call(cbind, x.list) > [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] > [,13] [,14] [,15] > [1,]1111111

Re: [R] Flattening Graphics

2010-02-10 Thread baptiste auguie
Hi, You could try the grid.grab() function in R devel if your graphics use the Grid package. It will read the graphical output as a bitmap which you can then export in a multipage pdf. It may not be really flattening per se but that would definitely help with the viewing speed. HTH, baptiste O

Re: [R] Suprising behavior of paste or cat?

2010-02-10 Thread Peter Ehlers
Russell Pierce wrote: I may be making a simple error, but I've looked at the str() of the resulting objects and I can't see any obvious reason I'm having the problem I am having, so I am reaching out to the R-help group. I am generating a string in my code. When I make a slight modification (ad

Re: [R] Barplot axis titles

2010-02-10 Thread Jim Lemon
On 02/11/2010 01:03 PM, RagingJim wrote: Now, I think I am making this harder than it seems, but... I am writing a script that will allow me to pull any csv file with annual rainfall and plot it into a bar plot. The problem I am facing is that the different sites have recorded data for a differ

[R] Failed install of package xlsReadWrite

2010-02-10 Thread david . luckett
Does anyone have a work-around for a failed installation of this package? > library(xlsReadWrite) xlsReadWrite version (cran shlib) Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. !! Your installation contains the cran placeholder shlib (dll/so). Please get the regular shlib (420 KB)

[R] Flattening Graphics

2010-02-10 Thread Dario Strbenac
Hello, This question is a nightmare to search for, as I get so many irrelevant results. What I'm interested in doing if I have many pages of plots and I want to keep them together in the same document, say a PDF, is there a way to flatten all the dot plots and graphics, so that they don't take

[R] Suprising behavior of paste or cat?

2010-02-10 Thread Russell Pierce
I may be making a simple error, but I've looked at the str() of the resulting objects and I can't see any obvious reason I'm having the problem I am having, so I am reaching out to the R-help group.  I am generating a string in my code.  When I make a slight modification (add a comma at the end usi

Re: [R] histogam plots

2010-02-10 Thread Bill.Venables
One way round this is to use lattice. With your matrix 'w' you might W <- data.frame(w = as.vector(w), r = factor(as.vector(row(w))) ) require(lattice) histogram(~w|r, W) Identical axis systems will be used for all panels. Bill Venables CSIRO/CMIS Cleveland Laborato

Re: [R] sum sections of data of different lengths from within a data frame

2010-02-10 Thread kMan
Dear Kara, Did you bother to test your code? You say your code actually did some summing, but you didn't include any working example of that code. Did you bother to read the posting guide? (1) TRY to reference Col A (including space, as you indicated) in df. >names(df)<-c("Col A", "Col B") #space

[R] histogam plots

2010-02-10 Thread li li
Hi all, I want to draw a histgram for each row of a matrix and compare them. However the plot I got does not have the same y range and x range, which makes it difficult to make the comparison. Is there a easy way to fix the x range and y range in a xy plot for several plots, instead of specifyi

[R] sqlSave data into multiple *.mdb files

2010-02-10 Thread Ryusuke Kenji
Hi All, con <- member <- class <- list() for(i in 1:5) { con[[i]] <- odbcConnectAccess(paste("C:/Desktop/Data/source",i,".mdb",sep = '')) #read data from Access files member[[i]] <- sqlFetch(con[[i]],'member') #get table data from *.mdb files observe[[i]] <- sqlFetch(con[[i

Re: [R] Find Source File Corresponding to Sourced Function

2010-02-10 Thread Duncan Murdoch
On 10/02/2010 7:30 PM, Scott Stephens wrote: I've noticed that when you debug a function that was loaded into the workspace using the source function, it prints the location of the file from which the function was sourced. Is there a way to get that same information without debugging the functio

Re: [R] Find each time a value changes

2010-02-10 Thread Tim Clark
Thanks everyone! I would have been banging my head around for quite a while and still wouldn't have come up with either solution. The function rle() is a good one to know! Aloha, Tim Tim Clark Department of Zoology University of Hawaii --- On Wed, 2/10/10, Ben Tupper wrote: > From: Be

Re: [R] prompts and running means

2010-02-10 Thread RagingJim
Thanks Jim, however if I change "png(fileName)" to "png("picture.png")" then this: "require(tcltk) fileName<-tclvalue(tkgetSaveFile(filetypes="{{PNG Files} {.png}} ")) " becomes obsolete. Assuming of course that is what you were referring to. Otherwise I completely missed your point. Cheers.

[R] Find Source File Corresponding to Sourced Function

2010-02-10 Thread Scott Stephens
I've noticed that when you debug a function that was loaded into the workspace using the source function, it prints the location of the file from which the function was sourced. Is there a way to get that same information without debugging the function? Thanks, Scott ___

Re: [R] Selecting single TAZ based on area proportion

2010-02-10 Thread ROLL Josh F
It dopes appear that this code works but entering a NA into the TAZ values goofs things up. Any ideas of how to remedy this problem? -Original Message- From: Nikhil Kaza [mailto:nikhil.l...@gmail.com] Sent: Monday, February 08, 2010 4:51 PM To: ROLL Josh F Cc: r-help@r-project.org Subj

[R] Barplot axis titles

2010-02-10 Thread RagingJim
Now, I think I am making this harder than it seems, but... I am writing a script that will allow me to pull any csv file with annual rainfall and plot it into a bar plot. The problem I am facing is that the different sites have recorded data for a different number of years. This means that every

Re: [R] dimensions checking

2010-02-10 Thread Gabor Grothendieck
Try this: eapply(environment(), dim) On Wed, Feb 10, 2010 at 9:41 PM, andrew wrote: > Hello r-help-archive list, > > I have an algorithm that is fairly slow and I was wondering whether my > problem if it was an indexing going out of bounds and forcing the > creation of a new vector.  Basically,

Re: [R] What is the difference between typeof and storage.mode?

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 9:21 PM, bluesky...@gmail.com wrote: On Wed, Feb 10, 2010 at 7:05 PM, David Winsemius > wrote: On Feb 10, 2010, at 7:54 PM, David Winsemius wrote: On Feb 10, 2010, at 7:47 PM, bluesky...@gmail.com wrote: On Wed, Feb 10, 2010 at 6:40 PM, David Winsemius > wrote: On Fe

[R] dimensions checking

2010-02-10 Thread andrew
Hello r-help-archive list, I have an algorithm that is fairly slow and I was wondering whether my problem if it was an indexing going out of bounds and forcing the creation of a new vector. Basically, I want to check the dimensions of all of my vectors before and after the algorithm runs: I want

Re: [R] Unexpected output in first iteration of for-loop

2010-02-10 Thread jim holtman
It doing exactly what you asked it to do. You have the assignment: result <- latentVariableNames and then you print it out in the loop. What were you expecting? On Wed, Feb 10, 2010 at 9:06 PM, Chaehan So wrote: > Dear r-helpers, > > why do I get an output in the first iteration of the for-lo

Re: [R] color palette heatmap

2010-02-10 Thread Jim Lemon
On 02/11/2010 06:14 AM, joonR wrote: Hi, I'm kinda new of the R world. I need to use the heatmap or heatmap.2 function to plot correlation values. 2 questions: - how can I specify a color palette? (would like to have a transition from blue(-1) to white(0) to red(1)) - how can I use heatmap.2 im

Re: [R] Find each time a value changes

2010-02-10 Thread Ben Tupper
Hi, On Feb 10, 2010, at 8:58 PM, Tim Clark wrote: Dear List, I am trying to find each time a value changes in a dataset. The numbers are variables for day vs. night values, so what I am really getting is the daily sunrise and sunset. A simplified example is the following: x<-seq(1:100)

Re: [R] Find each time a value changes

2010-02-10 Thread Bill.Venables
something like this? > c(1, which(c(0, diff(y)) != 0)) [1] 1 11 21 51 61 71 81 91 Bill Venables CSIRO/CMIS Cleveland Laboratories -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tim Clark Sent: Thursday, 11 February 2010 11:59 A

Re: [R] WMF conversion...

2010-02-10 Thread Jim Lemon
On 02/11/2010 04:48 AM, Jason Rupert wrote: Thank you very much for your reply. I guess I may be using the wrong terminology. I have Office 2007. In PowerPoint 2007, I can navigate to "Save As" and then choose "PDF or XPS". That option is shown in the attached image. When using that I tried

[R] Unexpected output in first iteration of for-loop

2010-02-10 Thread Chaehan So
Dear r-helpers, why do I get an output in the first iteration of the for-loop which contains the string values of the input vector, and how can I avoid that? Here's the output (only line 1 is wrong) latentVariable Indiv Group 1 rPlanning rIterat rTDD 2 rPlanning0.79 0.84 3

Re: [R] ggplot2 stacked line plot

2010-02-10 Thread Liam Blanckenberg
Many thanks for you help on this Dennis. Liam On Thu, Feb 11, 2010 at 6:02 AM, Dennis Murphy wrote: > Hi: > > This is closer, but it is still not what you want; it does, however, show > what > geom_area is doing when it renders the plot, as can be seen by the colors. > > data.set <- data.frame

Re: [R] expand the inside of command with rep ?

2010-02-10 Thread Jorge Ivan Velez
Hi Xu, Try replicate(5, 1:15) HTH, Jorge On Wed, Feb 10, 2010 at 3:27 PM, Xu Wang > wrote: > > Hi, > > I would like to be able to repeat a string within a command. I think there > is an easy way but I can not figure out how. > > Here is an example. > > x<-1:15 > I would like to turn this into

Re: [R] How to plot three graphs on one single plot?

2010-02-10 Thread Jim Lemon
On 02/10/2010 09:17 PM, khaz...@ceremade.dauphine.fr wrote: Hello alla I have three kinds of information (x,y1),(x,y2),(x,y3) such that x and y1,y2,y3 are the vectors with the same dimention. Now I want to plot these three class af information on one plot. thank you for your help. khazaei Hi k

[R] Find each time a value changes

2010-02-10 Thread Tim Clark
Dear List, I am trying to find each time a value changes in a dataset. The numbers are variables for day vs. night values, so what I am really getting is the daily sunrise and sunset. A simplified example is the following: x<-seq(1:100) y1<-rep(1,10) y2<-rep(2,10) y<-c(y1,y2,y1,y1,y1,y2,y

[R] question about boxplot,does it accept ad hoc data

2010-02-10 Thread Guanhua Chen
Hi all, I have a question about boxplot(), does it accept ad hoc data , for example, I only provide quartile information to the function,but get the boxplot as usual, is it possible , or if there is any other function can do this. Thank you very much! Yours -- Guanhua(Josh) Chen [[alter

[R] Code find exact distribution for runs test?

2010-02-10 Thread Dale Steele
I've been attempting to understand the one-sample run test for randomness. I've found run.test{tseries} and run.test{lawstat}. Both use a large sample approximation for distribution of the total number of runs in a sample of n1 observations of one type and n2 observations of another type. I've b

Re: [R] What is the difference between typeof and storage.mode?

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 7:54 PM, David Winsemius wrote: On Feb 10, 2010, at 7:47 PM, bluesky...@gmail.com wrote: On Wed, Feb 10, 2010 at 6:40 PM, David Winsemius > wrote: On Feb 10, 2010, at 6:34 PM, bluesky...@gmail.com wrote: S Programming by Venables and Ripley (2000) says on page 8, "R o

Re: [R] What is the difference between typeof and storage.mode?

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 7:47 PM, bluesky...@gmail.com wrote: On Wed, Feb 10, 2010 at 6:40 PM, David Winsemius > wrote: On Feb 10, 2010, at 6:34 PM, bluesky...@gmail.com wrote: S Programming by Venables and Ripley (2000) says on page 8, "R objects have another way to give information using the

Re: [R] What is the difference between typeof and storage.mode?

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 6:34 PM, bluesky...@gmail.com wrote: S Programming by Venables and Ripley (2000) says on page 8, "R objects have another way to give information using the function \tttext{typeof}, which often gives the same information as \tttext{storage.mode}." It implies that there are so

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 6:37 PM, Chaehan So wrote: > Ah, you were right and it was my bad (my original code was a > dataframe) - > but the main question remains: > > how can I access currentName in my loop - evaluated as a variable > although it is a string? > > createTable <- function(latentVari

Re: [R] expand the inside of command with rep ?

2010-02-10 Thread Don MacQueen
To construct the matrix that would result from your cbind() command, do this: x <- 1:15 matrix( rep(x,5) , ncol=5) [,1] [,2] [,3] [,4] [,5] [1,]11111 [2,]22222 [3,]33333 [4,]44444 [5,]555

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread Chaehan So
Dear Joe - that was wonderful :-) -Chaehan On Thu, Feb 11, 2010 at 12:44 AM, Joe Cheng wrote: > On Wed, Feb 10, 2010 at 3:37 PM, Chaehan So wrote: > >> how can I access currentName in my loop - evaluated as a variable although >> it is a string? >> > > I think you're looking for the "get" and

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread Joe Cheng
On Wed, Feb 10, 2010 at 3:37 PM, Chaehan So wrote: > how can I access currentName in my loop - evaluated as a variable although > it is a string? > I think you're looking for the "get" and "assign" functions. http://pbil.univ-lyon1.fr/library/base/html/get.html http://pbil.univ-lyon1.fr/library/

[R] Using system to call a program

2010-02-10 Thread Amitoj S. Chopra
How would you use the system function to call to use a certain program. i am a windows user for example i want to call python using R, by using system. python is located on my local drive, c:/python how do you use the system function -- View this message in context: http://n4.nabble.com/Using-sy

[R] What is the difference between typeof and storage.mode?

2010-02-10 Thread bluesky315
S Programming by Venables and Ripley (2000) says on page 8, "R objects have another way to give information using the function \tttext{typeof}, which often gives the same information as \tttext{storage.mode}." It implies that there are some differences between typeof and storage.mode. However, acc

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread Chaehan So
Ah, you were right and it was my bad (my original code was a dataframe) - but the main question remains: how can I access currentName in my loop - evaluated as a variable although it is a string? createTable <- function(latentVariableNames) { for (currentName in latentVariableNames) { doSomething

Re: [R] prompts and running means

2010-02-10 Thread Jim Burke
Perhaps the One R Tip a Day might be helpful. The first part of this example saves a png file. http://onertipaday.blogspot.com/2009/01/statistical-visualizations-part-2.html Good luck, Jim RagingJim wrote: Thanks mate, will get the zoo package ASAP. I have been working on the file open/save pa

Re: [R] Count variables by ID

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 5:58 PM, travelmail wrote: Hello, I have an education dataset and I'd like to know how to count the number of courses each student has taken in a particular subject. For instance, say the course codes for "History" are 20-26 & 31 and I have the following data Stude

Re: [R] using setMethod or setGeneric to change S4 accessor symbol from @ to $

2010-02-10 Thread Seth Falcon
Hi Markus, On 2/9/10 4:12 PM, Markus Weisner wrote: Thanks so much for your help. I am realizing that I may be over-complicating things for myself. I have learned a ton about creating methods, but I feel like I am trying to reinvent the data.frame class. Basically, I am trying to create a data

Re: [R] prompts and running means

2010-02-10 Thread RagingJim
Thanks mate, will get the zoo package ASAP. I have been working on the file open/save part, and it works as planned except for one bit. When I save it, it does not save as the relevant file type. This is again my code: require(tcltk) fileName<-tclvalue(tkgetSaveFile(filetypes="{{PNG Files} {.png

[R] mean calculation within dataframe corrupted

2010-02-10 Thread Chaehan So
Dear R-helpers, my little function below calculates the group score (tmpGroupMean) of an item, appends a "_mean" on its name and stores its value on this name. However, it does not calculate the mean of these scores (LVMean) in the same row correctly, as you can see in the below output which stran

[R] Count variables by ID

2010-02-10 Thread travelmail
Hello, I have an education dataset and I'd like to know how to count the number of courses each student has taken in a particular subject. For instance, say the course codes for "History" are 20-26 & 31 and I have the following data Student ID Course Code 1 16 1

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 5:12 PM, Chaehan So wrote: Thank you, it works for the first problem! Yet for the second problem, how can I solve that in one dataframe (here: latentVariableNames), I store the names of the according dataframes as strings, and then want to access the according datafra

[R] using step() with package geepack

2010-02-10 Thread Steve Taylor
I'm using the package geepack to fit GEE models. Does anyone know of methods for add1 and drop1 for a 'geeglm' model object, or perhaps a method for extractAIC based on the QIC of Pan 2001? I see there has been some mention of this on R-help a few years ago (RSiteSearch("QIC")). The package

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread Chaehan So
Thank you, it works for the first problem! Yet for the second problem, how can I solve that in one dataframe (here: latentVariableNames), I store the names of the according dataframes as strings, and then want to access the according dataframe (here: currentName) - see below? latentVariables <- c

Re: [R] Sampling from Bivariate Uniform Distribution

2010-02-10 Thread Greg Snow
The runif function generates random numbers from a uniform distribution, wrap those values into a matrix and you have a multi dimensional uniform distribution. If you want more than this, give us more detail. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg

Re: [R] color palette heatmap

2010-02-10 Thread Achim Zeileis
On Wed, 10 Feb 2010, joonR wrote: Hi, I'm kinda new of the R world. I need to use the heatmap or heatmap.2 function to plot correlation values. 2 questions: - how can I specify a color palette? (would like to have a transition from blue(-1) to white(0) to red(1)) In example(heatmap.2), there

Re: [R] How to create probeAnno object?

2010-02-10 Thread Dr. Viviana Menzel
Hello Ambuj, I found some information about probeAnno in the packages ccTutorial, davidTilling and Ringo. Objects can be created by calls of the form new("probeAnno", map, arrayName, genome). map: Object of class "environment" This map consists of four vectors for each chromosome/strand,

Re: [R] WMF conversion...

2010-02-10 Thread Jason Rupert
Thank you again for all your help. I ended up having a person convert the briefing using Adobe Acrobat.  The issue appears to be gone.  Whatever, MS is doing in PowerPoin 2007, as most might suspect, is corrupting the WMF image, which is their format! Ugh...I guess I have a work around.   

[R] Sampling from Bivariate Uniform Distribution

2010-02-10 Thread Haneef Anver
Hello all!!! 1) I am wondering is there a way to generate random numbers in R for Bivariate Uniform distribution? 2) Does R have  built-in function for generating random numbers for any given bivariate distribution. Any help would be greatly appreciated !! Good day! Haneef Anver

[R] How to sample from Bivariate Uniform Distribution

2010-02-10 Thread Haneef_An
Hello all!!! 1) I am wondering is there a way to generate random numbers in R for Bivariate Uniform distribution? 2) Does R have built-in function for generating random numbers for any given bivariate distribution. Any help would be greatly appreciated !! Good day! Haneef Anver --

[R] Simplify the code

2010-02-10 Thread li li
Hi all, I wrote the following code for the function that is attached. I want to simply the code. Can some one give me some help? The function is attached and the following is the code: ## f1 is the function calculate the valu

Re: [R] Hypercube in R

2010-02-10 Thread akastrin
Your solution seems wonderful. I'm going to uninstall ggobi :) Thanks again. Cheers, Andrej On Feb 10, 8:59 pm, "William Dunlap" wrote: > > -Original Message- > > From: r-help-boun...@r-project.org > > [mailto:r-help-boun...@r-project.org] On Behalf Of Andrej Kastrin > > Sent: Monday, Fe

[R] Installing the glmnet package.

2010-02-10 Thread gerald . jean
Hello, R version 2.8.0 (2008-10-20) on a linux-64-bit machine. I am trying to install the "glmnet" package and I get the following error: *** > install.packages(pkgs = "glmnet") trying URL 'http://cran.parentinginformed

Re: [R] expand the inside of command with rep ?

2010-02-10 Thread jim holtman
try this: > x <- 1:5 > x.list <- lapply(1:15, function(a) x) > do.call(cbind, x.list) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [1,]111111111 1 1 1 1 1 1 [2,]2222222

Re: [R] expand the inside of command with rep ?

2010-02-10 Thread Greg Snow
Something like this: > do.call( cbind, rep(list(1:10), 5) ) [,1] [,2] [,3] [,4] [,5] [1,]11111 [2,]22222 [3,]33333 [4,]44444 [5,]55555 [6,]66666 [7,]777

[R] expand the inside of command with rep ?

2010-02-10 Thread Xu Wang
Hi, I would like to be able to repeat a string within a command. I think there is an easy way but I can not figure out how. Here is an example. x<-1:15 I would like to turn this into the following matrix: xm<-cbind(x,x,x,x,x) But I would like to do so by having a command that repeats x within

Re: [R] Make a table using data with frequency

2010-02-10 Thread Marc Schwartz
On Feb 10, 2010, at 2:02 PM, Soyeon Kim wrote: > Dear All, > > What I want is change following data >> data > alc status age freq > 1 0 0 0 408 > 2 1 0 0 64 > 3 0 1 0 26 > 4 1 1 0 30 > 5 0 0 1 258 > 6 1 0 1 45 > 7 0 1 1

Re: [R] Novel (Maybe?) Visualizations

2010-02-10 Thread Johannes Huesing
D. Dashcle [Wed, Feb 10, 2010 at 01:13:58AM CET]: > > I'm interested in using R's plotting capabilities to try to generate a graph showing the relationship/pairing frequency of words appearing in a block of unstructured text. I don't have a specific algorithm or approach in mind, just look

Re: [R] Hypercube in R

2010-02-10 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Andrej Kastrin > Sent: Monday, February 08, 2010 12:37 PM > To: r-help@r-project.org > Subject: [R] Hypercube in R > > Dear all, > > Does anybody have an idea or suggestion how

[R] Make a table using data with frequency

2010-02-10 Thread Soyeon Kim
Dear All, What I want is change following data > data alc status age freq 1 0 0 0 408 2 1 0 0 64 3 0 1 0 26 4 1 1 0 30 5 0 0 1 258 6 1 0 1 45 7 0 1 1 78 8 1 1 1 66 To this table. age =0

Re: [R] write.zip?

2010-02-10 Thread Duncan Temple Lang
Hi Spencer I just put a new source version (0.9-0) of the Rcompression package on the www.omegahat.org/R repository and it has a new function zip() that creates or appends to a zip file, allowing one to provide alternative names. I'll add support for writing content from memory (i.e. AsIs char

Re: [R] Subscripting

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 2:26 PM, GL wrote: Dataframe1 contains a list of specific dates. Dataframe2 contains a large dataset, one element of which is Date. How do I create a subset of Dataframe2 that excludes the dates from Dataframe1? I know how to do it with a left outer join vs null in SQL

Re: [R] How to solve: Error in * unused argument(s) ?

2010-02-10 Thread Tal Galili
Uwe, thank you very much - that was the solution I was looking for! Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.

Re: [R] Subscripting

2010-02-10 Thread Greg Snow
Something like: > df3 <- df2[ !(df2$date %in% df1$date), ] Might be what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > pr

Re: [R] eval function with javascript-semantics possible in R?

2010-02-10 Thread Henrique Dallazuanna
Try this: fileName <- "testfile%s" lapply(sprintf(fileName, 1:2), read.csv, dec = ",") On Wed, Feb 10, 2010 at 5:28 PM, Chaehan So wrote: > Dear r-helpers, > > I am looking for an R-equivalent for the eval-function in javascript which > can > interpret a string as code on runtime, thereby allowi

[R] boxplot label cleanup

2010-02-10 Thread emorway
The boxplot below is close to what I would like, but needs some clean up. I've been unable to address the following: 1) How can I use the full extent of the plot space (there is white space on either side of the data)? 2) How can I reduce the # of month labels (e.g. every 3rd month Jan Mar Jun...

[R] eval function with javascript-semantics possible in R?

2010-02-10 Thread Chaehan So
Dear r-helpers, I am looking for an R-equivalent for the eval-function in javascript which can interpret a string as code on runtime, thereby allowing things like for (i in c(1:2)) { eval(items + "i") <- read.csv(eval(filename+ i), dec=","); } which would execute (with filename="testfile"): i

[R] Subscripting

2010-02-10 Thread GL
Dataframe1 contains a list of specific dates. Dataframe2 contains a large dataset, one element of which is Date. How do I create a subset of Dataframe2 that excludes the dates from Dataframe1? I know how to do it with a left outer join vs null in SQL, but I can't figure out how to do it more direc

[R] color palette heatmap

2010-02-10 Thread joonR
Hi, I'm kinda new of the R world. I need to use the heatmap or heatmap.2 function to plot correlation values. 2 questions: - how can I specify a color palette? (would like to have a transition from blue(-1) to white(0) to red(1)) - how can I use heatmap.2 imposing a specific order (like hclust.or

[R] Multiple tables by splitting column headings

2010-02-10 Thread streb006
I have a table in a txt document. The table has column headings that look like this: "1.a, 1.b, 1.c, 2.a, 2.b, 2.c" I would like to import these data to R as 2 tables (1 and 2), each with columns a, b, and c. I have seen this done before, but I cannot find the commands to make it happen. Thank

Re: [R] ggplot2 stacked line plot

2010-02-10 Thread Dennis Murphy
Hi: This is closer, but it is still not what you want; it does, however, show what geom_area is doing when it renders the plot, as can be seen by the colors. data.set <- data.frame( Time = c(rep(1, 4),rep(2, 4), rep(3, 4), rep(4, 4)), Type = rep(c('a', 'b', 'c', 'd'), 4), Value = c(10, 12,

Re: [R] R2HTML

2010-02-10 Thread Greg Snow
When I copy/paste/run your code below I get a file with the summary output in a nice table. Telling us your version, operating system, and other information requested in the posting guide may help. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail

Re: [R] Readjusting the OUTPUT csv file

2010-02-10 Thread Greg Snow
Amelia, I think your problem (or at least part of it) comes from the fact that in your learning of R syntax you learned about the magical shortcut index tool "$" without gaining an adequate appreciation and understanding of what that is a shortcut for (common misunderstanding). The great thing

Re: [R] How to solve: Error in * unused argument(s) ?

2010-02-10 Thread Uwe Ligges
On 10.02.2010 18:58, Tal Galili wrote: Hi all, For some reason, I would like to use functions bellow (see example code bellow), but instead I get the following error message: *Error in foo2(...) : unused argument(s) (arg3 = 3)* #- # example code #- foo1

Re: [R] Calculating mean for a number of columns

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 1:18 PM, Steve Murray wrote: Dear all, I am attempting to perform what should be a relatively simple calculation on a number of data frame columns. I am hoping to find the average on a per-row basis for each of the 50 columns. If on a particular row a 'NA' value is e

Re: [R] Integral of function of dnorm

2010-02-10 Thread Peter Dalgaard
Trafim Vanishek wrote: Dear all, How is it possible in R to calculate the following integral: Integral(-Inf, Inf)[log(dnorm(mean = 3, sd = 1))] how can I define that the density dnorm is taken on (-Inf, Inf) Thanks a lot! Er, if you mean integral with respect to the x argument in dnorm, then

[R] How to create probeAnno object?

2010-02-10 Thread AMBUJ
Hi,     I want to use segChrom() method in tilingArray package. For that I need to create a probeAnno object. I could not find much much info by ?probeAnno. I need help in creating  probeAnno object. Snap shot of the file(.txt): chr1 2500014 2500038 + 0.232689943122845 chr1 2500039 2500063 + 2.6

Re: [R] Installation require proxy settings (2)

2010-02-10 Thread Greg Snow
The http_proxy environmental variable should look something like: http://your.proxy.com:8080 (at least that is what mine looks like and it works), my http_proxy_user is just the word "ask" which makes it prompt me for my username and password (first time I connect each session). You can double

Re: [R] WMF conversion...

2010-02-10 Thread Marc Schwartz
On Feb 10, 2010, at 11:48 AM, Jason Rupert wrote: > Thank you very much for your reply. > > I guess I may be using the wrong terminology. I have Office 2007. In > PowerPoint 2007, I can navigate to "Save As" and then choose "PDF or XPS". > > That option is shown in the attached image. When

[R] Calculating mean for a number of columns

2010-02-10 Thread Steve Murray
Dear all, I am attempting to perform what should be a relatively simple calculation on a number of data frame columns. I am hoping to find the average on a per-row basis for each of the 50 columns. If on a particular row a 'NA' value is encountered, then this should be ignored and the mean for

Re: [R] Superimpose ksmooth() onto barplot

2010-02-10 Thread Greg Snow
One option is to use the updateusr function in the TeachingDemos package, the help page has examples of adding lines to barplots. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun..

[R] How to solve: Error in * unused argument(s) ?

2010-02-10 Thread Tal Galili
Hi all, For some reason, I would like to use functions bellow (see example code bellow), but instead I get the following error message: *Error in foo2(...) : unused argument(s) (arg3 = 3)* #- # example code #- foo1 <- function(arg1,...) { print(arg1) foo2(

[R] Integral of function of dnorm

2010-02-10 Thread Trafim Vanishek
Dear all, How is it possible in R to calculate the following integral: Integral(-Inf, Inf)[log(dnorm(mean = 3, sd = 1))] how can I define that the density dnorm is taken on (-Inf, Inf) Thanks a lot! [[alternative HTML version deleted]] __ R-h

Re: [R] WMF conversion...

2010-02-10 Thread Jason Rupert
Thank you very much for your reply. I guess I may be using the wrong terminology.  I have Office 2007.  In PowerPoint 2007, I can navigate to "Save As" and then choose "PDF or XPS". That option is shown in the attached image.  When using that I tried both "Standard" and "Minimum" size.  Both p

[R] Compose in roxygen - order of function application?

2010-02-10 Thread Stephen Tucker
Hello, I wonder if anyone has used the Compose() function in the 'roxygen' package. I find its behavior a bit surprising: > f <- function(x) x + 1 > g <- function(x) x * 2 > f(g(2)) [1] 5 > Compose(f,g)(2) [1] 6 > g(f(2)) [1] 6 > Compose(g,f)(2) [1] 5 I would have expected Compose(f,g)(x) == f(

[R] getting input from the console when running R in batch mode

2010-02-10 Thread jose romero
Hello list: I am using R through Geany in Ubuntu.  The way i have Geany configured is that upon invoking the exectute command, Geany does a "R myscript.out", thus getting all input from the myscript.R file and redirecting all output to the myscript.out file. This is a problem when I want to re

Re: [R] Total least squares linear regression

2010-02-10 Thread Paul Hiemstra
Hi, The wikipedia shows the matrix algebra that calculates Total regression, you could put this into R code to solve your problem. Also take a look at the pcrcomp or svd function for singular value decmoposition implementation. This would probably not be generic, but that is not a problem for

  1   2   >