Re: [R] Errorbar

2014-02-18 Thread R. Michael Weylandt michael.weyla...@gmail.com
Have you seen the examples at docs.ggplot2.org/0.9.3.1/geom_errorbar.html ? On Feb 18, 2014, at 10:57, Alzahrani, Ahmad K A aka...@essex.ac.uk wrote: Hi All, Can anyone show me how to add a error bar to my graphs. I am currently using this code g-ggplot(means,aes(x=variable,y=value))

Re: [R] Setting up an R server.

2014-01-20 Thread R. Michael Weylandt
Perhaps http://www.rstudio.com/ide/docs/server/getting_started Michael On Mon, Jan 20, 2014 at 9:12 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: Can someone provide suggestions about how to best set up an R server? I would like to be able to run R on my IPad. It sounds like the only way

Re: [R] quotation marks and scan

2013-11-17 Thread R. Michael Weylandt michael.weyla...@gmail.com
They're not actually there so don't try too hard to rid yourself of them: x - \' length(x) print(x) cat(x, \n) Make sure you're clear on the difference between what's stored by the computer and what it print()s. Rarely the same, though cat() is often slightly more honest. On Nov 17, 2013,

Re: [R] quotation marks and scan

2013-11-17 Thread R. Michael Weylandt
On Sun, Nov 17, 2013 at 6:24 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Sun, Nov 17, 2013 at 10:42 PM, R. Michael Weylandt michael.weyla...@gmail.com michael.weyla...@gmail.com wrote: Did you mean to do 'nchar(x)' to show that \ was one character? 'length' gives the number

Re: [R] Manually setting coefficients in an lm.

2013-11-12 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Nov 12, 2013, at 11:59, coll...@pitt.edu wrote: Think you're going to have to explicitly define hand tailor. I haven't a clue what you mean. (Someone else might of course). Ah, I want to set a specific coefficient value for each of the terms rather than rely on training. Thus given:

Re: [R] Load Tawny package on R 2.15.3

2013-11-01 Thread R. Michael Weylandt michael.weyla...@gmail.com
The release version of tawny has no such dependency and builds just fine on CRAN. Try updating that instead. Michael On Nov 1, 2013, at 7:10, Tstudent tstud...@gmail.com wrote: I have R version 2.15.3 When i try to load it: library (tawny) i receive this response: package

Re: [R] an rpy2, R cgi type question

2013-10-31 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Oct 31, 2013, at 1:50, Erin Hodgess erinm.hodg...@gmail.com wrote: Hi again: Here is the web output: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. So your Python code is raising an exception somewhere,

Re: [R] an rpy2, R cgi type question

2013-10-31 Thread R. Michael Weylandt michael.weyla...@gmail.com
, and the error appears on the line in which I open the bz2.R file. It's definitely there, and I set the permissions to 777 for experimental permissions. On Thu, Oct 31, 2013 at 7:04 AM, R. Michael Weylandt michael.weyla...@gmail.com michael.weyla...@gmail.com wrote: On Oct 31, 2013

Re: [R] rpy2 and user defined functions from R

2013-10-30 Thread R. Michael Weylandt michael.weyla...@gmail.com
Could you produce a full working example then? Bit hard to debug without knowing what you did. Michael On Oct 30, 2013, at 9:11, Erin Hodgess erinm.hodg...@gmail.com wrote: I did...just didn't show it On Wed, Oct 30, 2013 at 7:01 AM, Michael Weylandt michael.weyla...@gmail.com wrote:

Re: [R] An Apply function question about changing type of variable

2013-09-27 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Sep 27, 2013, at 11:27, Vincent Guyader vincent.guya...@allstat.fr wrote: Hi everyone, plese can you look at this few lines : data(iris) res-apply(iris,MARGIN=2,is) res[1,] the result is : Sepal.Length Sepal.Width Petal.Length Petal.Width Species character character

Re: [R] problem with rJython and modules

2013-09-12 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Sep 12, 2013, at 13:42, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: I have been experimenting with rPython, rSymPy, and rJython. Here is my latest snag: library(rJython) Loading required package: rJava Loading required package: rjson library(rSymPy) rJython -

Re: [R] Appropriateness of R functions for multicore

2013-08-23 Thread R. Michael Weylandt
On Mon, Aug 19, 2013 at 2:08 PM, Patrick Connolly p_conno...@slingshot.co.nz wrote: On Sat, 17-Aug-2013 at 05:09PM -0700, Jeff Newmiller wrote: | In most threaded multitasking environments it is not safe to | perform IO in multiple threads. In general you will have difficulty | performing IO

Re: [R] How to rebuild an R package that has been removed from CRAN?

2013-08-23 Thread R. Michael Weylandt
On Mon, Aug 19, 2013 at 6:07 PM, Shang Zuofeng zuofengsh...@gmail.com wrote: So this is an alternative method. The package can be installed from source() rather than rebuilt. Although the warnings exist, the package itself may still be useful. Can you let me know how to installed from source?

Re: [R] model syntax processed --- probably common

2013-08-19 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Aug 19, 2013, at 16:05, ivo welch ivo.we...@gmail.com wrote: thank you. but uggh...sorry for my html post. and sorry again for having been obscure in my attempt to be brief. here is a working program. fama.macbeth - function( formula, din ) { I think most users would expect 'din'

Re: [R] constructing a daily time series

2013-07-25 Thread R. Michael Weylandt
On Mon, Jul 22, 2013 at 11:17 PM, Pascal Oettli kri...@ymail.com wrote: Hello, ?zoo Regards, Pascal 2013/7/23 shanxiao shanx...@umail.iu.edu Dear all, I have a vector of observations through day, and based on it, I try to construct a daily time series with the R function ts(), but

Re: [R] how to calculate the average values of each row in a matrix

2013-07-19 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Jul 19, 2013, at 20:19, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello, I have a matrix (class matrix) composed of GridCell (row and column). The matrix value is the beta diversity index value between two grids. Now I would like to get the average value of each GridCell. Please

Re: [R] Announcing TIBCO Enterprise Runtime for R

2013-07-11 Thread R. Michael Weylandt
Hi Louis, I apologize in advance if this isn't the right forum; feel free to direct me elsewhere. Can you say a bit more about what exactly constitute the advantages of TERR over R as most readers of this list know it? Some random points of interest to me: 1. Do you have concrete benchmarks of

Re: [R] how to get growth rate of a (time series) data?

2013-06-19 Thread R. Michael Weylandt
On Wed, Jun 19, 2013 at 12:04 PM, Yanyuan Zhu y...@tongji.edu.cn wrote: Hello all, now I'm trying to switch from Excel to R to deal with the data, and as a newbie i got the problem as follows. suppose I have a data named test test- data.frame(year=c(1996:2011),

Re: [R] p values of lmer

2013-06-19 Thread R. Michael Weylandt
On Wed, Jun 19, 2013 at 10:27 AM, meng laomen...@163.com wrote: Hi all: I met a question about lmer. fm1 - lmer(Reaction ~ Days + (Days|Subject), sleepstudy) summary(fm1) ... Fixed effects: Estimate Std. Error t value (Intercept) 251.405 6.825 36.84 Days

Re: [R] chi square test

2013-06-17 Thread R. Michael Weylandt
On Mon, Jun 17, 2013 at 9:14 AM, Dave Clark d...@mailbox.co.uk wrote: I`m doing the chi square test in R, see below code: row1 - c(27,17,13,21,80,24,35,41,18,51) #Category A (1-10) counts row2 - c(27,11,26,13,30,28,17,30,10,21) #Category B (1-10) counts data.table - rbind(row1,row2)

Re: [R] chi square test

2013-06-17 Thread R. Michael Weylandt
On Mon, Jun 17, 2013 at 10:07 AM, peter dalgaard pda...@gmail.com wrote: On Jun 17, 2013, at 10:36 , R. Michael Weylandt wrote: What do you mean 'results of individual cells'? As documented in ?chisq.test, you might be looking for one or more of data.table$observed data.table$expected

Re: [R] rename and concatenate name of columns

2013-06-16 Thread R. Michael Weylandt
On Sat, Jun 15, 2013 at 1:45 AM, David Winsemius dwinsem...@comcast.net wrote: On Jun 14, 2013, at 1:25 PM, Bert Gunter wrote: For the record: ... A bit of commentary: Something did happen. It's just that you didn't do anything with _what_ happened. The copy of the

Re: [R] highlighted a certain time period on multiple plots

2013-06-06 Thread R. Michael Weylandt
On Thu, Jun 6, 2013 at 6:43 AM, Ye Lin ye...@lbl.gov wrote: Hey All, I have a dataset like this: DatedayVar1Var2Var3Obs1/1/2013Tue23411/2/2013Wed23521/3/2013Thu24631/4/2013 Fri24741/5/2013Sat24.5851/6/2013Sun24.9961/7/2013Mon25.31071/8/2013Tue25.711

Re: [R] Finding Beta

2013-06-04 Thread R. Michael Weylandt
Put your data in a real time series (xts) object and use the CAPM.* functions from the PerformanceAnalytics package. MW On Tue, Jun 4, 2013 at 10:15 AM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R forum I have a dataframe (of prices) as given below - dat = data.frame(company =

Re: [R] cURL ?

2013-05-03 Thread R. Michael Weylandt
On Fri, May 3, 2013 at 11:31 AM, jawad hussain miyanja...@hotmail.com wrote: Dear Sir I tried to find cURL on web but I do not find reliable file; there are some files on http://curl.haxx.se/. But I do not know which is suitable for R and how to install? Kind Regards As usual, the OS is

Re: [R] task percentage completion

2013-05-01 Thread R. Michael Weylandt
cautions were against taking it all too seriously. MW I don't want to spend too much time figure out how this progress bar works. I am not clear if the code should run in the main R or where. On 4/30/2013 13:11, R. Michael Weylandt wrote: On Tue, Apr 30, 2013 at 10:40 AM, Fabio Berzaghi f

Re: [R] rpy2 postgres qgis problem

2013-05-01 Thread R. Michael Weylandt
On Wed, May 1, 2013 at 3:05 PM, Enzo Cocca enzo@gmail.com wrote: Hello every body, I am using rpy2_2.0.8 with postgres and Qgis. The code that I wrote is the following: def on_calcola_pressed (self): # bottone per calcoli statistici import rpy2

Re: [R] task percentage completion

2013-04-30 Thread R. Michael Weylandt
On Tue, Apr 30, 2013 at 10:40 AM, Fabio Berzaghi f...@dmu.dk wrote: Dear All, Is it possible to add a percentage completion bar to R? I find it frustrating when running long calculations that I don't know at what point the process is. It would be very helpful so I am not guessing if I should

Re: [R] News package

2013-04-24 Thread R. Michael Weylandt
On Wed, Apr 24, 2013 at 9:02 AM, Aswathy Nair ashy4...@gmail.com wrote: Hi, Is there any package available in R to download news content? What news source are you looking for? You could, e.g., use the twitteR package, but to my knowledge for things like Google News or the BBC you'll need to

Re: [R] identify object that causes Error in loadNamespace(name) : there is no package called ‘R.utils’

2013-04-24 Thread R. Michael Weylandt
On Wed, Apr 24, 2013 at 4:08 PM, Liviu Andronic landronim...@gmail.com wrote: Dear Duncan, On Wed, Apr 24, 2013 at 3:03 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: A better approach is to *never* save and load workspaces unless you know exactly what is in them. Always reply no to

Re: [R] [r] Problems with Fortran calls when loaded a dll compiled with gfortran-4 Cygwin 4.5.3

2013-04-24 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Apr 24, 2013, at 7:46 PM, Jens Olofsson jens.olofs...@gmail.com wrote: Ok. I apologise for not understanding. So, I have installed R-tools. It changed my PATH-variable. I didn't installed Cygwin dlls as stated by http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset.

Re: [R] question

2013-04-24 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi n_hajiaghamohammadi2...@yahoo.com wrote: Hi I fit one linear quantile regression with package quantreg and I want to khow this model is good or not.Is there method for checking it? Thanks your advice I ask this question because

Re: [R] question

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi n_hajiaghamohammadi2...@yahoo.com wrote: Hi I fit one linear quantile regression with package quantreg and I want to khow this model is good or not.Is there method for checking it? Thanks your advice How is this different than the

Re: [R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 3:55 PM, J J rnoob...@gmail.com wrote: Hello useRs (please don't kill me), I've fairly new to R having only a few months of playing around with R. What little I've learned has been extremely useful. If someone could point me as to how to replicate the Boltzman

Re: [R] How to set frequncy?

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 9:54 AM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, If stock prices are daily data, use frequency = 1. Err, maybe... The frequency attribute for a ts class time series is somewhat subtle. It's the amount of observations per seasonal period / relevant cycle, where

Re: [R] numerical integration of a bivariate function

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 2:04 PM, Hicham Mezouara hicham_d...@yahoo.fr wrote: hello I work on the probabilities of bivariate normal distribution. I need integrate the following function. f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - ∞ ≤ x ≤ 7.44 and - ∞ ≤ y ≤ 1.44 , either software R

Re: [R] Scatterplot and Causality

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 3:48 PM, Lorenzo Isella lorenzo.ise...@gmail.com wrote: Dear All, I hope this is not too off topic. I am given a set of scatteplots (nothing too fancy; think about a normal x-y 2D plot). I do not deal with two time series (indeed I have no info about time). If I call

Re: [R] Vector with zeros and ones

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 7:21 PM, Ayyappa ayyapp...@gmail.com wrote: Dear group, I want to generate a vector of 10 elements that always has 20% zeroes, but with a random ordering of zeroes and ones. Can you please suggest a function to do that in R? I tried 'sample' function but the 20%

Re: [R] Welcome to the R-help mailing list

2013-04-21 Thread R. Michael Weylandt
On Sun, Apr 21, 2013 at 4:04 AM, 李究 li...@hotmail.com wrote: You must know your password to change your options (including changing the password, itself) or to unsubscribe without confirmation. It is: [[*snip*]] Not an answer to your question, but I'd like to point out that you just sent

Re: [R] Source Code

2013-04-20 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Apr 20, 2013, at 6:23 PM, Eva Prieto Castro evapcas...@yahoo.es wrote: Dear all, How can I get the source code of text function? What is the 'text function'? Try typing the name of the function at the prompt without any parentheses after it. If its written in R, then it should be

Re: [R] Source Code

2013-04-20 Thread R. Michael Weylandt michael.weyla...@gmail.com
, cex, col, font, ...)) } bytecode: 0x12b4cdb4 environment: namespace:graphics Regards, Eva --- El dom, 21/4/13, David Winsemius dwinsem...@comcast.net escribió: De: David Winsemius dwinsem...@comcast.net Asunto: Re: [R] Source Code Para: R. Michael Weylandt michael.weyla

Re: [R] proper way to handle obsolete function names

2013-04-17 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Apr 17, 2013, at 10:17 AM, Jannis bt_jan...@yahoo.de wrote: Dear R community, what would be the proper R way to handle obsolete function names? I have created several packages with functions and sometimes would like to change the name of a function but would like to create a

Re: [R] R process slow down after a amount of time

2013-04-16 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Apr 16, 2013, at 9:52 AM, Chris82 rubenba...@gmx.de wrote: Hi R users, I have mentioned that R is getting slower if a process with a loop runs for a while. Is that normal? Let's say, I have a code which produce an output file after one loop run. Now after 10, 15 or 20 loop runs the

Re: [R] checkUsage from codetools shows errors when function uses functions from loaded packages

2013-04-10 Thread R. Michael Weylandt
On Wed, Apr 10, 2013 at 4:47 AM, Jannis bt_jan...@yahoo.de wrote: Well, its mentioned in the function itself by library(xxx) or require(xxx). Well, most probably codetools is more aimed towards checking packages in whcih case such information is in the depends section of the package

Re: [R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread R. Michael Weylandt
On Tue, Apr 9, 2013 at 7:15 AM, Mike Cheung mikewlche...@gmail.com wrote: Dear all, According to CHANGES IN R 3.0.0: o diag() as used to generate a diagonal matrix has been re-written in C for speed and less memory usage. It now forces the result to be numeric in the case

Re: [R] [R-SIG-Finance] EM algorithm with R manually implemented?

2013-04-09 Thread R. Michael Weylandt
Moved to R-help because there's no obvious financial content. Michael On Sat, Apr 6, 2013 at 10:56 AM, Stat Tistician statisticiangerm...@gmail.com wrote: Hi, I want to implement the EM algorithm manually, with my own loops and so. Afterwards, I want to compare it to the normalmixEM output of

Re: [R] convert annual data to quarterly frequency

2013-04-06 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Apr 5, 2013, at 2:12 PM, Ravshonbek Otojanov r.otoja...@qmul.ac.uk wrote: Hi, I was wondering if there is a package I can use to convert my 22 annual observations to quarterly time series so that I will have 88 observations. Please don't post to two lists -- and I think the package

Re: [R] [R-SIG-Finance] error message sending question to the list

2013-04-06 Thread R. Michael Weylandt michael.weyla...@gmail.com
Post in plain text (not HTML) which is a choice within your email client. And please (!!) don't post the same question to multiple lists. If your question is off-topic, the list membership will redirect as needed. Double posting simply wasted the community's energies by duplicating responses.

Re: [R] arrayInd and which

2013-04-05 Thread R. Michael Weylandt
On Fri, Apr 5, 2013 at 2:08 PM, Keith S Weintraub kw1...@gmail.com wrote: And to the rest of you good R folks I would still be interested to see a working example of arrayInd, what it's supposed to do and what it's used for. A little utility function for dealing with the

Re: [R] Internet connection

2013-04-05 Thread R. Michael Weylandt
On Fri, Apr 5, 2013 at 3:20 PM, Gary gwengst...@yahoo.com wrote: Tried several ways to connect to Internet. Perhaps R help could point me in the right direction to make this connection work. setInternet2(use = TRUE) download.file( +

Re: [R] categorized complete list of R commands?

2013-04-04 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Apr 4, 2013, at 12:34 AM, ivo welch ivo.we...@anderson.ucla.edu wrote: every time I read the R release notes for the next release, I see many functions that I had forgotten about and many functions that I never knew existed to begin with. (who knew there were bibtex facilities in R?

Re: [R] categorized complete list of R commands?

2013-04-04 Thread R. Michael Weylandt
of Finance Anderson School at UCLA, C519 Director, UCLA Anderson Fink Center for Finance and Investments Free Finance Textbook, http://book.ivo-welch.info/ Editor, Critical Finance Review, http://www.critical-finance-review.org/ On Thu, Apr 4, 2013 at 7:44 AM, R. Michael Weylandt michael.weyla

Re: [R] custom startup/welcome message

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 9:49 AM, lejeczek pelj...@yahoo.co.uk wrote: yeap, I've done it, I was hoping for a complete customization, and even Rprofile.site adds only to what is being printed by default anyway, I mean that header is always there. R version. untill Type 'q()'.. and R -q

Re: [R] plot in log scale in both x-axis and y-axis

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 3:35 PM, capricy gao capri...@yahoo.com wrote: I am trying to plot(x,y, log=y), which gives me log scale on y axis only. I wonder if there is way so that I can plot log scale on both of x and y axis. plot(x, y, log = 'xy') Cheers, MW Thanks a lot:)

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 7:46 PM, Abhishek Pratap abhishek@gmail.com wrote: Hey Guys Getting spinned about a slick way to join every 2 entry in a list / vector in R x=(rep(c('A','G','C','T'),1000)) A G C T A G C T etc form another list with entries as AG CT AG etc Not super slick

Re: [R] categorized complete list of R commands?

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 1:54 PM, ivo welch ivo.we...@gmail.com wrote: ## must be started with R --vanilla all.sources - search() d - NULL for (i in 1:length(all.sources)) { all.functions - ls(search()[i]) N - length(all.functions) if (N==0) next d - rbind(d, data.frame(

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 7:55 PM, Abhishek Pratap abhishek@gmail.com wrote: On Thu, Apr 4, 2013 at 5:53 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: by_two - function(x, collapse = ){ dim(x) - c(length(x) / 2, 2) apply(x, 1, function(y) paste(y, collapse = collapse

Re: [R] speedometer charts in R

2013-04-02 Thread R. Michael Weylandt
Look at the R GoogleVis package. MW On Tue, Apr 2, 2013 at 9:42 AM, andrija djurovic djandr...@gmail.com wrote: Hi useRs. Does anybody know if there is some function that creates speedometer chart in R? Or if anybody has proposals where to start looking and which functions I can modify in

Re: [R] plot

2013-04-01 Thread R. Michael Weylandt
On Mon, Apr 1, 2013 at 5:05 PM, Trying To learn again tryingtolearnag...@gmail.com wrote: Hi all if I plot a graph on R, I press on the plot Export/Save Plot as Image I assume this means you're using R-Studio? I change name on File name: I select DirectoryBibliotecas\Documentos

Re: [R] 0e+00

2013-03-29 Thread R. Michael Weylandt
On Fri, Mar 29, 2013 at 10:44 AM, Shane Carey careys...@gmail.com wrote: Hi, Rather than a graph label to display labels as 0e+00, how do I get it to display the real value? Hi Shane, Is 0e+00 not a real value? I'd assume it's roughly equal to zero... ;-) More seriously, could we have a

Re: [R] QUESTION ON ROUNDING

2013-03-28 Thread R. Michael Weylandt
On Thu, Mar 28, 2013 at 6:21 PM, Andras Farkas motyoc...@yahoo.com wrote: Dear All, wonder if you have a thought on the following: I am using the round(x,digits=3) command, but some of my values come out as: 0.07099 AND 0.06901. Any thoughts on why this maty be

Re: [R] From Java to R OOP

2013-03-25 Thread R. Michael Weylandt
On Mon, Mar 25, 2013 at 6:51 AM, Francisco J. Bido b...@mac.com wrote: Hi, I'm new to OOP in R so please forgive the naiveness of some of the questions. Here are a couple of them. It would be great if you can contrast to OOP in Java. Java is not the end-all of OOP (in fact S is a good bit

Re: [R] error while extracting the p-value from adf.test

2013-03-22 Thread R. Michael Weylandt
On Fri, Mar 22, 2013 at 2:03 PM, Yuan, Rebecca rebecca.y...@bankofamerica.com wrote: Hello all, I tried to extract the p-value from adf.test in tseries; however, I got the error message such as ht=adf.test(list.var$aa) ht$p-value Error in ht$p - value : non-numeric argument to binary

Re: [R] How to look at the source code for predict()

2013-03-20 Thread R. Michael Weylandt
getS3method(predict, arima) Cheers, MW On Wed, Mar 20, 2013 at 6:43 PM, Yuan, Rebecca rebecca.y...@bankofamerica.com wrote: Hello all, I thought I found it, it is in the arima.R if I use arima to fit the model. But how could we see the source code of some function in R? Thanks, Rebecca

Re: [R] How to look at the source code for predict()

2013-03-20 Thread R. Michael Weylandt
On Wed, Mar 20, 2013 at 6:49 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: getS3method(predict, arima) Pardon -- it's either Arima or arima0 but not arima in this case. But, in general, getS3method is what you're looking for. Cheers, MW

Re: [R] creating a new variable.

2013-03-19 Thread R. Michael Weylandt
On Tue, Mar 19, 2013 at 4:33 AM, Nicole Ford nicole.f...@me.com wrote: Hello, all. The following is for my own research. I have attached the relevant data in pdf from Transparency International. I am only interested in the CPI 2010 scores column. I am interested in creating a variable

Re: [R] phyper returning zero

2013-03-15 Thread R. Michael Weylandt
On Fri, Mar 15, 2013 at 8:52 AM, elliott harrison e.harri...@epistem.co.uk wrote: Hi, I am attempting to use phyper to test the significance of two overlapping lists. I keep getting a zero and wondered if that was determining non-significance of my overlap or a p-value too small to

Re: [R] Creating a hyperlink in a csv file

2013-03-15 Thread R. Michael Weylandt
On Fri, Mar 15, 2013 at 10:52 AM, Brian Smith bsmith030...@gmail.com wrote: Hi, I was wondering if it is possible to create a hyperlink in a csv file using R code and some package. For example, in the following code: A csv file is a plan text file and by definition doesn't have hyperlinks.

Re: [R] plotting

2013-03-14 Thread R. Michael Weylandt
I think you'll find this easiest with ggplot2: library(ggplot2) ggplot(dat, aes(x = value, y = time, color = group, symbol = id)) + geom_point() # symbol = might not be the right argument -- I'm doing this from memory or similar MW On Thu, Mar 14, 2013 at 3:46 PM, li li

Re: [R] Calculation with date

2013-03-09 Thread R. Michael Weylandt
On Sat, Mar 9, 2013 at 11:41 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Hello again, Let say I have an non-negative integer vector (which may be random): Vec - c(0, 13, 10, 4) And I have a date: Date - as.Date(Sys.time()) Date [1] 2013-03-09 Using these 2

Re: [R] quesion about lm function

2013-03-09 Thread R. Michael Weylandt
On Sat, Mar 9, 2013 at 10:35 AM, meng laomen...@163.com wrote: Hi all: My data is in the attachment. I want to analysis the mean difference of y between 2 sex. My code: result_lm-lm(y~factor(sex) + x1 + x2) summary(result_lm) The result of factor(sex)m 136.83, is the mean difference of y

Re: [R] Feedback – Regarding R Programming Language Version 2.15.1 (2012-06-22) Usage

2013-03-09 Thread R. Michael Weylandt
Please do not massively cross-post and provide a reproducible example (search stack overflow or other sites for advice on how to do so) I _guarantee_ you R is not broken in this sense. MW On Sat, Mar 9, 2013 at 4:02 PM, Sujit Das reach.sujit...@gmail.com wrote: Dear Sir / Madam, I am using R

Re: [R] Unexpected behavior looping through sequence of dates

2013-03-09 Thread R. Michael Weylandt
On Sat, Mar 9, 2013 at 6:50 PM, David Winsemius dwinsem...@comcast.net wrote: I was unable to find the reason for the original coercion in the help(for) page or the R Language Definition entry regarding for-loops. On the hunch that coercion via as.vector might be occurring, Behaviorally,

Re: [R] Error: no 'dimnames' attribute for array

2013-03-07 Thread R. Michael Weylandt
On Thu, Mar 7, 2013 at 11:02 AM, eliza botto eliza_bo...@hotmail.com wrote: Dear XpeRts, I prepared a no qoute Character string by the following command s-noquote(paste (b1, collapse=,)) where, b1 is the vector of 24 intergers. dput(b1) c(1L, 2L, 6L, 7L, 12L, 16L, 17L, 20L, 21L, 23L,

Re: [R] Error: no 'dimnames' attribute for array

2013-03-07 Thread R. Michael Weylandt
On Thu, Mar 7, 2013 at 11:19 AM, eliza botto eliza_bo...@hotmail.com wrote: Thankyou very much M. Weylandt. i was actually more interested in knowing about the error. Let's talk you through it then: As you said before you have b1 - c(1L, 2L, 6L, 7L, 12L, 16L, 17L, 20L, 21L, 23L, 25L, 34L,

Re: [R] lm Regression takes 24+ GB RAM - Error message

2013-03-06 Thread R. Michael Weylandt
On Wed, Mar 6, 2013 at 9:51 AM, Jonas125 schleeberge...@pg.com wrote: Hello, I am a rather unexperienced r-user (learned the language 1 month ago) and run into the following problem using a local computer with 6 cores 24 GB RAM and R 2.15 64-bit. I didn't install any additional packages 1.

Re: [R] Simulate binary correlated data

2013-03-05 Thread R. Michael Weylandt
On Tue, Mar 5, 2013 at 7:07 PM, Marbles max-ihm...@gmx.de wrote: Dear R experts, I am trying to simulate correlated binary data and have stumbled upon the following problem: With the help of binarySimCLF or mvpBinaryEp I have been able to simulate correlating binary vectors given certain

[R] Wilcox-Off?

2013-03-05 Thread R. Michael Weylandt
A potentially ridiculous question, but why does R use wilcox (e.g., pwilcox or wilcox.test) instead of the full name Wilcoxon? I've browsed (but not scoured) the help files and Peter Dalgaard's book, but I'm coming up empty. Purely for brevity or have I missed something massive? ## Reproducible

Re: [R] Errors-In-Variables in R

2013-03-02 Thread R. Michael Weylandt
Based on your comments in the (not-a-)bug report, I *think* this might help: quanttrader.info/public/betterHedgeRatios.pdf or more generally, the idea of total least squares regression. Cheers, MW On Sat, Mar 2, 2013 at 9:55 PM, Cedric Sodhi man...@gmx.net wrote: Perhaps it would have been

Re: [R] R software installation problem

2013-02-25 Thread R. Michael Weylandt
On Mon, Feb 25, 2013 at 10:24 AM, Andy Siddaway andysidda...@googlemail.com wrote: Dear Sarah, Thanks for your email. I'll describe the problm but without the screenshots then. Firstly, I think I’ve correctly installed R. I have installed R for Windows via the R site, CRAN and then UK –

Re: [R] How to debug the C programs associated with R-packages?

2013-02-10 Thread R. Michael Weylandt
On Sun, Feb 10, 2013 at 4:30 PM, Pulkit Mehrotra mehrotra.pul...@gmail.com wrote: Dear sir, Thank you for your reply and suggestions. Gdb is exactly the thing I was looking for. Will certainly report the bug on R-devel if found so. More likely (though not impossible that it's otherwise) the

Re: [R] different behavior of $ with string literal vs string variable as argument

2013-02-10 Thread R. Michael Weylandt
On Sun, Feb 10, 2013 at 9:06 PM, David Romano drom...@stanford.edu wrote: Hi everyone, I ran into the issue below while trying to execute a command of the form apply(list.names,1, function(x) F(favorite.list$x) ) where list.names is a character vector containing the names of the elements

Re: [R] Saving model and other objects from caret

2013-02-08 Thread R. Michael Weylandt
On Thu, Feb 7, 2013 at 9:58 PM, James Jong ribonucle...@gmail.com wrote: What are the *RDS counterparts? What is the difference? apropos(RDS) ? readRDS ? saveRDS They allow serialization of an individual object and restoring it -- the advantage is that you can restore to a different name

Re: [R] R intermittently crashes across cluster

2013-02-07 Thread R. Michael Weylandt
On Thu, Feb 7, 2013 at 2:07 PM, Ken Weiss kgwe...@umich.edu wrote: Greetings, I am having an interesting problem and I wonder if anyone else has seen this behavior. I am running R 2.11.1 with SNOW 0.3-3 on a Dell cluster running CentOS 5.5. Simplest suggestion -- can you update to current

Re: [R] compare objects in two different workspaces

2013-02-07 Thread R. Michael Weylandt
On Thu, Feb 7, 2013 at 5:53 PM, Shi, Tao shida...@yahoo.com wrote: Hi list, Is there a easy way to compare objects in two different workspace files (i.e. .RData files) in R? I can use some generic file compare softwares (e.g. BeyondCompare) to binary comparison, but when it says they're

Re: [R] Split xts data set into weeks

2013-02-03 Thread R. Michael Weylandt
On Sun, Feb 3, 2013 at 6:57 AM, Seimizu Joukan saim...@gmail.com wrote: Would you please paste the following codes to R console and make a confirmation? Indeed, well done and much appreciated. #Codes start from here library(quantmod) tmp-structure(c(112.34, 112.89, 112.75, 113.5, 115.16,

Re: [R] arithmetic and logical operators

2013-01-30 Thread R. Michael Weylandt
R FAQ 7.31 (Note, this isn't R specific, rather it's a problem with the finitude of computers) MW On Wed, Jan 30, 2013 at 8:32 PM, Dave Mitchell dmmtc...@gmail.com wrote: Why, in R, does (0.1 + 0.05) 0.15 evaluate to True? What am I missing here? How can I ensure this (ostensibly incorrect)

Re: [R] platform specific Depends argument?

2013-01-28 Thread R. Michael Weylandt
I think this is only a legacy question, right? In recent R, you can/should use parallel instead of either multicore or snowfall. That said, no answer if you want back compatability with older versions of R. MW On Mon, Jan 28, 2013 at 10:43 AM, Florian Schwaiger

Re: [R] Query on package to use for investment quotes

2013-01-28 Thread R. Michael Weylandt
I'd look into the quantmod package. Cheers, MW On Mon, Jan 28, 2013 at 1:52 PM, Bruce Miller batsnc...@gmail.com wrote: Hi all, Diverging from my research based number crunching I am interested to see what, if any R packages are out there that can access daily market values of investment

Re: [R] importing data

2013-01-25 Thread R. Michael Weylandt
On Fri, Jan 25, 2013 at 6:11 AM, Ray Cheung ray1...@gmail.com wrote: Dear Michael, Thanks for your codes. However, lapply does not work in my case since I've some files missing in the data (say, the file data101.dat). Do you have any suggestions on this?? Thank you very much. You could

Re: [R] How to name the elements of list

2013-01-25 Thread R. Michael Weylandt
names(X) - c(0-10, 11-20) MW On Fri, Jan 25, 2013 at 9:39 AM, Tammy Ma metal_lical...@live.com wrote: HI, I have the array list: X-vector(list, 2) X[[1]] : data frame 1 X[[2]]: dataframe2 now i want to change index 1 and 2 into: 0-10 , 11-20 ,. finally I want to have

Re: [R] importing data

2013-01-23 Thread R. Michael Weylandt
On Wed, Jan 23, 2013 at 9:16 AM, Ray Cheung ray1...@gmail.com wrote: Dear All, Sorry for asking a newbie question. I want to ask how to import 1000 datasets whose file names are labelled from data1.dat to data1000.dat into R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank

Re: [R] foreach takes foreever?

2013-01-21 Thread R. Michael Weylandt
You're probably being killed by the overhead of parallelization which is, in this case, far more than actual computation time. I've not dug through foreach() in a while, but I think this winds up spawning many many subprocesses which isn't cheap in Windows. MW On Mon, Jan 21, 2013 at 3:59 PM,

Re: [R] Issue while installing Hmisc package

2013-01-17 Thread R. Michael Weylandt
On Thu, Jan 17, 2013 at 12:57 PM, vaseem shaikh vsma...@gmail.com wrote: Hello Michael, I have tried with different CRAN but still i am getting the same error. Most likely you've got something blocking your network. Can you download the source / binary from the CRAN pages (using your

Re: [R] how to use ...

2013-01-17 Thread R. Michael Weylandt
On Thu, Jan 17, 2013 at 2:36 PM, Ivan Calandra ivan.calan...@u-bourgogne.fr wrote: Dear users, I'm trying to learn how to use the I have written a function (simplified here) that uses doBy::summaryBy(): # 'dat' is a data.frame from which the aggregation is computed # 'vec_cat' is a

Re: [R] Need help: R for repetitive tasks

2013-01-15 Thread R. Michael Weylandt
list.files() to get all the files in the directory (use the pattern argument to be more specific). Then loop over the file names, reading in the data one at a time, do the desired processing, and then use the file name to make the graphics file name as well. Cheers, MW On Tue, Jan 15, 2013 at

Re: [R] The three-dot question

2013-01-14 Thread R. Michael Weylandt
Hi Feng, I'm afraid I don't entirely understansd your question -- the `...` construct only allows you to pass variable numbers of arguments, not to have arbitrary access to the parent frames. You need to manually extract b from the dots inside of testFun. Also, it's quite frowned upon to put

Re: [R] function coverage

2013-01-14 Thread R. Michael Weylandt
Possibly you could trace() all the functions you're interested in. E.g., lapply(ls(package:stats), trace) # Untested. MW On Mon, Jan 14, 2013 at 9:08 PM, Ross Boylan r...@biostat.ucsf.edu wrote: Is there an easy way to identify all the functions called as a result of invoking a function?

Re: [R] ./R: error while loading shared libraries

2013-01-10 Thread R. Michael Weylandt
I'd move this to the R-SIG-Fedora list and, in doing so, give more info about your install process: built yourself, package manager, etc. MW On Wed, Jan 9, 2013 at 7:31 PM, Adam Dahman adamo...@yahoo.ca wrote: Hi, I have installed R on linux using a non root account. I am getting this error

Re: [R] Precision of values 53 bits

2013-01-10 Thread R. Michael Weylandt
Perhaps here?: https://r-forge.r-project.org/projects/rmpfr/ M On Thu, Jan 10, 2013 at 10:58 AM, Stephan Mueller stephan.muel...@atsec.com wrote: I am working with large numbers and identified that R looses precision for such high numbers. The precision is lost exactly when the number is

  1   2   3   4   5   6   7   8   9   10   >