Re: [R] Need help with my homework

2011-01-27 Thread Tal Galili
Hi Gaja, To the best of my knowledge, this forum is not for help with homeworks. Good luck with your study material. Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com

Re: [R] Need help with my homework

2011-01-27 Thread Tsjerk Wassenaar
Hey, To the best of my knowledge, this forum is not for help with homeworks. Probably it is, but it only works for those who can disguise their homework as Real Problems :) It might be good excercise to have a read of http://www.catb.org/~esr/faqs/smart-questions.html though. Cheers, Tsjerk

Re: [R] identifying when one element of a row has a positive number

2011-01-27 Thread Dennis Murphy
Hi: Try this: f - function(x) ifelse(sum(x 0) == 1L, names(which(x 0)), NA) g - function(x) ifelse(sum(x 0) == 2L, names(which(x == 0L)), NA) apply(df1[, 3:5], 1, f) [1] ANN CTA GLM NAANN NANANANACTA apply(df1[, 3:5], 1, g) [1] NANANANANANAGLM

Re: [R] Need help with my homework

2011-01-27 Thread Joshua Wiley
Dear Gaja, Here are a couple suggestions: 1) Read the R posting guide ( http://www.r-project.org/posting-guide.html ). There you will (would have) find out that A) the R-help list is not for homework questions and B) you will typically get more help if you show what you have tried (e.g., your

Re: [R] Extrapolating values from a glm fit

2011-01-27 Thread Dennis Murphy
Hi: Are you trying to find something analogous to the median dose? If so, look at function dose.p() in the MASS package and see if it does what you're looking for. It can take a vector of quantiles as input. HTH, Dennis On Wed, Jan 26, 2011 at 7:52 PM, Ahnate Lim ahn...@gmail.com wrote: Dear

[R] Unable to require installed package

2011-01-27 Thread 刘力平
Hi, I write a package in Linux and ready to distribute, and I can install it in linux and run it. However, when I have install it in my Windows' R. I can not 'require' it. is.element(grt, installed.packages()[,1]) [1] TRUE require(grt) Loading required package: grt Failed with error: ‘'grt'

Re: [R] Unable to require installed package

2011-01-27 Thread Barry Rowlingson
On Thu, Jan 27, 2011 at 7:57 AM, 刘力平 liping.li...@gmail.com wrote: Hi, I write a package in Linux and ready to distribute, and I can install it in linux and run it. However, when I have install it in my Windows' R. I can not 'require' it. is.element(grt, installed.packages()[,1]) [1]

Re: [R] Unable to require installed package

2011-01-27 Thread Prof Brian Ripley
On Thu, 27 Jan 2011, Barry Rowlingson wrote: On Thu, Jan 27, 2011 at 7:57 AM, 刘力平 liping.li...@gmail.com wrote: Hi, I write a package in Linux and ready to distribute, and I can install it in linux and run it. However, when I have install it in my Windows' R. I can not 'require' it.

[R] Increasing grayscale value in scatter plot with number of points on particular location

2011-01-27 Thread Aditya Bhagwat
Dear all, When making a plot with the command plot(xVector, yVector), there are many points that collide on the same place in the plot. In order to make this plot clearer, I have been looking for a way to colour the points based on the number of points that fall onto each other. If only one point

Re: [R] Hilbert Huang Transformation

2011-01-27 Thread Hans W Borchers
Jumlong Vongprasert jumlong.ubru at gmail.com writes: Dear All I try to use Hilbert Huang Transformation in R. How I can do. Many Thanks. The Hilbert-Huang transformation is a combination of empirical mode decomposition (EMD) and Hilbert Spectral Analysis. For both see the

[R] Help with nlminb and matlab translation

2011-01-27 Thread michalseneca
Hi , I would need to translate this from matlab to excelhowever I do not know the syntax for that I tried to replicate that with nlbmin...however how should i specify additional arguments ?. for now i Have..as this might be sufficient for me.However I get objective NaN in result/

Re: [R] pdf greek letter typos

2011-01-27 Thread Prof Brian Ripley
Please do read the help page (and state your platform). This is s known PDF viewer bug. E.g.: If you see problems with PDF output, do remember that the problem is much more likely to be in your viewer than in R. Try another viewer if possible. Symptoms for which the viewer

Re: [R] Increasing grayscale value in scatter plot with number of points on particular location

2011-01-27 Thread Prof Brian Ripley
This is one of the main points of supporting semi-transparent colours. You haven't told us your platform or graphics device (see the posting guide), but plotting with something like col=rgb(0,0,0,0.2) may work. On Thu, 27 Jan 2011, Aditya Bhagwat wrote: Dear all, When making a plot with the

Re: [R] Extrapolating values from a glm fit

2011-01-27 Thread Gavin Simpson
On Wed, 2011-01-26 at 19:25 -1000, Ahnate Lim wrote: Even when I try to predict y values from x, let's say I want to predict y at x=0. Looking at the graph from the provided syntax, I would expect y to be about 0.85. Is this right: predict(mylogit,newdata=as.data.frame(0),type=response)

[R] Sweave with pdf(): how to remove mention null device

2011-01-27 Thread Matthieu Stigler
Hi I am sorry, my question seems simple and must already have been asked, but I did not find any aswser on the archives :-( I am trying to use a plot in Sweave, where I include myself the statement results=tex,echo=FALSE= pdf(plot.pdf) plot(runif(100)) dev.off()

Re: [R] agnes clustering and NAs

2011-01-27 Thread Uwe Ligges
On 27.01.2011 05:00, Dario Strbenac wrote: Hello, In the documentation for agnes in the package 'cluster', it says that NAs are allowed, and sure enough it works for a small example like : m- matrix(c( 1, 1, 1, 2, 1, NA, 1, 1, 1, 2, 2, 2), nrow = 3, byrow = TRUE) agnes(m) Call:

Re: [R] how to resize heatmap without rescaling?

2011-01-27 Thread Uwe Ligges
See ?par and its argument mar. Uwe Ligges On 25.01.2011 05:00, Anton Kratz wrote: I am using R version 2.12.1 on Win XP. I have done a heatmap with dendrogram using the heatmap.2 function. The heatmap basically looks like I want it to be, but the labels of the columns are cut off. I.e. the

Re: [R] Unable to require installed package

2011-01-27 Thread Rainer Schuermann
On Thursday, January 27, 2011 08:57:01 am 刘力平 wrote: who sincerely thinks R is not google friendly, since R is a awful keyword. http://www.rseek.org/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Increasing grayscale value in scatter plot with number of points on particular location

2011-01-27 Thread Aditya Bhagwat
Dear Prof. Ripley, Thanks for your reply. This is one of the main points of supporting semi-transparent colours. You haven't told us your platform or graphics device (see the posting guide), but plotting with something like col=rgb(0,0,0,0.2) may work. I am working on Ubuntu Linux. and I

Re: [R] Increasing grayscale value in scatter plot with number of points on particular location

2011-01-27 Thread Aditya Bhagwat
I googled a bit and found that cairo needs to be installed on Ubuntu. Through Ubuntu package manager, I installed package r-cran-cairodevice, but that doesn't seem to solve the problem. Aditya On Thu, Jan 27, 2011 at 10:43 AM, Aditya Bhagwat bhagwatadi...@gmail.comwrote: Dear Prof. Ripley,

Re: [R] Need help with my homework

2011-01-27 Thread gaja
Hey Josh. Thanx for an explicit post, but I still can't get it. Would be nice if someone would just do that maths instead of posting forum isn't for that. I know its for R help and that, but if I can't do it, u could, huh? Problem here is, because I don't have anyone here to help me. And I can't

Re: [R] Need help with my homework

2011-01-27 Thread Bart Joosen
I think you focussed on the wrong post. You are discussing with Josh, but others already mentioned a good solution:ask google. It took me less than a minute to find a function which makes a random walk and plot the path. So if you are out there to study such code, go search for it, and if you

Re: [R] Need help with my homework

2011-01-27 Thread gaja
Bart.. I'm not visiting classic math college. Its finance math, and like I said.. I'm studying for ad least 6 hours at day, but if I can't get something, I just can't. I will check slowly all the posts again and try to find out, how to do it. Thanx anyway guys :) Gaja -- View this message in

Re: [R] Increasing grayscale value in scatter plot with number of points on particular location

2011-01-27 Thread Prof Brian Ripley
On Thu, 27 Jan 2011, Aditya Bhagwat wrote: Dear Prof. Ripley, Thanks for your reply. This is one of the main points of supporting semi-transparent colours. You haven't told us your platform or graphics device (see the posting guide), but plotting with something like

Re: [R] identifying when one element of a row has a positive number

2011-01-27 Thread Joshua Wiley
Hi, This problem seemed deceptively simple to me. After chasing a considerable number of dead ends, I came up with fg(). It lacks the elegance of Dennis' solution, but (particularly for large datasets), it is substantially faster. I still feel like I'm missing something, but

Re: [R] Need help with my homework

2011-01-27 Thread Siri Bjoner
What Josh meant (I think, apologies if I'm wrong) is that this forum isn't for homework, your professor/tutor is there for you to ask for help and advice. No-one is paid to answer questions here, everyone does it on their own spare time, and you wouldn't expect a total stranger to do your

Re: [R] Sweave with pdf(): how to remove mention null device

2011-01-27 Thread Prof Brian Ripley
Note that the 'problem' is with dev.off(), not pdf(), and the answer is ?invisible. pdf() invisible(dev.off()) On Thu, 27 Jan 2011, Matthieu Stigler wrote: Hi I am sorry, my question seems simple and must already have been asked, but I did not find any aswser on the archives :-(

[R] Warning with mle

2011-01-27 Thread Antje Niederlein
Hi there, I'm pretty new to the field of fitting (anything). I try to fit a distribution with mle, because my real data seems to follow a zero-inflated poisson distribution. So far, I tried a simple example to see whether I understand how to do it or not: # example count data x - 0:10 y -

Re: [R] adding error bars

2011-01-27 Thread Jim Lemon
On 01/27/2011 05:04 AM, ogbos okike wrote: Dear all, I am trying to add error bars on a boxplot but have encountered an error as indicated below. Is there a package I need to install or a library I have to load before this goes please. Thanks for any idea. Ogbos x-replicate(20,rnorm(50))

Re: [R] Sweave with pdf(): how to remove mention null device

2011-01-27 Thread Matthieu Stigler
great, solved! Thanks a lot for your quick help! Le 27. 01. 11 11:22, Prof Brian Ripley a écrit : Note that the 'problem' is with dev.off(), not pdf(), and the answer is ?invisible. pdf() invisible(dev.off()) On Thu, 27 Jan 2011, Matthieu Stigler wrote: Hi I am sorry, my question seems

[R] overlapping linear plots

2011-01-27 Thread anupam sinha
Hi all, Is there any way to plot multiple linear models(lm) on the same window. I have data in the following format where I would like get a log-log plot between 3rd column and 4th column and fit a straight line through the points. The problem is that I have multiple files with such a

Re: [R] Need help with my homework

2011-01-27 Thread Joshua Wiley
On Thu, Jan 27, 2011 at 1:41 AM, gaja gajahor...@hotmail.com wrote: Hey Josh. Thanx for an explicit post, but I still can't get it. Would be nice if someone would just do that maths instead of posting forum isn't for that. I know its for R help and that, but if I can't do it, u could, huh?

[R] How to xyplot without borders

2011-01-27 Thread Juan Andres Hernandez
Hello I have the following data.frame and xyplot. I need this plot without the borders. Does anybody know how to get this xyplot without borders o with white borders? Thank's in advance Juan Hernández my.label - data.frame(quantil=rep(20,8),

[R] Can not invoke maxent() of library(dismo) in GNU linux

2011-01-27 Thread Mao Jianfeng
Dear R-helpers and Dr. Hijmans, I can not invoke maxent() in GNU Linux. Could you give me any directions on that? There is maxent.jar in version 3.3.3e in the right folder. R: jar - paste(system.file(package=dismo), /java/maxent.jar, sep='') jar [1]

Re: [R] Extrapolating values from a glm fit

2011-01-27 Thread Gavin Simpson
On Thu, 2011-01-27 at 00:10 -1000, Ahnate Lim wrote: Thank you for the clarification, this makes sense now! dose.p from MASS also does the job perfectly, in returning x values for specified proportions. I'm curious, if I use the other parameter in predict.glm type=link (instead of

Re: [R] pdf greek letter typos

2011-01-27 Thread Claudia Beleites
Eduardo, On 01/27/2011 12:53 PM, Philipp Pagel wrote: caused by a problem with font substitution in some version of the poppler library which is uses by many LINUX PDF viewers. Try to view the file in acrobat reader and possibly other viewers. I'm running Ubuntu, and uninstalling package

Re: [R] agnes clustering and NAs

2011-01-27 Thread Gavin Simpson
On Thu, 2011-01-27 at 10:45 +0100, Uwe Ligges wrote: On 27.01.2011 05:00, Dario Strbenac wrote: Hello, In the documentation for agnes in the package 'cluster', it says that NAs are allowed, and sure enough it works for a small example like : m- matrix(c( 1, 1, 1, 2, 1, NA, 1,

Re: [R] Extrapolating values from a glm fit

2011-01-27 Thread Ahnate Lim
Thank you for the clarification, this makes sense now! dose.p from MASS also does the job perfectly, in returning x values for specified proportions. I'm curious, if I use the other parameter in predict.glm type=link (instead of type=response), in the case of a logistic binomial, what does this

Re: [R] adding error bars

2011-01-27 Thread kirtau
Have you tried using the arrows function with angle = 90? you will have to create a mean and standard error variable - - AK -- View this message in context: http://r.789695.n4.nabble.com/adding-error-bars-tp3238562p3242110.html Sent from the R help mailing list archive at Nabble.com.

[R] MONMLP neural network

2011-01-27 Thread Raji
Hi R-helpers, I am using MONMLP package for Neural network.I am able to do regression using that.Now, i want to use it for classification.Say, for classifying Iris dataset.I have not seen any example regarding that. Can you please let me know if classification is possible using monmlp NN? If so,

[R] install.packages

2011-01-27 Thread Temel Canpolat
Hi, I need to install lmtest package.I have tried to several times to install packages however I could not. Can anyone help? Best regards install.packages () --- Please select a CRAN mirror for use in this session --- Warning: unable to access index for repository

[R] help for a loop procedure

2011-01-27 Thread Serena Corezzola
Hello everybody! I’m trying to define the optimal number of surveys to detect the highest number of species within a monitoring season/session. To do this I want to run all the possible combinations between a set of samples and to calculate the total number of species for each combination of

Re: [R] Sweave with pdf(): how to remove mention null device

2011-01-27 Thread Kevin E. Thorpe
Hi there. Out of curiosity, why are you doing it that way instead of this: fig=TRUE,echo=FALSE= plot(runif(100)) @ Kevin On January 27, 2011 05:30:08 am Matthieu Stigler wrote: great, solved! Thanks a lot for your quick help! Le 27. 01. 11 11:22, Prof Brian Ripley a écrit : Note that the

[R] optim function multi variables -newbie

2011-01-27 Thread michalseneca
Hi , can i ask if somebody know the syntax for optim function with multiple variables: I have function f (params,y,g,h,j) returnig z y-C(0.2,0.5,0.6) where params-c(x1,x2) I define g,h,j and then I define params, then use optim to structure it ..however if i use syntax optim(params ,

Re: [R] Inconsistencies in the rpart.object help file?

2011-01-27 Thread Terry Therneau
splits, a matrix of split labels This is a mistake in the help file. I'm also not sure I understand what the yval2 columns signify (even that I read what it says in the help). For the kyphosis data set y is a factor with two levels. For the first split yval2 contains (1, 64, 17,

Re: [R] applying a set of rules to each row

2011-01-27 Thread KATSCHKE, ADRIAN CIV DFAS
Dennis, This is excellent. Thank you for the help. I knew I had a tangle mess, but I didn't realize how much of a tangle until I used this code. The coding definitely simplified the process and sped up the execution time. Adrian -Original Message- From: Dennis Murphy

Re: [R] Warning with mle

2011-01-27 Thread Ben Bolker
Antje Niederlein niederlein-rstat at yahoo.de writes: [snip] But what goes wrong if I want to display confidence intervals? I get a lot of warnings but I simply don't know why... confint(fit) Has it something to do with constraints for my parameters (lambda should be than zero and

[R] selection of hinge function with restrictions, machine learning, earth package,

2011-01-27 Thread Rasti Matus
Hi, I have a few questions regarding machine learning packages in R, e.g. earth package and its forward pass and prunning pass, and hinge functions selection in the example below. 1) How could I force the algorithm to generate knots in hinge function only with values 90 for e.g. variable doy?

[R] Quasi-poisson glm and calculating a qAIC and qAICc...trying to modilfy Bolker et al. 2009 function to work for a glm model

2011-01-27 Thread Jason Nelson
Sorry about re-posting this, it never went out to the mailing list when I posted this to r-help forum on Nabble and was pending for a few days, now that I am subscribe to the mailing list I hope that this goes out: I've been a viewer of this forum for a while and it has helped out a lot, but this

[R] Help needed

2011-01-27 Thread Ben Boyadjian
Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until the first appearance of a negative element.

[R] Writing program for these

2011-01-27 Thread Ben Boyadjian
Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until the first appearance of a negative element.

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
On 11-01-27 13:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. x - c(1, 1.3)

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
On 11-01-27 15:12, Sascha Vieweg wrote: On 11-01-27 13:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only

[R] adding error bars:Fixed

2011-01-27 Thread ogbos okike
Dear list, Indeed, there is no need adding error bars to boxplot. Points with error bars as suggested will be quite better. Many thanks to those who have advised me on this. Regards Ogbos On 27 January 2011 12:29, Jim Lemon j...@bitwrit.com.au wrote: On 01/27/2011 05:04 AM, ogbos okike wrote:

Re: [R] Writing program for these

2011-01-27 Thread Ben Bolker
Ben Boyadjian benjy_cy_21 at hotmail.com writes: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add

Re: [R] Inconsistencies in the rpart.object help file?

2011-01-27 Thread Tal Galili
Thank you Terry, I suspected that this was a mistake in the help file. Who should be contacted regarding this? Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew)

Re: [R] Writing program for these

2011-01-27 Thread Sascha Vieweg
On 11-01-27 14:24, Ben Bolker wrote: Ben Boyadjian benjy_cy_21 at hotmail.com writes: Double post? Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution

Re: [R] Writing program for these

2011-01-27 Thread Siri Bjoner
Siterer Sascha Vieweg saschav...@gmail.com: On 11-01-27 14:24, Ben Bolker wrote: Ben Boyadjian benjy_cy_21 at hotmail.com writes: Double post? Yes, probably just hoped that if he changed the subject someone would do his homework for him...

Re: [R] Help needed

2011-01-27 Thread Thomas Stewart
For question 2, TTT - rt(1000,3) mean(TTT[rank(TTT) = 975 rank(TTT) 25]) On Thu, Jan 27, 2011 at 8:16 AM, Ben Boyadjian benjy_cy...@hotmail.comwrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated

Re: [R] How to xyplot without borders

2011-01-27 Thread Peter Ehlers
On 2011-01-27 03:34, Juan Andres Hernandez wrote: Hello I have the following data.frame and xyplot. I need this plot without the borders. Does anybody know how to get this xyplot without borders o with white borders? Thank's in advance Juan Hernández my.label- data.frame(quantil=rep(20,8),

[R] creating categorical frequency tables from continuous data

2011-01-27 Thread Louise Mair
Hello, I am working with a dataset which essentially has only one column - a list of distances in metres, accurate to several decimal places. eg distance 1000 6403.124 1000 1414.214 1414.214 1000 I want to organise this into a frequency table, grouping into categories of 0 - 999, 1000 -

Re: [R] install.packages

2011-01-27 Thread Uwe Ligges
On 27.01.2011 11:16, Temel Canpolat wrote: Hi, I need to install lmtest package.I have tried to several times to install packages however I could not. Can anyone help? Best regards install.packages () --- Please select a CRAN mirror for use in this session --- Warning: unable to access

Re: [R] optim function multi variables -newbie

2011-01-27 Thread Uwe Ligges
On 27.01.2011 14:08, michalseneca wrote: Hi , can i ask if somebody know the syntax for optim function with multiple variables: I have function f (params,y,g,h,j) returnig z y-C(0.2,0.5,0.6) where params-c(x1,x2) I define g,h,j and then I define params, then use optim to structure it

Re: [R] Help needed

2011-01-27 Thread Peter Ehlers
On 2011-01-27 05:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until

[R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread adam_pgsql
Hi, I'd like to divide each element of a matrix by a specific value per column. These specific values are stored in a list. For example: x - c(1,2,3,4,5) y - matrix(c(1:30), nrow = 6) Now I want to divide each element in y[,1] by x[1], y[,2] by x[2] etc. I have tried this my_function -

Re: [R] Writing program for these

2011-01-27 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [cc'ing back to r-help] On 01/27/2011 10:06 AM, Ben Boyadjian wrote: Yes the it says the uniform distribution on the interval (-5,5). If this is real-valued (which again is not precisely defined, but that would be how I would interpret) then the

Re: [R] creating categorical frequency tables from continuous data

2011-01-27 Thread Sascha Vieweg
On 11-01-27 14:58, Louise Mair wrote: Hello, I am working with a dataset which essentially has only one column - a list of distances in metres, accurate to several decimal places. eg distance 1000 6403.124 1000 1414.214 1414.214 1000 I want to organise this into a frequency table, grouping

Re: [R] creating categorical frequency tables from continuous data

2011-01-27 Thread Dennis Murphy
Hi: Using your data below as the template, u - cut(x, breaks = c(0, seq(1000, 7000, by = 1000)), dig.lab = 4, right = FALSE) as.data.frame(table(u)) u Freq 1[0,1000)0 2 [1000,2000)5 3 [2000,3000)0 4 [3000,4000)0 5 [4000,5000)0 6 [5000,6000)0 7 [6000,7000)

Re: [R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread Dennis Murphy
Here's one way: y/outer(rep(1, nrow(y)), x) [,1] [,2] [,3] [,4] [,5] [1,]1 3.5 4.33 4.75 5.0 [2,]2 4.0 4.67 5.00 5.2 [3,]3 4.5 5.00 5.25 5.4 [4,]4 5.0 5.33 5.50 5.6 [5,]5 5.5 5.67 5.75 5.8 [6,]6 6.0 6.00 6.00 6.0 Run the outer

Re: [R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread Marc Schwartz
On Jan 27, 2011, at 9:18 AM, adam_pgsql wrote: Hi, I'd like to divide each element of a matrix by a specific value per column. These specific values are stored in a list. For example: x - c(1,2,3,4,5) y - matrix(c(1:30), nrow = 6) Now I want to divide each element in y[,1] by

[R] I am doint this because I dont know if I can just reply to the person that responded to me.

2011-01-27 Thread Ben Boyadjian
I sent this to Siri Bjoner so I dont know if that is allowed or even if it went through. Simulate 1000 observations from the student-t distribution with 3 degrees of freedom and then calculate the truncated mean by excluding bottom 5% and top 5%. This is the question I had and I posted

Re: [R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread Henrique Dallazuanna
Try this: sweep(y, 2, x, /) On Thu, Jan 27, 2011 at 1:18 PM, adam_pgsql adam_pg...@witneyweb.orgwrote: Hi, I'd like to divide each element of a matrix by a specific value per column. These specific values are stored in a list. For example: x - c(1,2,3,4,5) y - matrix(c(1:30), nrow =

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-27 Thread Tal Galili
Thanks again for the pointer to spread.labs Greg. I implemented it into the function and also extended it to deal with formulas so it could behave just like boxplot. Code and examples are available here: http://www.r-statistics.com/2011/01/how-to-label-all-the-outliers-in-a-boxplot/ I'd be happy

Re: [R] optim function multi variables -newbie

2011-01-27 Thread michalseneca
Hi, Basically what I am trying is to rewrite matlab code into R ...This is code for famous SABR model Calibration. I did most of the code up to optimalization issue. In the attachment you can find matlab and my unfinished R code..This is very helpful code...Basically I am trying to achieve the

[R] Measure execution time

2011-01-27 Thread Alaios
Dear list members, I would like to measure how much time one function call makes from the time is call until the time it returns. Could you please tell me if that is possible in R? Best Regards Alex __ R-help@r-project.org mailing list

Re: [R] Measure execution time

2011-01-27 Thread Douglas Bates
?system.time On Thu, Jan 27, 2011 at 10:31 AM, Alaios ala...@yahoo.com wrote: Dear list members, I would like to measure how much time one function call makes from the time is call until the time it returns. Could you please tell me if that is possible in R? Best Regards Alex

Re: [R] optim function multi variables -newbie

2011-01-27 Thread Hans W Borchers
michalseneca michalseneca at gmail.com writes: Hi, Basically what I am trying is to rewrite matlab code into R ...This is code for famous SABR model Calibration. I did most of the code up to optimalization issue. In the attachment you can find matlab and my unfinished R code..This is very

[R] adaptIntegral takes too much time

2011-01-27 Thread Alaios
Hello Dear List members, as you can see (and guess) from the code below adaptIntegrate(f,lowerLimit=c(-1,-1),upperLimit=c(.,.)) $integral [1] 9.997e-09 $error [1] 1.665168e-16 $functionEvaluations [1] 17 $returnCode [1] 0 adaptIntegrate(f,lowerLimit=c(-1,-1),upperLimit=c(1,1)) the

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-27 Thread Kevin Wright
My colleagues that use one of the .Net languages/libraries can make scatter plots that look better than R's because they have better spreading of the labels. If someone could spread this labels on the following graph, I would be impressed. plot(Sepal.Length~Sepal.Width, data=iris)

Re: [R] applying a set of rules to each row

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 8:45 AM, KATSCHKE, ADRIAN CIV DFAS wrote: Dennis, This is excellent. Thank you for the help. I knew I had a tangle mess, but I didn't realize how much of a tangle until I used this code. The coding definitely simplified the process and sped up the execution time.

[R] Problem converting zoo object (daily data) to a timeSeries object

2011-01-27 Thread John E. Kaprich
When I try to convert the zoo object to a timeSeries object, which would allow me to utilize Rmetrics packages, I get an error message. Data-read.zoo(c:\\DOWUBSPRICING.txt,na.strings=NA,sep=\t,header=T) is(Data) zoo as.timeSeries.zoo(Data) Error in .local (.Object, . ) Is this

[R] Issue with installing BRugs

2011-01-27 Thread Fahrbach, Kyle
Hello, all. When I try to install the most recent BRugs package (the one that uses version 3.1.2), found here: http://www.openbugs.info/w/UserContributedCode I get the following error: utils:::menuInstallLocal() Error in gzfile(file, r) : cannot open the connection In addition:

[R] GLM Empirical Likelihood

2011-01-27 Thread Antonio Paredes
Hello, I wanted to ask if there is an R package to fit GLM (logistic for example) via empirical likelihood. -- -Tony [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Issue with installing BRugs

2011-01-27 Thread Uwe Ligges
First for general info: Although I am listed as maintainer I am not maintaining this version currently. Thanks to the developers who offer this version and work on it. We will try to get a version on CRAN soon. For your specific question: Download the file and rename it to BRugs_0.6-1.zip.

[R] igraph package question

2011-01-27 Thread Yan Jiao
Dear R users, I'm using igraph package for clustering, just wondering is leading.eigenvector.community function result deterministic or not? I got slightly different results on different runs... Many thanks Yan

[R] Problems installing gputools

2011-01-27 Thread Noah Silverman
Hi, I have some surprising trouble installing the gputools package. This is a linux box running Fedora with an Nvidia GeForce GTX 260 card and R 2.12.1 I had gputools running on it for the past several months. Wanting to update to the newest version, I simply executed install.packages(gputools)

Re: [R] help for a loop procedure

2011-01-27 Thread Petr Savicky
On Thu, Jan 27, 2011 at 11:30:37AM +0100, Serena Corezzola wrote: Hello everybody! I?m trying to define the optimal number of surveys to detect the highest number of species within a monitoring season/session. To do this I want to run all the possible combinations between a set of

[R] Saving log file in R and display run time

2011-01-27 Thread Raquel Rangel de Meireles Guimarães
Hi all, I have two basic questions, hope you should help me: 1. How do I save a log file in R with the results? For example, in Stata it can be done by using log using c:\...\test.txt 2. How do I display the execution time of one function like the one below: CalculaCorrelacao -

[R] possible bug in packageVersion()?

2011-01-27 Thread Yihui Xie
Hi, I received a bug report from a French user who told me there was something wrong with the function packageVersion(), but packageDescription() worked well. Below is the session info; I'm not sure if other French users can reproduce the error message: packageVersion('base') Erreur :

Re: [R] Colour area under density curve

2011-01-27 Thread RICHARD M. HEIBERGER
David, I would do this with the HH package. Rich install.packages(HH) ## if you don't already have it library(HH) ## the first call is to learn the number .8162 and see what the scaling is. normal.and.t.dist(mu.H0=5.01, obs.mean=log(300), std.dev=.77, Use.alpha.left=TRUE,

[R] Errors in Integrate

2011-01-27 Thread mcitkowicz
Hello, I have written the function I would like to integrate in two ways: denfxn - function(yy,vv,a2,b2,mu2) { pp - 1-pnorm(yy/sqrt(vv)) part1 - pp^(a2-1) part2 - (1-pp)^(b2-1) part3 - dnorm(yy,mu2,sqrt(vv)) return(part1*part2*part3) } denfxnorg - function(yy,vv,a2,b2,mu2) {

[R] HLM Model

2011-01-27 Thread Belle
Hi I am trying to convert SAS codes to R, but some of the result are quite different from SAS. When I ran proc mixed, I have an option ddfm=bw followed by the model. How can I show this method in R (I am thinking that this maybe the reason that I can't get the similar results) below is my SAS

Re: [R] HLM Model

2011-01-27 Thread Doran, Harold
I think it should be fm - lmer(score ~ trt + pair + grade + school + (1|team), test) The unstructured covariance matrix you use in proc mixed is not available in Rs function for mixed models -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]

[R] normalizing prizes to a specific year - how to?

2011-01-27 Thread Martin Hvidberg
Dear list I have a large data frame with house prices. Prices have been converted to price per m2, to be able to compare. Prices are spread over almost 10 years, each price is tagged with the year it relates to. I would like to 'normalize' all the prices to, eg. 2010 prices. The data frame

Re: [R] Errors in Integrate

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 2:38 PM, mcitkowicz wrote: Hello, I have written the function I would like to integrate in two ways: denfxn - function(yy,vv,a2,b2,mu2) { pp - 1-pnorm(yy/sqrt(vv)) part1 - pp^(a2-1) part2 - (1-pp)^(b2-1) part3 - dnorm(yy,mu2,sqrt(vv)) return(part1*part2*part3)

Re: [R] Meaning of pterms in survreg object?

2011-01-27 Thread Johannes Huesing
Is there a special mailing list for the survival package where my question would have been more appropriate? Johannes Huesing johan...@huesing.name [Mon, Jan 10, 2011 at 09:26:37PM CET]: I am trying to model survival data with a Weibull distribution

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-27 Thread Greg Snow
Try: library(TeachingDemos) plot(Sepal.Length~Sepal.Width, data=iris) tmp.y - iris$Sepal.Length for( i in unique(iris$Sepal.Width) ) { tmp - iris$Sepal.Width == i tmp.y[ tmp ] - spread.labs( tmp.y[tmp], .6*strheight('A'), maxiter=1000 ) } # optional with(iris,

Re: [R] normalizing prices to a specific year - how to?

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 3:02 PM, Martin Hvidberg wrote: Dear list I have a large data frame with house prices. Prices have been converted to price per m2, to be able to compare. Prices are spread over almost 10 years, each price is tagged with the year it relates to. I would like to

Re: [R] Meaning of pterms in survreg object?

2011-01-27 Thread David Winsemius
You got a perfectly sensible reply from Thereau, the author of the package, a day after your posting and then failed to respond to his questions. I'm not sure what more you are expecting. -- David On Jan 27, 2011, at 3:43 PM, Johannes Huesing wrote: Is there a special mailing list for

[R] Modeling Binary x Binary Interactions with mlogit (and interpretation)

2011-01-27 Thread Marcel Gerds
Dear R community, I am using the mlogit package to analyze discrete choice data. Apart from a main effects model, I want to estimate interactions between the attributes of the choice set (e.g. the existence of a certain attribute) and some subject-specific data (like gender or income).

  1   2   >