Re: [R] question about constraint minimization

2010-11-20 Thread Hans W Borchers
dhacademic at gmail.com dhacademic at gmail.com writes: Hi, I am a beginner of R. There is a question about constraint minimization. A function, y=f(x1,x2,x3x12), needs to be minimized. There are 3 requirements for the minimization: (1) x2+x3+...+x12=1.5 (x1 is excluded); (2)

Re: [R] An empty grey diagram

2010-11-20 Thread Stephen Liu
Hi Josh and David, Problem solved. Both following steps work. 1) ToothGrowth attach(ToothGrowth) plot(dose,len) # this step is needed. Don't close the diagram. Otherwise following command won't work. matrics=lm(len~dose) abline(matrics) Graph displayed 2) ToothGrowth

Re: [R] how to apply sample function to each row of a data frame?

2010-11-20 Thread Petr Savicky
On Fri, Nov 19, 2010 at 07:22:57PM -0800, wangwallace wrote: actually, what I meant is to draw two random numbers from each row separately to create a new data frame. for example, an example output could be: 1 3 4 5 9 8 This may be done, for example X - matrix(1:9, ncol = 3, byrow =

[R] (no subject)

2010-11-20 Thread Stephen Liu
Hi folks, Please advise where can I down free data files for learning R? Google search brought me many, not easy for to screen. TIA B.R. Stephen L __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] (no subject)

2010-11-20 Thread Michael Bedward
Type data() to list the numerous example data sets included with the standard R distribution. Michael On 20 November 2010 20:42, Stephen Liu sati...@yahoo.com wrote: Hi folks, Please advise where can I down free data files for learning R?  Google search brought me many, not easy for to

Re: [R] (no subject)

2010-11-20 Thread Stephen Liu
Hi Michael, Thanks for your advice. data() only displays a list of files. Is there an easy to show the brief summary of files rather than calling each file. Besides I need the files on Excel format/extension. Where can I find them? TIA B.R. Stephen L - Original Message From:

Re: [R] (no subject)

2010-11-20 Thread Michael Bedward
On 20 November 2010 20:57, Stephen Liu sati...@yahoo.com wrote: Hi Michael, Thanks for your advice. data() only displays a list of files.  Is there an easy to show the brief summary of files rather than calling each file. What sort of summary do you want ? The data() command should display

[R] save a list as a matrix

2010-11-20 Thread Robert Ruser
Hello, Let's assume that one has a list: my.list - list(a=c(1,2,3,4),b=4,c=c(1:7)) I want to save my.list as a matrix in .txt file. Because of different length we can put NA or 0. Effect (row.names a, b and c are not necessary) a 1 2 3 4 0 0 0 b 4 0 0 0 0 0 0 c 1 2 3 4 5 6 7 How to do it?

[R] Zerodist

2010-11-20 Thread Matevž Pavlič
Hi all, I got the chfactor.c, line 130: singular matrix in function LDLfactor() Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim, : LDLfactor Error, probably because there are some point pairs with zero distance in the matrix. My question is, how can i delete

Re: [R] Who uses R with multicore, SNOW or CUDA package for resource intense computing?

2010-11-20 Thread Ajay Ohri
R doesnot have a 1 million or two million users (thats an Urban legend thanks to Vance NYT article) . The exact number is not proven and estimated by a variety of association by proxy methods. It could be as low as 5,00,000 or as many as 5 million users. It's like speculating which private

Re: [R] Kalman filter

2010-11-20 Thread Stefano Sofia
Federico, as far as I understand Kalman filter works under gaussian conditions, and for this reason it is not implemented. (I have to admit that I do not know the sspir package) hope this helps, and correct me if I am wrong Best regards Stefano Sofia PhD On 11/17/2010 11:49 AM, feder wrote:

Re: [R] save a list as a matrix

2010-11-20 Thread Robert Ruser
Hi Mohamed, It works. Thank you very much. Best, Robert 2010/11/20 mohamed.laj...@inserm.fr: Hi Robert, Try to do this  Len - max(sapply(my.list, length))  fun1 - lapply(my.list, function(x){      c(x, rep(0, Len))[1:Len]  })  do.call(rbind, fun1) M Regards

[R] How to produce a graph of glms in R?

2010-11-20 Thread Sonja Klein
I'm very new to R and modeling but need some help with visualization of glms. I'd like to make a graph of my glms to visualize the different effects of different parameters. I've got a binary response variable (bird sightings) and use binomial glms. The 'main' response variable is a measure of

Re: [R] save a list as a matrix

2010-11-20 Thread Henrique Dallazuanna
Try this also: t(sapply(my.list, '[', seq(max(sapply(my.list, length) On Sat, Nov 20, 2010 at 9:06 AM, Robert Ruser robert.ru...@gmail.comwrote: Hello, Let's assume that one has a list: my.list - list(a=c(1,2,3,4),b=4,c=c(1:7)) I want to save my.list as a matrix in .txt file. Because

[R] Where can I find a working libeay32.dll file for RCurl ?

2010-11-20 Thread Tal Galili
Hi all, I was trying to run the latest version of RCurl on windows 7 with R 2.12 and got a missing libeay32.dll error. I now downloaded such a file from here: http://code.google.com/p/aion-inside/source/browse/trunk/out/libeay32.dll?spec=svn10r=10 And placed it in the system32 folder. Now I get

[R] R + Linux Ubuntu 10.10

2010-11-20 Thread Maximilien Renard
Hi everyone, I've just installed Linux (K)Ubuntu 10.10 as well as R and I'm stuck with a very annoying problem. I've compiled the latest R version from the sources without any problem, sadly when I start R in a terminal, it does not behave as expected. In fact, I cannot use the arrow keys (up,

Re: [R] Zerodist

2010-11-20 Thread Mike Marchywka
Date: Sat, 20 Nov 2010 12:29:55 +0100 From: matevz.pav...@gi-zrmk.si To: r-sig-ecol...@r-project.org; r-sig-...@stat.math.ethz.ch; r-help@r-project.org Subject: [R] Zerodist Hi all, I got the chfactor.c, line 130: singular matrix in

Re: [R] R + Linux Ubuntu 10.10

2010-11-20 Thread Tobias Verbeke
Hi Maximilien, On 11/20/2010 01:51 PM, Maximilien Renard wrote: I've just installed Linux (K)Ubuntu 10.10 as well as R and I'm stuck with a very annoying problem. I've compiled the latest R version from the sources without any problem, sadly when I start R in a terminal, it does not behave as

Re: [R] R + Linux Ubuntu 10.10

2010-11-20 Thread Maximilien Renard
Thank you for your very quick answers ! In fact, re-compiling it with readline support did the trick. Have a nice day! Maximilien On 20 November 2010 14:08, Tobias Verbeke tobias.verb...@openanalytics.eu wrote: Hi Maximilien, On 11/20/2010 01:51 PM, Maximilien Renard wrote: I've just

[R] installimg fBasics SuSe 11.3 64bit

2010-11-20 Thread Jan Gairing
Hello, I've been trying to install the fBasics package on an openSuSe 11.3 64bit machine. It gives an error saying: WARNING: *R* *include* *directory* *is* *empty* -- *perhaps* *need* *to* *install* *R*-*devel*.*rpm* *or* similar Yet, R-devel is installed. Other packages work fine. I also tried

[R] How to produce glm graph

2010-11-20 Thread Sonja Klein
I'm very new to R and modeling but need some help with visualization of glms. I'd like to make a graph of my glms to visualize the different effects of different parameters. I've got a binary response variable (bird sightings) and use binomial glms. The 'main' response variable is a measure of

[R] Roxygen examples in DONTRUN mode - how?

2010-11-20 Thread Mark Heckmann
Dear list, I have just started to use roxygen and cannot find out how to specify NOT RUN examples. I know that to include R code examples works via the @examples tag followed by the code. Without roxygen, if I want R code not to be run when processing the .Rd files I would include the

[R] Setting a Red-Yellow-Green Color Transition in Image(...) with yellow corresponding with the Mean Value...

2010-11-20 Thread Jason Rupert
In the following example I would like to have the color transition from Red-yellow-green in the image(...) function, and if possible have the yellow be set to correspond with the mean value (for the below 75).   I was able to figure something like out when using filled.contour(...), e.g.

Re: [R] Setting a Red-Yellow-Green Color Transition in Image(...) with yellow corresponding with the Mean Value...

2010-11-20 Thread Duncan Murdoch
On 20/11/2010 8:53 AM, Jason Rupert wrote: In the following example I would like to have the color transition from Red-yellow-green in the image(...) function, and if possible have the yellow be set to correspond with the mean value (for the below 75). You can get the colour transition using

Re: [R] R + Linux Ubuntu 10.10

2010-11-20 Thread Dirk Eddelbuettel
On 20 November 2010 at 14:16, Maximilien Renard wrote: | Thank you for your very quick answers ! | | In fact, re-compiling it with readline support did the trick. Good but you may still want to read http://cran.r-project.org/bin/linux/ubuntu as there is no reason to rebuild the package

[R] Merge two ggplots

2010-11-20 Thread Alaios
Hello everyone. I am using ggplot and I need some help to merge these two plots into one. plot_CR-function(x,y,agentid,CRagent){   library(ggplot2)     agent-CRagent[[agentid]] # To make following expression shorter   ggplot((data.frame(x=CRX,y=CRY,sr=agent$sr)))+  

[R] Sample size with ANCOVA

2010-11-20 Thread XINLI LI
Dear R users: How to calculate the sample size with ANCOVA? For example, in a clinical trial, the correlation between the baseline and one-year follow-up blood pressure is 0.7, with a standrad devision 15, in order to detect a 10 difference between baseline and follow-up with a power =

Re: [R] Sample size with ANCOVA

2010-11-20 Thread Marc Schwartz
On Nov 20, 2010, at 8:31 AM, XINLI LI wrote: Dear R users: How to calculate the sample size with ANCOVA? For example, in a clinical trial, the correlation between the baseline and one-year follow-up blood pressure is 0.7, with a standrad devision 15, in order to detect a 10

Re: [R] How to produce glm graph

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 4:27 AM, Sonja Klein wrote: I'm very new to R and modeling but need some help with visualization of glms. I'd like to make a graph of my glms to visualize the different effects of different parameters. I've got a binary response variable (bird sightings) and use

Re: [R] Bold plot axis

2010-11-20 Thread john polo
On 11/19/2010 11:42 PM, Greg Snow wrote: Often when things look to small/thin it is because the plot is being created at too large a size, then shrunk. How are you creating the graph? How are you transferring it? Try creating the graph at the exact size that it will be when used in the

Re: [R] Merge two ggplots

2010-11-20 Thread Dennis Murphy
Hi: Perhaps a plus sign at the end of the line before geom_tile() would help. Dennis On Sat, Nov 20, 2010 at 6:30 AM, Alaios ala...@yahoo.com wrote: Hello everyone. I am using ggplot and I need some help to merge these two plots into one. plot_CR-function(x,y,agentid,CRagent){

[R] Import and export .xls

2010-11-20 Thread Stephen Liu
Hi folks, Whether I need following package to export R data to Excel spreadsheet and to import .xls file to R? xlsReadWrite http://www2.warwick.ac.uk/fac/sci/moac/degrees/modules/ch923/r_introduction/excel_in_r/ TIA B.R. Stephen L __

Re: [R] Import and export .xls

2010-11-20 Thread Gabor Grothendieck
On Sat, Nov 20, 2010 at 10:53 AM, Stephen Liu sati...@yahoo.com wrote: Whether I need following package to export R data to Excel spreadsheet and to import .xls file to R? xlsReadWrite http://www2.warwick.ac.uk/fac/sci/moac/degrees/modules/ch923/r_introduction/excel_in_r/ Yes, you can use

Re: [R] Zerodist

2010-11-20 Thread Matevž Pavlič
Hi, It's just that i have few points with the same coordinates and i would like to get riid of the duplicates so that Kriging would work. Thanks, m __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Roxygen examples in DONTRUN mode - how?

2010-11-20 Thread Mark Heckmann
I just found out myself: Just use the commands you would use in the normal .Rd files aftter the @examples tag in roxygen (i.e. @examples dontrun{ some r examples } Here comes a small roxygen docu example with an example that is NOT RUN.

Re: [R] Zerodist

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 11:18 AM, Matevž Pavlič wrote: Hi, It's just that i have few points with the same coordinates and i would like to get riid of the duplicates so that Kriging would work. ?duplicate ?unique -- David Winsemius, MD West Hartford, CT

Re: [R] Zerodist

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 11:23 AM, David Winsemius wrote: On Nov 20, 2010, at 11:18 AM, Matevž Pavlič wrote: Hi, It's just that i have few points with the same coordinates and i would like to get riid of the duplicates so that Kriging would work. ?duplicate Er, rather: ?duplicated

[R] how to draw manifold?

2010-11-20 Thread Carl Witthoft
Hi, I need some help either in how to configure variables for wireframe(), or some suggestions as to other graphics commands to use for plotting a 2-D manifold in 3-D space. Here is an example I tried (in the hopes that it would plot a helical line) : xsp-matrix(c(cos(seq(0,80)/5)),9,9)

Re: [R] Import and export .xls

2010-11-20 Thread Stephen Liu
Hi Gabor Thanks for your advice and URL Win 7 64 bit login as user I found following script:- [R] Excel Export in a beauty way https://stat.ethz.ch/pipermail/r-help/2009-June/200607.html Ran the script on R. After finish executed:- export.xls(iris) It seemed creating iris.xls on the fly.

[R] Changing the Significance Level in R for Hypothesis Tests and Regression Analysis

2010-11-20 Thread Daniel Carawan
Hi, I have been unable to find how to go about changing the significance level in R for hypothesis testing and regression analysis. R has a default setting to alpha=95% (a significance level of 95%), but I want to be able to decrease or increase this level when necessary. If you could give me

Re: [R] question about constraint minimization

2010-11-20 Thread dhacade...@gmail.com
Sorry for the unclear description in my last post. It is an error in my last post, that x4 should be in the range of [-1, 0] as it is identical to x1. Actually I think both constraint (for the requirement 1 and 2, so there are only 9 variables) and bounded (for the requirement 3) opt are needed

Re: [R] how to draw manifold?

2010-11-20 Thread Dennis Murphy
Hi: Here's an example stolen out of the scatterplot3d package vignette (p. 9): library(scatterplot3d) z - seq(-10, 10, 0.01) x - cos(z) y - sin(z) scatterplot3d(x, y, z, highlight.3d = TRUE, col.axis = 'blue', col.grid = 'lightblue', main = 'Helix', pch = 20) HTH, Dennis On Sat,

Re: [R] Changing the Significance Level in R for Hypothesis Tests and Regression Analysis

2010-11-20 Thread stephen sefick
I may be missing something, but the results of lm just give you a p-value and then you are in charge of setting a significance level. And as for hypothesis testing- like t-tests you are also in charge of the significance level. Am I missing something? On Sat, Nov 20, 2010 at 10:41 AM, Daniel

Re: [R] How to produce glm graph

2010-11-20 Thread Sonja Klein
Thanks for the advise. I tried predict but no matter what I do I always get an error message saying that the 'x' and 'y' differ in length. Most of my variables are also not categorical but continous of which I'm not sure how to deal with. R procedure of a simplified model with categorical

Re: [R] How to produce glm graph

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 12:22 PM, Sonja Klein wrote: Thanks for the advise. I tried predict but no matter what I do I always get an error message saying that the 'x' and 'y' differ in length. Most of my variables are also not categorical but continous of which I'm not sure how to deal with.

Re: [R] Changing the Significance Level in R for Hypothesis Tests and Regression Analysis

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 11:41 AM, Daniel Carawan wrote: Hi, I have been unable to find how to go about changing the significance level in R for hypothesis testing and regression analysis. R has a default setting to alpha=95% (a significance level of 95%), but I want to be able to decrease or

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Uwe Ligges
On 19.11.2010 21:43, Kjetil Halvorsen wrote: This is very strange. (Debian squeeze, R 2.12.0 compiled from source) I did some moderately large computation (including svd of a 560x50 matrix), running a few minutes, and R memory increasing to about 900MB on this 2 GB ram laptop. I had done

Re: [R] custom package not installed for 'arch=i386'

2010-11-20 Thread Uwe Ligges
On 18.11.2010 08:04, Yulia Arzhaeva wrote: Dear all, Since version R-2.12.0, I've got problems building an add-on package for R (imglib here) for 32-bit Windows. The following command is called: C:\Program Files\R\R-2.12.0\bin\i386\Rcmd build --binary imglib And here is an error I am

Re: [R] plot vs print ??

2010-11-20 Thread Uwe Ligges
On 18.11.2010 11:30, skan wrote: Hello everybody. My question arised from the output of lattice's histogram. But might be extended to any other object that could be printed. I think I've understood your answers, print calls the plot function when the object to be printed is a trellis plot

Re: [R] installimg fBasics SuSe 11.3 64bit

2010-11-20 Thread Uwe Ligges
On 20.11.2010 14:24, Jan Gairing wrote: Hello, I've been trying to install the fBasics package on an openSuSe 11.3 64bit machine. It gives an error saying: WARNING: *R* *include* *directory* *is* *empty* -- *perhaps* *need* *to* *install* *R*-*devel*.*rpm* *or* similar Yet, R-devel is

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Mike Marchywka
Date: Sat, 20 Nov 2010 18:45:42 +0100 From: lig...@statistik.tu-dortmund.de To: kjetilbrinchmannhalvor...@gmail.com CC: r-help@r-project.org Subject: Re: [R] ?summaryRprof running at 100% cpu for one hour ... On 19.11.2010 21:43, Kjetil Halvorsen wrote: This is very strange.

Re: [R] Accessing variables inside a namespace

2010-11-20 Thread Uwe Ligges
On 18.11.2010 02:12, Santosh Srinivas wrote: Hello Group, I am trying to see if there is way to access data that is inside another namespace. For e.g. the addATR function in the quantmod package calculates the ATR using the TTR package and then plots it to the graph. Now since it has already

Re: [R] memory profiling

2010-11-20 Thread Uwe Ligges
On 19.11.2010 21:48, Patrick Leyshock wrote: I'm trying to configure Version 2.12.0 or R to do memory profiling. I've reconfigured the code: % ./compile --enable-memory-profiling=YES and verified that it's configured correctly by examining the output. I then rebuild R: % make Then I fire

Re: [R] Cross Spectral Analysis

2010-11-20 Thread Uwe Ligges
See ?spec.pgram Uwe Ligges On 17.11.2010 16:43, Wonsang You wrote: Dear R helpers, I have two time series, and I want to perform the cross-spectral analysis for these time series. I would like to know whether there is any R function to generate cross-spectrum such as co-periodogram and

[R] Rlanguage plr and loadiing climatol package

2010-11-20 Thread David Potts
Hi List I am trying to call the R library function rosavent from the climatol package via the plr interface package to the postgres database. My code is a follows create or replace function w_graph() returns text as ' str - pg.spi.exec(select n,nne,ne,ene,e,ese,se,sse,s,ssw,sw,wsw,w,wnw,nw,nnw

Re: [R] Where can I find a working libeay32.dll file for RCurl ?

2010-11-20 Thread Tal Galili
o.k., I solved it. It was because my win user didn't have proper privileges to use the dll that came bundled in the RCurl package. After giving proper permission to the R folder, I reinstalled RCurl, and it loads fine. Sorry for the false alarm. Cheers, Tal Contact

Re: [R] Rlanguage plr and loadiing climatol package

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 3:25 PM, David Potts wrote: Hi List I am trying to call the R library function rosavent from the climatol package via the plr interface package to the postgres database. My code is a follows create or replace function w_graph() returns text as ' str - pg.spi.exec(select

Re: [R] RGoogleDocs stopped working

2010-11-20 Thread Tal Galili
Dear Farrel, Now, using the most updated version of the packages, I was able to make your example work for me - thank you very much for your help! Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845

[R] how to add frequencies to barplot

2010-11-20 Thread casperyc
Hi, I have count data x2=rep(c(0:3),c(13,80,60,27)) x2 0 1 2 3 13 80 60 27 I want to graph to be ploted as barplot(table(x2),density=4) how do I add relative frequency to it, like in hist(x2,labels=T) above the 'bar's Thanks. casper -- View this message in context:

Re: [R] Rlanguage plr and loadiing climatol package

2010-11-20 Thread Joe Conway
On 11/20/2010 12:55 PM, David Winsemius wrote: On Nov 20, 2010, at 3:25 PM, David Potts wrote: I am trying to call the R library function rosavent from the climatol package via the plr interface package to the postgres database. # select w_graph(); ERROR: R interpreter expression evaluation

[R] plotting a timeline

2010-11-20 Thread Marcin Gomulka
I was trying to recreate this kind of timeline plot: http://www.vertex42.com/ExcelArticles/create-a-timeline.html As you can see in their excel example, the events are nicely placed out on both sides of the timeline axis. AFAIK there is no function to do this nicely in R-project. Furthermore,

[R] txtProgressBar strange behavior in R 2.12.0

2010-11-20 Thread Jalla
Hi, I am running R 2.12.0 (windows). example(txtProgressBar) gives me some funny screen output with all kinds of special characters appearing and disappearing. It's happening on two different mashines since vs. 2.12.0. Is this a known issue? Best, Jalla -- View this message in context:

[R] Removing tick marks and Adding labels to lattice plots

2010-11-20 Thread kateF87
Hi all, I am trying to remove the current labels of the tick marks and replace them with text using xyplot within lattice right now I have tick marks at 1, 1.5, 2, 2.5, 3 I would like to transform them to say 'T1', 'T2', 'T3' thanks in advance Kathleen -- View this message in context:

Re: [R] Removing tick marks and Adding labels to lattice plots

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 6:32 PM, kateF87 wrote: Hi all, I am trying to remove the current labels of the tick marks and replace them with text using xyplot within lattice right now I have tick marks at 1, 1.5, 2, 2.5, 3 I would like to transform them to say 'T1', 'T2', 'T3' In the

[R] extraction of element

2010-11-20 Thread mmstat
Hello, I want only the value of Beta so the statement  Power-1-Beta[1] works right. How to do?  See code below Beta - integrate(dnorm,mean=0,sd=1, 2.3552,Inf) Power- 1-Beta[1] Sincerely, Mary A. Marion __ R-help@r-project.org mailing list

[R] Vectorizing a function that needs to access previous elements of a row

2010-11-20 Thread Amol Shelat
Hi, I'm a newbie when it comes to R, and I'm trying to figure out how to use vectorization as opposed to for loops. In particular, how can I create a function that is applied on each element of a row, but can access previous elements relative to that element? My problem: I want to calculate

Re: [R] Vectorizing a function that needs to access previous elements of a row

2010-11-20 Thread Joshua Wiley
Hi Amol, It depends on your exact needs, but one way, assuming you do not need to access previous calculations, only previous elements: x - 1:10 x[-10] / x[-1] The idea is first create a vector, x, then using negative indices, select the first 9 elements of x (i.e., 1:9) to be divded by the

Re: [R] extraction of element

2010-11-20 Thread Joshua Wiley
Hi Mary, You're really close, the issue is that you have a list, not a vector (see the documentation for ?integrate). So, you need to use: 1 - Beta[[1]] or (again relying on the documentation), you could also use $ and call it by name: 1 - Beta$value Cheers, Josh On Sat, Nov 20, 2010 at

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Kjetil Halvorsen
see below. 2010/11/20 Uwe Ligges lig...@statistik.tu-dortmund.de: On 19.11.2010 21:43, Kjetil Halvorsen wrote: This is very strange. (Debian squeeze, R 2.12.0 compiled from source) I did some moderately large computation (including svd of a 560x50 matrix), running a few minutes, and R

Re: [R] how to add frequencies to barplot

2010-11-20 Thread Remko Duursma
Hi Casper, try this: b - barplot(table(x2),density=4, ylim=c(0,100)) tx2 - table(x2) text(b,tx2+5, as.character(tx2)) greetings, Remko -- View this message in context: http://r.789695.n4.nabble.com/how-to-add-frequencies-to-barplot-tp3051923p3052067.html Sent from the R help mailing list

[R] density at particular values

2010-11-20 Thread Shant Ch
Hello everyone! I want to use density function of R to compute the density at x(=0, say). But it is giving me the 5-number summary and mean of the data and densities at that point. I just want the densities at different values specified by me. Can anyone let me know how can I find that?

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Kjetil Halvorsen
OK . I will try to give an reproducible example. the code I give refer to a 72x72 matrix Wna, which is given at the end of this message. This matrix contains NA's on the diagonal.I try an correspondence analysis on this matrix, with package anacor, which supports correspondence analysis of

Re: [R] density at particular values

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 8:07 PM, Shant Ch wrote: Hello everyone! I want to use density function of R to compute the density at x(=0, say). But it is giving me the 5-number summary and mean of the data and densities at that point. I just want the densities at different values specified by me.

[R] a philosophy R question

2010-11-20 Thread Erin Hodgess
Dear R People: Do we say that R is a programming language or a programming environment, please? Which is correct, please? Thanks in advance, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto:

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Mike Marchywka
Date: Sat, 20 Nov 2010 21:30:38 -0300 From: kjetilbrinchmannhalvor...@gmail.com To: lig...@statistik.tu-dortmund.de CC: r-help@r-project.org Subject: Re: [R] ?summaryRprof running at 100% cpu for one hour ... see below. 2010/11/20 Uwe Ligges : On 19.11.2010 21:43, Kjetil

Re: [R] a philosophy R question

2010-11-20 Thread Santosh Srinivas
Not many really care about what it is called but here is what the page says R is `GNU S', a freely available language and environment for statistical computing and graphics which provides a wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical

Re: [R] a philosophy R question

2010-11-20 Thread Erin Hodgess
I had seen it written as a Language . I had always thought of it as an environment. Thanks to all, Erin On Sat, Nov 20, 2010 at 8:25 PM, Santosh Srinivas santosh.srini...@gmail.com wrote: Not many really care about what it is called but here is what the page says R is `GNU S', a

Re: [R] density at particular values

2010-11-20 Thread Shant Ch
David, I did look at ?density many times. I think I didn't explain what I have to find. Suppose I have a data. x- c(rnorm(40,5,3),rcauchy(30,0,4),rexp(30,6)) Suppose I don't have information about the mixture, I have been given only the data. density(x) will give the 6 number summary of the

Re: [R] a philosophy R question

2010-11-20 Thread Spencer Graves
Wikipedia: (http://en.wikipedia.org/wiki/R_(programming_language): R is a programming language and software environment for statistical computing and graphics. www.r-project.org - What Is R?: R is a language and environment for statistical computing and graphics. I've routinely

Re: [R] density at particular values

2010-11-20 Thread Jorge Ivan Velez
Hi Shant, You could use approxfun() on the density as follows: # data set.seed(123) x - c(rnorm(40,5,3),rcauchy(30,0,4),rexp(30,6)) d - density(x) str(d) List of 7 $ x: num [1:512] -115 -115 -115 -114 -114 ... $ y: num [1:512] 3.24e-05 6.99e-05 1.40e-04 2.58e-04

Re: [R] a philosophy R question

2010-11-20 Thread Joshua Wiley
[with liberal snipping] Do we say that R is a programming language or a programming environment, please? Which is correct, please? I think the short answer is both. The long answer is it depends whether you are talking about the language or the program. Probably my favorite definition is by

[R] problem on installing package

2010-11-20 Thread Stephen Liu
Hi folks, install.packages(RthroughExcelWorkbooksInstaller) Installing package(s) into ‘C:\Users\satimiswin764\Documents/R/win-library/2.12’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- Error: subscript out of bounds install.packages() Installing

[R] Possible to add filled.contour(...) to existing plot?

2010-11-20 Thread Jason Rupert
By any chance is it possible to add filled.contour(...) to an existing plot like you can do using image(..., add = TRUE). I looked at the filed.contour(...) and levelplot(...) documentation, but it didn't seem to be possible. I would like to add filled.plot(...) as shown below instead

Re: [R] Possible to add filled.contour(...) to existing plot?

2010-11-20 Thread Billy
Hi Jason! I have suggested in another post how to plot more than one filled.contour graph at the same device. Maybe you could adapt that script to you specific problem. Look my suggestion at: http://r.789695.n4.nabble.com/several-Filled-contour-plots-on-the-same-device-td819040.html#a2332041 --

Re: [R] a philosophy R question

2010-11-20 Thread Bill.Venables
The conventional view used to be that S is the language and that R and S-PLUS are implementations of it. R is usually described as 'a programming environment for data analysis and graphics' (as was S-PLUS before it). However as the language that R implements diverges inexorably from the

[R] Can't invert matrix

2010-11-20 Thread Noah Silverman
Hi, I'm trying to use the solve() function in R to invert a matrix. I get the following error, Lapack routine dgesv: system is exactly singular However, My matrix doesn't appear to be singular. [,1] [,2] [,3] [,4] [1,] 0.99252358 0.93715047 0.7540535 0.4579895

[R] Problem on running update

2010-11-20 Thread Stephen Liu
Hi folks, Win 7 64bit R 2.12.) Today on running: update.packages() Error: subscript out of bounds Unable to proceed. I have been googling around and couldn't discover the cause. Pls help. TIA B.R. Stephen L __ R-help@r-project.org mailing

Re: [R] Can't invert matrix

2010-11-20 Thread Jorge Ivan Velez
Hi Noah, Could you please show us what you did? I can not reproduce your problem (sessionInfo below): m - matrix(scan(), ncol = 4, byrow = TRUE) 1: 0.99252358 0.93715047 0.7540535 0.4579895 5: 0.01607797 0.09616267 0.2452471 0.3088614 9: 0.09772828 0.58451468 1.4907090 1.8773815 13:

Re: [R] Can't invert matrix

2010-11-20 Thread Spencer Graves
Your matrix has rank 3: A - matrix(c(0.99252358, 0.93715047, 0.7540535, 0.4579895, + 0.01607797, 0.09616267, 0.2452471, 0.3088614, + 0.09772828, 0.58451468, 1.4907090, 1.8773815, + -0.0100, 0., 0.090, 0.170), +

Re: [R] density at particular values

2010-11-20 Thread David Winsemius
On Nov 20, 2010, at 9:34 PM, Shant Ch wrote: David, I did look at ?density many times. I think I didn't explain what I have to find. Suppose I have a data. x- c(rnorm(40,5,3),rcauchy(30,0,4),rexp(30,6)) Suppose I don't have information about the mixture, I have been given only the data.

Re: [R] Can't invert matrix

2010-11-20 Thread Bill.Venables
What you show below is only a representation of the matrix to 7dp. If you look at that, though, the condition number is suspiciously large (i.e. the matrix is very ill-conditioned): txt - textConnection( + 0.99252358 0.93715047 0.7540535 0.4579895 + 0.01607797 0.09616267 0.2452471

[R] Counting things in a time series.

2010-11-20 Thread Noah Silverman
Hi, I have a process (not in R) that records events with a time stamp. So, I have a huge series of maybe 100,000 time stamps. I'd like to break it up into hourly (Or daily) intervals and then count how many events occurred in each interval. That way I can graph it. Ideally, converting the

Re: [R] Can't invert matrix

2010-11-20 Thread Noah Silverman
Thanks for the explanation. I'm taking a class (in grad school these days) on advanced derivatives (financial, not calculus). One of the valuation strategies involves building two matrices and then solving. This matrix is for the particular group of call options I selected based on other

Re: [R] use sample function to create new data frame

2010-11-20 Thread Wu Gong
Hi, I would try to sample by row index and column index. Hope it helps. df - data.frame(matrix(1:18,nrow=3,ncol=6,byrow=TRUE)) colnames(df) - c(letters[1:3],LETTERS[1:3]) ## Generate a new data frame with 10 rows one - two - three - numeric(10) for (i in 1:10) { ## Sample from type I col.1 -

Re: [R] Problem on running update

2010-11-20 Thread Martin Morgan
On 11/20/2010 08:56 PM, Stephen Liu wrote: Hi folks, Win 7 64bit R 2.12.) Today on running: update.packages() Error: subscript out of bounds Unable to proceed. I have been googling around and couldn't discover the cause. Pls help. TIA Hi Stephen -- maybe

[R] solve nonlinear equation using BBsolve

2010-11-20 Thread Roslina Zakaria
Hi r-users, I would like to solve system of nonlinear equation using BBsolve function and below is my code.  I have 4 parameters and I have 4 eqns. mgf_gammasum - function(p) { t  - rep(NA, length(p)) mn - 142.36 vr - 9335.69 sk - 0.8139635 kur - 3.252591 rh  - 0.896 # cumulants k1 -

Re: [R] density at particular values

2010-11-20 Thread Bill.Venables
It's actually not too difficult to write the density function itself as returning a function rather than a list of x and y values. Here is a no frills (well, few frills) version: ### cut here ### densityfun - local({ normd - function(value, bw) { force(value); force(bw) function(z)

Re: [R] solve nonlinear equation using BBsolve

2010-11-20 Thread Berend Hasselman
Roslina Zakaria wrote: Hi r-users, I would like to solve system of nonlinear equation using BBsolve function and below is my code.  I have 4 parameters and I have 4 eqns. mgf_gammasum - function(p) { t  - rep(NA, length(p)) mn - 142.36 vr - 9335.69 sk - 0.8139635 kur - 3.252591

Re: [R] Color Alaska in USA map

2010-11-20 Thread Ray Brownrigg
Did you try USA:Alaska? That should work. I don't have the latticeExtra package installed so I cannot easily test your code, but map(world, c(USA, Hawaii), fill=TRUE) looks OK to me. However you don't actually show the code you are using when attempting to colour Alaska. HTH, Ray Brownrigg