Re: [R] accessing CRAN through a proxy on 3.2.2

2015-08-21 Thread Michael Weylandt
On Fri, Aug 21, 2015 at 12:00 PM, jim holtman wrote: > With the previous versions of R (my latest is 3.2.1) I have had no problem > getting through the proxy for the firewall at work. I installed the latest > version (3.2.2) and now cannot get through the firewall. There is the > session: > > R

Re: [R] constructing a sequence of POSIXct dates

2014-04-21 Thread Michael Weylandt
On Apr 21, 2014, at 10:55, Erin Hodgess wrote: > Never mindsolved it xkcd.com/979/ > > > On Mon, Apr 21, 2014 at 9:48 AM, Erin Hodgess wrote: > >> Hello! >> >> I have the following: >> >>> time1a <- as.POSIXct(paste(2008,08,01,sep="-")) >>> time1b <- as.POSIXct(paste(2008,08,11,sep=

Re: [R] xts Annual series

2014-04-08 Thread Michael Weylandt
On Apr 8, 2014, at 17:32, John Laing wrote: > > That doesn't feel very eXtensible to me. > xts is quite obviously past tense. ;-) The list of allowable index classes is found in is.timeBased IIRC and the exclusion of integers is because there's no obvious way to have them play nice with o

Re: [R] xts Annual series

2014-04-08 Thread Michael Weylandt
On Apr 8, 2014, at 15:15, Erin Hodgess wrote: > Hello! > > If I have the following: > > x <- as.yearqtr(2000 + seq(0,7)/4) > x > [1] "2000 Q1" "2000 Q2" ... > > which is as it should be. > Then if I set up time as > time <- xts(1:8,x) > time > 2000 Q1 1 > 2000 Q2 2 > 2000 Q3 3 > . > . >

Re: [R] Errorbar

2014-02-18 Thread R. Michael Weylandt
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" 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)) >> g<-g+g

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 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 to do this > is to have

Re: [R] quotation marks and scan

2013-11-17 Thread R. Michael Weylandt
On Sun, Nov 17, 2013 at 6:24 PM, Barry Rowlingson wrote: > On Sun, Nov 17, 2013 at 10:42 PM, R. Michael Weylandt > wrote: > Did you mean to do 'nchar(x)' to show that \" was one character? > 'length' gives the number of elements in a vector, which i

Re: [R] quotation marks and scan

2013-11-17 Thread R. Michael Weylandt
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, 201

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

2013-11-12 Thread R. Michael Weylandt
On Nov 12, 2013, at 11:59, 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: > > y

Re: [R] Load Tawny package on R 2.15.3

2013-11-01 Thread R. Michael Weylandt
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 wrote: > > > I have R version 2.15.3 When i try to load it: > > library (tawny) > > i receive this response: > > package ‘parser’ could n

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

2013-10-31 Thread R. Michael Weylandt
pears 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 > wrote: >> >> >> On Oct 31, 2

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

2013-10-31 Thread R. Michael Weylandt
On Oct 31, 2013, at 1:50, Erin Hodgess 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, not the apache c

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

2013-10-30 Thread R. Michael Weylandt
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 wrote: > I did...just didn't show it > > > On Wed, Oct 30, 2013 at 7:01 AM, Michael Weylandt > wrote: >> Presumabl

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

2013-10-30 Thread Michael Weylandt
Presumably you need to define 'buzz' first, but I don't see evidence that you've done so. Michael On Oct 30, 2013, at 0:06, Erin Hodgess wrote: > Hello again! > > I'm using python with a module rpy2 to call functions from R. > > It works fine on built in R functions like rnorm. > > However

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

2013-09-27 Thread R. Michael Weylandt
On Sep 27, 2013, at 11:27, Vincent Guyader 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" "character"

Re: [R] problem with rJython and modules

2013-09-12 Thread R. Michael Weylandt
On Sep 12, 2013, at 13:42, Erin Hodgess 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 <- rJython() >> x

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 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? > Note that these

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 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 in parallel proce

Re: [R] Error: cannot allocate vector of size 18.4 Gb (NbClust)

2013-08-22 Thread Michael Weylandt
On Aug 22, 2013, at 7:39, Ben Harrison wrote: > I have a 70363 x 5 double matrix that I am playing with. > > > head(df) >GR SP SN LN NEUT > 1 1.458543 1.419946 -0.2928088 -0.2615358 -0.5565227 > 2 1.432041 1.418573 -0.2942713 -0.2634204 -0.5927334 > 3 1.4066

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

2013-08-19 Thread R. Michael Weylandt
On Aug 19, 2013, at 16:05, ivo welch 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' to be 'data' he

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 wrote: > Hello, > > ?zoo > > Regards, > Pascal > > > 2013/7/23 shanxiao > >> 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 it seems that >>

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

2013-07-19 Thread R. Michael Weylandt
On Jul 19, 2013, at 20:19, Elaine Kuo 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 kindly advise how to

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 w

Re: [R] p values of lmer

2013-06-19 Thread R. Michael Weylandt
On Wed, Jun 19, 2013 at 10:27 AM, meng 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 10.467

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 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), > Y=c(74163.6,81658.5,86531.6,91125.0,9874

Re: [R] chi square test

2013-06-17 Thread R. Michael Weylandt
On Mon, Jun 17, 2013 at 10:07 AM, peter dalgaard 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 >> >&

Re: [R] chi square test

2013-06-17 Thread R. Michael Weylandt
On Mon, Jun 17, 2013 at 9:14 AM, Dave Clark 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) >> data.table > >

Re: [R] R-3.0.1 for Centos 5?

2013-06-16 Thread Michael Weylandt
On Jun 17, 2013, at 7:32, Erin Hodgess wrote: > Dear R People: > > I am working with a Centos 5 machine and would like to install R-3.0.1. > > However, the only version that shows up "automatically" is R-2.15.2. > > I have tried the following: > > root@erinminfo [~]# wget > http://dl.fedora

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 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 'dataset

Re: [R] Problems with R package building

2013-06-14 Thread Michael Weylandt
On Jun 14, 2013, at 7:18, jpm miao wrote: > Hi, > > I try to build a toy package by running the following codes in an R > program > > require(stats) > f <- function(x,y) x+y > g <- function(x,y) x-y > d <- data.frame(a=1, b=2) > e <- rnorm(1000) > package.skeleton(list=c("f","g","d","e"), na

Re: [R] set.seed(x)

2013-06-13 Thread Michael Weylandt
On Jun 13, 2013, at 18:32, Duncan Murdoch wrote: > On 13/06/2013 11:59 AM, Pooya Lalehzari wrote: >> Hello, >> If I use set.seed(x) to set a seed for the random number generator, how can >> I undo that to revert a random output every time I run my code? > > If you remove .Random.seed, then th

Re: [R] Proper way to implement package internal functions

2013-06-12 Thread Michael Weylandt
On Jun 12, 2013, at 16:34, Bryan Hanson wrote: > Thanks Duncan... > > Silly me, it's section 1.6.1 not version 1.6.1! > > So this warning from check is not a problem in the long run: > > * checking for missing documentation entries ... WARNING > Undocumented code objects: > ‘ang0to2pi’ ‘dAB

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 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 > 81/9/2013Wed26.11291/10/2013Thu26.513101/11/2013

Re: [R] Trying to build up functions with its names by means of lapply

2013-06-04 Thread Michael Weylandt
On Jun 5, 2013, at 3:53, Julio Sergio wrote: > I want to generate specific gamma distribution functions, given fixed > parameters. > This is I have k, and theta, say > > k <- 32.2549 # shape > theta <- 26.32809 # scale > > > # I have an auxiliary function that produces funcion

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 wrote: > Dear R forum > > I have a dataframe (of prices) as given below - > > dat > = data.frame(company = rep(c("A", "B", "C"

Re: [R] More discussion on R usage statistics

2013-05-29 Thread Michael Weylandt
Interesting idea but would you be willing to change the name. Twitter, Stackoverflow, and the like use rstats to refer to R itself and confusion seems probable. https://mobile.twitter.com/search?q=%23rstats Michael On May 29, 2013, at 19:21, Johnny Zhang wrote: > Dear R users, > > There ha

Re: [R] R 3 and Debian Testing

2013-05-05 Thread Michael Weylandt
This might be a question best posed to the r-sig-Debian list. Cheers, MW On May 5, 2013, at 9:55, Lorenzo Isella wrote: > Dear All, > I am using Debian testing on multiple machine machines at home. > This is my source list > > deb http://ftp.ch.debian.org/debian/ testing main contrib non-free

Re: [R] cURL ?

2013-05-03 Thread R. Michael Weylandt
On Fri, May 3, 2013 at 11:31 AM, jawad hussain 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 relevant here. What

Re: [R] rpy2 postgres qgis problem

2013-05-01 Thread R. Michael Weylandt
On Wed, May 1, 2013 at 3:05 PM, Enzo Cocca 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 > imp

Re: [R] task percentage completion

2013-05-01 Thread R. Michael Weylandt
me") Our 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: >> &g

Re: [R] task percentage completion

2013-04-30 Thread R. Michael Weylandt
On Tue, Apr 30, 2013 at 10:40 AM, Fabio Berzaghi 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 > wait

Re: [R] Bootstrapping in R

2013-04-25 Thread Michael Weylandt
On Apr 25, 2013, at 7:02, Preetam Pal wrote: > Hi all, > > 1>i have 3 vectors a,b and c, each of length 25... i want to define a > new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] c[2]) > and so on...how do i do it in R > z <- data.frame(a, b, c) > > 2> Then i wan

Re: [R] question

2013-04-24 Thread R. Michael Weylandt
> On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi > 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 there is 2 models,f

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
On Apr 24, 2013, at 7:46 PM, Jens Olofsson 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. > Instead my PATH-variabl

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 wrote: > Dear Duncan, > > > On Wed, Apr 24, 2013 at 3:03 PM, Duncan Murdoch > wrote: >> A better approach is to *never* save and load workspaces unless you know >> exactly what is in them. Always reply "no" to the question about saving >> your work

Re: [R] News package

2013-04-24 Thread R. Michael Weylandt
On Wed, Apr 24, 2013 at 9:02 AM, Aswathy Nair 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 likely roll your

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 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 Sigmodial > curve fi

Re: [R] question

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi 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 question you asked and were

Re: [R] Vector with zeros and ones

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 7:21 PM, Ayyappa 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% zeros was not alway

Re: [R] R not loading

2013-04-22 Thread Michael Weylandt
On Apr 22, 2013, at 21:15, "Barbour, Russell" wrote: > I am having a problem with loading R on my 64 bit computer. It used to > load perfectly until I upgraded to R 3.0.0 now it takes about 10 to even > 20 minutes ? Does anyone know how to remedy this problem? > OS and install inf

Re: [R] Scatterplot and Causality

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 3:48 PM, Lorenzo Isella 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 A=(A1,A2,...) and B

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 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 or matlab Ver

Re: [R] How to set frequncy?

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 9:54 AM, Rui Barradas 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 relevant is a

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, 李究 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 your passwo

Re: [R] Source Code

2013-04-20 Thread R. Michael Weylandt
e = pmatch(vfont[1L], Hershey$typeface), >>fontindex = pmatch(vfont[2L], Hershey$fontindex)) >>.Internal(text(xy.coords(x, y, recycle = TRUE), labels, adj, >>pos, offset, vfont, cex, col, font, ...)) >> } >> >> >> >> Regard

Re: [R] Source Code

2013-04-20 Thread R. Michael Weylandt
On Apr 20, 2013, at 6:23 PM, Eva Prieto Castro 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 visible. Michael

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

2013-04-17 Thread R. Michael Weylandt
On Apr 17, 2013, at 10:17 AM, Jannis 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 mechanism that othe

Re: [R] Q-Q Plot for comparing two unequal data sets

2013-04-16 Thread Michael Weylandt
On Apr 16, 2013, at 20:12, Janh Anni wrote: > Hello All, > > Would anyone be able to help me understand how R computes a > quantile-quantile plot for comparing two data samples with unequal sample > sizes? Normally, the procedure should be to rearrange the larger data > sample into n equally-

Re: [R] 10% off Intro R training from RStudio: NYC May 13-14, SF May 20-21

2013-04-16 Thread Michael Weylandt
On Apr 16, 2013, at 12:43, Bert Gunter wrote: > Hadley: > > I don't think this is appropriate. Think of what it would be like if everyone > shilled their R training and consulting wares here. Echoing others, this seems an accepted practice on the lists, endorsed at least in one instance by P

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

2013-04-16 Thread R. Michael Weylandt
On Apr 16, 2013, at 9:52 AM, Chris82 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 time between t

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 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 > declaration. Yes -- it's

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 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 mixtools > package. > > Si

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 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 diag(x) since it is sa

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

2013-04-06 Thread R. Michael Weylandt
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] convert annual data to quarterly frequency

2013-04-05 Thread R. Michael Weylandt
On Apr 5, 2013, at 2:12 PM, Ravshonbek Otojanov 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 you're looking for is

Re: [R] Internet connection

2013-04-05 Thread R. Michael Weylandt
On Fri, Apr 5, 2013 at 3:20 PM, Gary 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(" > + > http://image.shutterstock.com/display_pic_with_logo/322090/322090,

Re: [R] arrayInd and which

2013-04-05 Thread R. Michael Weylandt
On Fri, Apr 5, 2013 at 2:08 PM, Keith S Weintraub 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 matrix-is-really-a-vector indexing du

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 wrote: > On Thu, Apr 4, 2013 at 5:53 PM, R. Michael Weylandt > wrote: >> by_two <- function(x, collapse = ""){ >>dim(x) <- c(length(x) / 2, 2) >>apply(x, 1, function(y) paste(y, collapse = collapse))

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 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( src=rep(all.sourc

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 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 but: by_two <

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 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:) > [[alternative HTML

Re: [R] custom startup/welcome message

2013-04-04 Thread R. Michael Weylandt
x27;s easy code to change. It's at the top of $R_HOME/src/main/version.c: http://svn.r-project.org/R/trunk/src/main/version.c Michael > > > On 04/04/13 15:01, Michael Weylandt wrote: >> >> On Apr 4, 2013, at 6:20, lejeczek wrote: >> >>> hi everybody >>>

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

2013-04-04 Thread R. Michael Weylandt
tp://www.ivo-welch.info/ > J. Fred Weston Professor 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/

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

2013-04-04 Thread R. Michael Weylandt
On Apr 4, 2013, at 12:34 AM, ivo welch 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? > obviously, everyone except

Re: [R] custom startup/welcome message

2013-04-04 Thread Michael Weylandt
On Apr 4, 2013, at 6:20, lejeczek wrote: > hi everybody > > I wonder if there is a simple way, but not simple would be > ok too, > to customize info/welcome page at session start time? Probably easiest to do it by way of some cat() calls in your .Rprofile. See ?Startup for details. MW >

Re: [R] Iterative regression through a series

2013-04-02 Thread Michael Weylandt
Also look at zoo's rollapply. MW On Apr 2, 2013, at 13:51, Rui Barradas wrote: > Hello, > > The error comes from NAs where you would expect coefficients. Try the > following. > > > > set.seed(7511) # Make the example reproducible > > N <- 100 > Time <-1:N > Price <- rnorm(N, 8, 2) > >

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 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 order to create

Re: [R] plot

2013-04-01 Thread R. Michael Weylandt
On Mon, Apr 1, 2013 at 5:05 PM, Trying To learn again 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 > > And select Width 800

Re: [R] 0e+00

2013-03-29 Thread R. Michael Weylandt
On Fri, Mar 29, 2013 at 10:44 AM, Shane Carey 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 reproducible exampl

Re: [R] QUESTION ON ROUNDING

2013-03-28 Thread R. Michael Weylandt
On Thu, Mar 28, 2013 at 6:21 PM, Andras Farkas 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 > happening or ho

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 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 older than

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 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 operator >> ht > >

Re: [R] read.pnm question

2013-03-22 Thread Michael Weylandt
On Mar 22, 2013, at 4:04, Erin Hodgess wrote: > Dear R People: > > I am trying to replicate a cool example that I saw on the R-bloggers some > time ago by kafka399. > > Here are the lines tI think may be causing the trouble: > > gray_file <- read.pnm(path) > > pos[i,] <- c(gray_file@grey)

Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-21 Thread Michael Weylandt
On Mar 21, 2013, at 7:39, Pierrick Bruneau wrote: > Hi Borja, > > You may issue: > > attach(data) No -- bad idea -- dangerous -- confusing statefulness, etc. (See explanations in the archives as to why) > > which results in adding your column names to the search path of R for name > resol

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

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 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 > > From: Yuan, Re

Re: [R] creating a new variable.

2013-03-19 Thread R. Michael Weylandt
On Tue, Mar 19, 2013 at 4:33 AM, Nicole Ford 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 for sever

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 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. If you want a hyperl

Re: [R] phyper returning zero

2013-03-15 Thread R. Michael Weylandt
On Fri, Mar 15, 2013 at 8:52 AM, elliott harrison 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 calculate? > > overlap = 524 >

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 wrote: > Hi alL, >

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 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, it seems to, but

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 wrote: > Dear Sir / Madam, > I am using R Programming Language V

Re: [R] quesion about lm function

2013-03-09 Thread R. Michael Weylandt
On Sat, Mar 9, 2013 at 10:35 AM, meng 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 betwe

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" > > > > U

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 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, 46L, 48L, 58L, 64L, 65L,

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 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, 25L, 34L, 4

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 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. Via the read.

[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] Simulate binary correlated data

2013-03-05 Thread R. Michael Weylandt
On Tue, Mar 5, 2013 at 7:07 PM, Marbles 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 mean valu

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 wrote: > Perhaps it would have been clearer that thi

  1   2   3   4   5   6   7   8   9   10   >