Re: [R] Readjusting the OUTPUT csv file

2010-02-10 Thread Dieter Menne
Amelia wrote a few hundreds of lines This is too much reading. Please try to reduce you problem to 30 lines, and make the example self-contained (your data are not available). In 80% of the cases, the problem is self-resolved after it has been made self-contained. Dieter -- View this

Re: [R] write.zip?

2010-02-10 Thread Dieter Menne
spencerg wrote: I want to create a file with a name like dat.zip, being a zip file containing dat.csv. I can create dat.csv, then call system('zip -r9 dat.zip dat.csv'). Is there a better way? I can use gzfile to write a gz file, but I don't know how to give that a

Re: [R] write.zip?

2010-02-10 Thread Prof Brian Ripley
On Tue, 9 Feb 2010, spencerg wrote: Can one write a zip file from R? I want to create a file with a name like dat.zip, being a zip file containing dat.csv. I can create dat.csv, then call system('zip -r9 dat.zip dat.csv'). Is there a better way? Not really. One could use

Re: [R] Readjusting the OUTPUT csv file

2010-02-10 Thread Amelia Livington
Dear Sir,   I really appreciate your suggestion. I was having the probelm of expressing my problem precisely. In fact in my earlier mail, I have tried to write my probelm in my initial few paras only. The rest content is my actual R code which I have written and its working fine except for the

[R] R2HTML

2010-02-10 Thread Regina Schinner
I am having difficulties with R2HTML. If I try to generate a HTML file with the below code, the titles, horizontal line, and scatter plot are there, but the data summary [summary(iris)] is not. --- library(R2HTML) HTMLStart(file=myreport, extension=html, echo=FALSE, HTMLframe=TRUE)

Re: [R] Help Please!

2010-02-10 Thread Mike Williams
On Wed, Feb 10, 2010 at 2:47 AM, Nick Manginelli theman...@yahoo.com wrote: So I have to use this table of min, max, and mean temps for certain years http://www.stat.berkeley.edu/classes/s133/data/january.tab. I am supposed to figure out which year had the hottest January and which had the

[R] Installation require proxy settings (2)

2010-02-10 Thread Van Wyk, Jaap
Hi Thanks again to Greg, and Prof Ripley. Greg, I was trying to send you an email, but has been unsuccessful. Speaking to someone from our IT deparment, I am trying to follow your advice to implement the settings to my computer (using Windows), by using Control Panel. I have selected System in

Re: [R] Resampling a grid to coarsen its resolution

2010-02-10 Thread Steve Murray
That sounds like a sensible way of dealing with the - values... ...but doesn't solve the more important question of how to perform the resampling. Are there are functions in R which have been designed to achieve this? Or is there a standard way of going about this? Many thanks for any

Re: [R] Help Please!

2010-02-10 Thread Phil Spector
Please don't reply to this request. This is a student in one of my classes. - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] Readjusting the OUTPUT csv file

2010-02-10 Thread Jim Lemon
On 02/10/2010 06:02 PM, Amelia Livington wrote: Dear R helpers I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and

Re: [R] Re-execute previous command

2010-02-10 Thread mnstn
Anita and Greg, Thank you for the useful information. -- View this message in context: http://n4.nabble.com/Re-execute-previous-command-tp1474629p1475397.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Converting pdb to pqr

2010-02-10 Thread Amitoj S. Chopra
There are websites using python to convert a pdb to a pqr. I was wondering if there is a simpler way to do it. We have a protein in pdb format, and want to convert that to a pqr file so that the program apbs can open it. We want to accomplish this conversion in R. Thank you for your help. --

[R] Using R to format a file using a server (PDB to PQR file)

2010-02-10 Thread Amitoj S. Chopra
I am trying to write a program that uses R and takes a pdb file, and converts it to a pqr file. This task is simple generally, using the website, http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a pdb file (that is on hand) into the upload pdb file input, and run the website and

[R] RODBC Update image file into a MS-SQL database table

2010-02-10 Thread Baan Bapat
Hi, I am creating some graphs which I want to update into a database table. The procedure I am following is: 1. create the graphs as a png/jpeg file. 2. Read that file as a binary vector 3. sqlUpdate My code: pngfile - file(filename, rb) N - 1e6 repeat{ pngfilecontents -

Re: [R] R2HTML

2010-02-10 Thread Bart Joosen
Hi, Perhaps you could do HTML(summary(iris)) ? Bart -- View this message in context: http://n4.nabble.com/R2HTML-tp1475505p1475547.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] How to repeat the names?

2010-02-10 Thread Madhavi Bhave
Dear R helpers   I have a city.csv file as given below.   'city.csv' city_name1    city_name2 New York City    Buffallo     So I define   city_name = read.csv('city.csv') city1 = city_name$city_name1 city2 = city_name$city_name2   My problem is how do I repeat the names one after other

Re: [R] How to repeat the names?

2010-02-10 Thread Paul Hiemstra
Hi, Take a look at rep(), specifically the each = parameter. cheers, Paul Madhavi Bhave wrote: Dear R helpers I have a city.csv file as given below. 'city.csv' city_name1city_name2 New York CityBuffallo So I define city_name = read.csv('city.csv') city1 =

[R] replace a for loop

2010-02-10 Thread Ivan Calandra
Hi everybody! I'm still quite new in R and I don't really understand this whole vectorization thing. For now, I use a for loop (and it works fine), but I think it would be useful to replace it. I want to export the result of a test statistic, which is stored as a list, into a csv file. I

Re: [R] How to repeat the names?

2010-02-10 Thread Ivan Calandra
Hi! I'm kind of a newboe here, but I think it is because read.csv transforms the character variables to factors. Maybe try setting the argument as.is in read.csv(). Or try: rep(as.character(c(city1, city2)),5) That should work. HTH Ivan Le 2/10/2010 10:44, Madhavi Bhave a écrit : Dear R

Re: [R] How to repeat the names?

2010-02-10 Thread Romain Francois
Hello, That's not the problem here. The variables are read as factors. You can use the stringAsFactors argument of read.csv to turn this off: read.csv( 'city.csv', stringsAsFactors = FALSE ) and then you can proceed as you did. Romain On 02/10/2010 10:44 AM, Paul Hiemstra wrote: Hi,

Re: [R] replace a for loop

2010-02-10 Thread Liviu Andronic
On Wed, Feb 10, 2010 at 9:50 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: I'm still quite new in R and I don't really understand this whole vectorization thing. See [1] for an article on vectorisation and loops in R. Liviu [1] http://www.r-project.org/doc/Rnews/Rnews_2008-1.pdf

Re: [R] Using R to format a file using a server (PDB to PQR file)

2010-02-10 Thread Barry Rowlingson
On Wed, Feb 10, 2010 at 6:16 AM, Amitoj S. Chopra amit...@gmail.com wrote: I am trying to write a program that uses R and takes a pdb file, and converts it to a pqr file. This task is simple generally, using the website, http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a pdb file

Re: [R] Problems with looping in R

2010-02-10 Thread Dieter Menne
vikrant wrote: my-function(servername,dbname,dbtable){ ... final_set - NULL for(b_val in unique_b_vals) { temp1 = subset(init_data,init_data[,3] == b_val,) temp1 = temp1[sample(dim(temp1)[1], 200),] if

Re: [R] OrdFacReg

2010-02-10 Thread Peter Ehlers
Andrew, I've never used OrdFacReg, but a glance at the documentation suggests that you may have to pass your data through prepareData() first. Suggestions: 1. run the example in the docs and see if you can understand the bits and pieces; 2. is NB an ordered factor or is it just an integer

Re: [R] replace a for loop

2010-02-10 Thread Ivan Calandra
After reading the R news, I've tried this code and it works: rapply(list(names(test),test), write.csv, file=filename.csv, append=T, row.names=F) However, the output is structured like this: names(test)[[1]] names(test)[[2]] etc... test[[1]] test[[2]] etc... I would like to alternate

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

2010-02-10 Thread khazaei
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 __

[R] Help needed in fine tuning the sapply output

2010-02-10 Thread Girish A.R.
Hi All, Say I have a data set with the following structure: Lines - ID ref_rankR1 R2 R3 R4 R5 R6 A 6 3 NA NA7 8 2 B 7 4NA NA 9 5 10 C 3 7NA NA 8 10 8 D 4 2NA NA 4 8 1 E 2 5NA NA 4 7 7 F 8 5

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

2010-02-10 Thread jim holtman
?lines plot(...) lines(...) lines(...) On Wed, Feb 10, 2010 at 5:17 AM, 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

Re: [R] manipulate missing dates in a graphics a vector

2010-02-10 Thread Nilza BARROS
Thank you !! That's exactly what I need. Nilza Barros On Tue, Feb 9, 2010 at 10:50 PM, Dennis Murphy djmu...@gmail.com wrote: Hi: # Create a sequence of consecutive dates and assign to a data frame dates - data.frame(day = seq(as.Date('2009-12-01'), by = 'days', length = 10)) # Let's

Re: [R] How to repeat the names?

2010-02-10 Thread Madhavi Bhave
Dear Sirs,   Thanks a lot for your guidance. It worked wonderfully.   Regards   Madhavi --- On Wed, 10/2/10, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: From: Ivan Calandra ivan.calan...@uni-hamburg.de Subject: Re: [R] How to repeat the names? To: r-help@r-project.org Date: Wednesday, 10

Re: [R] Converting pdb to pqr

2010-02-10 Thread David Winsemius
On Feb 10, 2010, at 1:02 AM, Amitoj S. Chopra wrote: There are websites using python to convert a pdb to a pqr. I was wondering if there is a simpler way to do it. We have a protein in pdb format, and want to convert that to a pqr file so that the program apbs can open it. We want to

[R] WMF conversion...

2010-02-10 Thread Jason Rupert
Hello R-Help, I've got a bit of an issue with WMF's. I am working on WindowsXP and outputting WMF format images. I then take the WMF format images and insert them in PowerPoint. I take the PowerPoint and convert it to PDF. The WMFs are nothing special. Just the typical x-y plot with

[R] SF RUG 2010 kickoff next Tue: John Chambers Drinks!

2010-02-10 Thread Jim Porzak
All Bay Area useRs: Next Tuesday, Feb 16, is our 2010 kick-off meeting with keynote speaker John Chambers: http://www.meetup.com/R-Users/calendar/11203608/ Once again we would like to thank Predictive Analytics World for providing the meeting room. Before John's talk at 7:30, REvolution

Re: [R] WMF conversion...

2010-02-10 Thread Uwe Ligges
On 10.02.2010 13:16, Jason Rupert wrote: Hello R-Help, I've got a bit of an issue with WMF's. I am working on WindowsXP and outputting WMF format images. I then take the WMF format images and insert them in PowerPoint. I take the PowerPoint and convert it to PDF. The WMFs are nothing

Re: [R] WMF conversion...

2010-02-10 Thread Rodrigo Aluizio
Or maybe another output image format, such as tiff or png? 2010/2/10 Uwe Ligges lig...@statistik.tu-dortmund.de On 10.02.2010 13:16, Jason Rupert wrote: Hello R-Help, I've got a bit of an issue with WMF's. I am working on WindowsXP and outputting WMF format images. I then take the

Re: [R] Model matrix using dummy regressors or deviation regressors

2010-02-10 Thread John Fox
Dear Peng Yu, If this is indeed Peng Yu (as the email address seems to imply), I believe that you have a copy of my R and S-PLUS Companion to Applied Regression, where the answer is on p. 152, which describes the contrasts argument to lm; the contrasts argument to aov is similar. Hints: (1) the

Re: [R] WMF conversion...

2010-02-10 Thread Gabor Grothendieck
Check if your conversion utility lets you specify the resolution of the output and increase it. On Wed, Feb 10, 2010 at 7:16 AM, Jason Rupert jasonkrup...@yahoo.com wrote: Hello R-Help, I've got a bit of an issue with WMF's.   I am working on WindowsXP and outputting WMF format images.   I

[R] Create a function with multiple object as an output

2010-02-10 Thread Arnaud Mosnier
Dear useRs, I want to make a function that return several object (from a loop). I know, I can put them in a list, then the function return the list, but is it possible that it returns several independent object. I used the assign function to create several object, it works when I use it outside

[R] Problems with looping in R

2010-02-10 Thread vikrant
Dear R Experts, This is my R function. my-function(servername,dbname,dbtable){ library(RODBC) channel- odbcDriverConnect(paste(driver=SQL Server;server=,servername)) init_data- sqlQuery(channel,paste(select * from,dbname,..,dbtable)) init_data -

Re: [R] Problems with looping in R

2010-02-10 Thread vikrant
Thanks Dieter. It works. -- View this message in context: http://n4.nabble.com/Problems-with-looping-in-R-tp1475550p1475619.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Fast way to determine number of lines in a file

2010-02-10 Thread Indian_R_Analyst
Hi Hadley, Hope this is what you are looking for. This approach provides number of lines in a large 'bzip' file using chunks. testconn - file(xyzxyz.csv.bz2, open=r) csize - 1 nolines - 0 while((readnlines - length(readLines(testconn,csize))) 0 ) nolines - nolines+readnlines close(testconn)

[R] Help

2010-02-10 Thread K Jain
We get an error while using the following function.Please advise. newton.method(FUN = function(b) 10/b+sum(a)-10*sum((x^b)*a)/sum(x^b), init = 5,tol = 0.001) Error in deriv.default(as.expression(body(FUN)), nms, function.arg = TRUE) : Function 'sum' is not in the derivatives table

[R] Running rscript in windows

2010-02-10 Thread vikrant
Dear R experts, Suppose I have a small r function myfunction - function(x) { return(x*x) } and I save this function in a test.R text file. Suppose when I open a new seesion in R and I want to run this function myfunction(3) .how should i do it?? -- View this message in context:

[R] Column width in dbf file ... again ...

2010-02-10 Thread Arnaud Mosnier
Hello, First please excuse me for reposting the same question I sent a few weeks ago, but I did not have any answer ! I am trying to manually choose the width (i.e. number of character allowed) of columns containing text when creating dbf. files using write.dbf (library foreign). In particular,

Re: [R] WMF conversion...

2010-02-10 Thread Frank E Harrell Jr
It appears that Powerpoint is just getting in the way. Why not output high quality pdf or postscript graphics and use LaTeX Beamer to produce exceptionally high quality slides directly in pdf? Frank Jason Rupert wrote: Hello R-Help, I've got a bit of an issue with WMF's. I am working on

Re: [R] Using R to format a file using a server (PDB to PQR file)

2010-02-10 Thread Martin Morgan
On 02/09/2010 10:16 PM, Amitoj S. Chopra wrote: I am trying to write a program that uses R and takes a pdb file, and converts it to a pqr file. This task is simple generally, using the website, http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a pdb file (that is on hand) into

[R] How to call the R hidden function lgammacor ?

2010-02-10 Thread Xiaofei Zhao
Dear All, Do you happen to know how to call the R's hidden function lgammacor ? I exported this program and lgamma.c into matlab; however, I cannot obtain the same answer from the matlab version lgamma as the one from the R version lgamma. So I would love to know how to call lgammacor directly in

Re: [R] Create a function with multiple object as an output

2010-02-10 Thread Jim Holtman
you can return a single object, so a list is what you want. you can always break it apart after the return. What is the problem you are trying to solve? Sent from my iPhone. On Feb 10, 2010, at 8:31, Arnaud Mosnier a.mosn...@gmail.com wrote: Dear useRs, I want to make a function that

[R] heplot3d / rgl : example causes R GUI to crash

2010-02-10 Thread Michael Friendly
[Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end] I've run into a problem with the heplot3d() function in my heplots package which causes the R GUI to crash ('R for Windows GUI encountered a problem and needs to close...'). I think the problem comes from an rgl call, but,

[R] R Group on LinkedIn has new book discounts

2010-02-10 Thread Ajit de Silva
The R grouphttp://www.linkedin.com/groups?about=gid=77616trk=anet_ug_grpproon Linkedin.com has book discounts from CRC/Press as well as a new publisher to R, Manning. Manning's new book is introductory level and appears well written. Regards, Ajit -- _ Ajit

Re: [R] heplot3d / rgl : example causes R GUI to crash

2010-02-10 Thread Duncan Murdoch
On 10/02/2010 9:33 AM, Michael Friendly wrote: [Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end] This is probably a bug in rgl, and I can reproduce it. Bugs in contributed packages are best sent to the maintainer of the package, because otherwise they might be lost.

[R] Total least squares linear regression

2010-02-10 Thread Gnewbee
Dear all, After a thorough research, I still find myself unable to find a function that does linear regression of 2 vectors of data using the total least squares, also called orthogonal regression (see : http://en.wikipedia.org/wiki/Total_least_squares) instead of the ordinary least squares

Re: [R] estimators based on Truncated likelihood

2010-02-10 Thread Yohan Chalabi
HYC == helen...@utoronto.ca on Tue, 09 Feb 2010 22:07:27 -0500 HYC Dear Sir/Madam, HYC HYC May I know if there is any function that estimates the ARCH HYC or GARCH HYC models based on truncated likelihood? HYC HYC Thanks, HYC Helen Hi Helen, TLE has been used in

Re: [R] WMF conversion...

2010-02-10 Thread Thomas Lumley
PNG images have worked well for me we MS Office: it's a bitmap format, so you need to make sure you have enough pixels for the desired resolution at whatever size it ends up. -thomas On Wed, 10 Feb 2010, Jason Rupert wrote: Hello R-Help, I've got a bit of an issue with WMF's. I am

Re: [R] replace a for loop

2010-02-10 Thread Petr PIKAL
Hi how many objects do you have in a list? Loop is ineffective if you use several nested loops and/or there is some unnecessary mimic of simple function. e.g. you can use this set.seed(666) x - runif(10) vysled - 0 for(i in 1:length(x)) { if(vysled x[i]) vysled - vysled else vysled - x[i] }

Re: [R] Running rscript in windows

2010-02-10 Thread Uwe Ligges
On 10.02.2010 13:09, vikrant wrote: Dear R experts, Suppose I have a small r function myfunction- function(x) { return(x*x) } and I save this function in a test.R text file. Suppose when I open a new seesion in R and I want to run this function myfunction(3) .how should i do it??

Re: [R] write.zip?

2010-02-10 Thread spencerg
Thanks to Dieter Menne and Prof. Ripley for replies. For certain definitions of better (e.g., transportability?), the Rcompression package might be superior to the system call I mentioned. I also just found the tar function in the utils package, which looks like it might be more

Re: [R] heplot3d / rgl : example causes R GUI to crash

2010-02-10 Thread Duncan Murdoch
On 10/02/2010 11:07 AM, Michael Friendly wrote: Duncan Murdoch wrote: On 10/02/2010 9:33 AM, Michael Friendly wrote: [Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end] This is probably a bug in rgl, and I can reproduce it. Bugs in contributed packages are best sent

Re: [R] heplot3d / rgl : example causes R GUI to crash

2010-02-10 Thread Michael Friendly
Duncan Murdoch wrote: On 10/02/2010 9:33 AM, Michael Friendly wrote: [Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end] This is probably a bug in rgl, and I can reproduce it. Bugs in contributed packages are best sent to the maintainer of the package, because

Re: [R] WMF conversion...

2010-02-10 Thread Marc Schwartz
On Feb 10, 2010, at 6:16 AM, Jason Rupert wrote: Hello R-Help, I've got a bit of an issue with WMF's. I am working on WindowsXP and outputting WMF format images. I then take the WMF format images and insert them in PowerPoint. I take the PowerPoint and convert it to PDF. The

Re: [R] replace a for loop

2010-02-10 Thread Ivan Calandra
Well actually, in that case, I don't think it is really necessary to replace the loop because it is quite fast with the small size I have. But I thought it would help me to understand how would vectorization work and how to use the *apply functions. Thanks anyway for your piece of advice! Ivan

[R] mlogit: Error reported using sample dataset

2010-02-10 Thread Steve_Friedman
I've been working on a multinomial logit model, trying to predict vegetation types as a function of total phosphorus. Previous responses to my postings have pointed me to the mlogit package. I'm now trying to work examples and my data using this package. data(Fishing, package = mlogit) Fish -

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

[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.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

[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(g(x))

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 produced

[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] 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)

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] 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

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 using

[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 +

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,

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

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 #-

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] 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

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,

[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.

[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

[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

[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): items1

[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

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 chaehan...@gmail.com 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,

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-

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) |

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

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

[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] 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 to

Re: [R] Novel (Maybe?) Visualizations

2010-02-10 Thread Johannes Huesing
D. Dashcle d.dasc...@hotmail.com [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

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 78 8 1

[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] 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

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,]22222222

[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

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 wdun...@tibco.com wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrej Kastrin Sent:

[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

[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] 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

  1   2   >