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

2013-01-05 Thread R. Michael Weylandt
On Sat, Jan 5, 2013 at 6:42 PM, David Arnold wrote: > Hi, > > Can someone explain this: > >> options(digits=20) >> 1/3 > [1] 0.1483 > > Why the 1483 at the end? To be curt, "it's complicated," but it basically comes down to the fact that 1/3 is not expressible by a finite sequence

Re: [R] Rounding

2013-01-05 Thread R. Michael Weylandt
On Sat, Jan 5, 2013 at 6:48 PM, R. Michael Weylandt wrote: > To be curt, "it's complicated," but it basically comes down to the > fact that 1/3 is not expressible by a finite sequence of powers of 2 > so it can't be perfectly represented in binary. But of course, th

Re: [R] lapply (and friends) with data.frames are slow

2013-01-05 Thread R. Michael Weylandt
On Sat, Jan 5, 2013 at 7:38 PM, Kevin Ushey wrote: > Hey guys, > > I noticed something curious in the lapply call. I'll copy+paste the > function call here because it's short enough: > > lapply <- function (X, FUN, ...) > { > FUN <- match.fun(FUN) > if (!is.vector(X) || is.object(X)) >

Re: [R] Have problem to do loop to generate transformed chi-squared variates

2013-01-07 Thread R. Michael Weylandt
Hi Agnes, I think this is likely homework, right? If that's the case, we're really not supposed to give you help. If not, why not simply use rchisq to generate chi-sq variates exactly? MW On Mon, Jan 7, 2013 at 4:13 PM, Agnes Ayang wrote: > Hello R-helpers, > > I need to generate standard vari

Re: [R] list of lists to matrix

2013-01-07 Thread R. Michael Weylandt
Something like do.call(cbind, lists) ? MW On Mon, Jan 7, 2013 at 4:13 PM, eliza botto wrote: > > dear R family, > [a text file has been attached for better understanding] > i have a list of 16 and each of of that is further subdivided into variable > number of lists. So, i have a kind of list

Re: [R] During startup - Warning messages:

2013-01-07 Thread R. Michael Weylandt
I'd suggest you do as the following message suggests and follow the R-MAC-FAQ section 9 notes on locales and whatnot. If you need specific advice on following this, we'll need to know what version of OS X you're running and what your local settings are. That said, I don't think you'll actually hit

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 wrote: > Hi, > > I have installed R on linux using a non root account. > > I am getting this error when trying

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 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 equal or larger than

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 wrote: > Is there an easy way to identify all the functions called as a result of > invoking a function? Getting the calling h

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 12:

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 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 web-browser) and then

Re: [R] how to use "..."

2013-01-17 Thread R. Michael Weylandt
On Thu, Jan 17, 2013 at 2:36 PM, Ivan Calandra 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 integer vector defining

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, And

Re: [R] importing data

2013-01-23 Thread R. Michael Weylandt
On Wed, Jan 23, 2013 at 9:16 AM, Ray Cheung 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 you > very much

Re: [R] importing data

2013-01-25 Thread R. Michael Weylandt
On Fri, Jan 25, 2013 at 6:11 AM, Ray Cheung 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 simply add a tes

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 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 > X[["0

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 wrote: > Dear R users, > > we h

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 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 funds (e.g. using

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 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) behavior doesn'

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 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, 115.21,

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 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 R and use th

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 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 different you >

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 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 instead of clobbering an

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 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 bug is in a CRAN (contr

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 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 > of favorite.l

Re: [R] R software installation problem

2013-02-25 Thread R. Michael Weylandt
On Mon, Feb 25, 2013 at 10:24 AM, Andy Siddaway 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 – > University of Bris

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

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

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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] custom startup/welcome message

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 9:49 AM, lejeczek 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 silences everything

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] 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] 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: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] 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] 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] 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] [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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] [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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 make a folder as package in R

2012-09-11 Thread R. Michael Weylandt
Start with ?package.skeleton() Cheers, Michael On Tue, Sep 11, 2012 at 9:47 AM, purushothaman wrote: > Hi > > how to make a filder as R Package. > > for exampled > > c:\test folder having following files > add.r > test1.r > sub.r > > i need to make package like this test_v1.zip. > > thanks > B.P

Re: [R] R on Android

2012-09-11 Thread R. Michael Weylandt
On Tue, Sep 11, 2012 at 12:51 PM, Simon Fry wrote: > Hello > > I tried to install R on my Transformer Prime without root. I downloaded the > three files i found on: > > http://rwiki.sciviews.org/doku.php?id=getting-started:installation:android > > and i extract all the files, also without root my

Re: [R] Animation Problem

2012-09-11 Thread R. Michael Weylandt
On Tue, Sep 11, 2012 at 4:52 PM, Bhupendrasinh Thakre wrote: > Hi List, > > I am trying to build an animation and facing problem as animation is not > coming "live". > The goal is to build "heart beats" like diagram for the data given below. > > data : > > structure(list(date = 1971:1991, x = c(41

Re: [R] how to make a folder as package in R

2012-09-11 Thread R. Michael Weylandt
On Tue, Sep 11, 2012 at 10:42 AM, purushothaman wrote: > Hi, > > i used this package.skeleton() function but i created using single R file. > but i need to create package using more than one R file. > > Thanks > B.Purushothaman > B, Most of us don't use Nabble so posting with context is much a

  1   2   3   4   5   6   7   8   9   10   >