Re: [R] Building static HTML help pages in R 2.10.x on Windows

2009-12-27 Thread Heinz Tuechler
Instead of an answer, may I add question c) can someone state that it is impossible to generate static HTML help pages under Windows? At 21:40 22.12.2009, Steve Rowley wrote: I upgraded to R2.10.1pat and discovered, along with everybody else, that static HTML pages are no longer the default.

[R] svm regression/classification

2009-12-27 Thread Nancy Adam
Hi everyone, Can anyone please tell whether there is a difference between the code for using svm in regression and code for using svm in classification? This is my code for regression, should I change it to do classification?: train <- read.table("trainingset.txt",sep=";") test <- read.

[R] how to create a simple loop ?

2009-12-27 Thread Edouard Tallent
I have a 5-row matrix called “data”. There are headers. it look like this : Row 1 Row2Row3Row4Row5 Line1 ………… Line2 ………… Line3 ………… … L

[R] how to create a simple loop ?

2009-12-27 Thread Edouard Tallent
Hi everyone. And, Merry Xmas ! I have a 5-row matrix called “data”. There are headers. it look like this : Row 1 Row2Row3Row4Row5 Line1 ………… Line2 ………… Line3 ……

Re: [R] how to create a simple loop ?

2009-12-27 Thread David Winsemius
On Dec 27, 2009, at 9:15 AM, Edouard Tallent wrote: Hi everyone. And, Merry Xmas ! I have a 5-row matrix called “data”. There are headers. it look like this : Row 1 Row2Row3Row4Row5 Line1 ………… Line2 ………

[R] Identifying outliers in non-normally distributed data

2009-12-27 Thread John
Hello, I've been searching for a method for identify outliers for quite some time now. The complication is that I cannot assume that my data is normally distributed nor symmetrical (i.e. some distributions might have one longer tail) so I have not been able to find any good tests. The Walsh's Test

[R] Make the output (from a Loop function) a Vector

2009-12-27 Thread Cat Morning
Hi all, I have made a loop function which prints outputs. For example:  for (i in 1:5) + print(i) [1] 1 [1] 2 [1] 3 [1] 4 [1] 5 However, I would like the output to given as a list or a vector, e..g c(1,2,3,4,5). Is it possible to do this? (The function I am using outputs many 1000s of results

Re: [R] Identifying outliers in non-normally distributed data

2009-12-27 Thread Brian G. Peterson
John wrote: Hello, I've been searching for a method for identify outliers for quite some time now. The complication is that I cannot assume that my data is normally distributed nor symmetrical (i.e. some distributions might have one longer tail) so I have not been able to find any good tests. Th

[R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread Mark Heckmann
In The following code, the table handler is executed twice when the button is pressed (from the 2nd pressing on). I want it to be executed only once. Does someone know, why this happens and how I can change it? library(gWidgets) w <- gwindow() b <- gbutton("press", cont=w) tbl <- gtable(1:10

Re: [R] Make the output (from a Loop function) a Vector

2009-12-27 Thread David Winsemius
On Dec 27, 2009, at 11:17 AM, Cat Morning wrote: Hi all, I have made a loop function which prints outputs. For example: for (i in 1:5) + print(i) [1] 1 [1] 2 [1] 3 [1] 4 [1] 5 However, I would like the output to given as a list or a vector, e..g c(1,2,3,4,5). Is it possible to do this?

Re: [R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread David Winsemius
On Dec 27, 2009, at 11:29 AM, Mark Heckmann wrote: In The following code, the table handler is executed twice when the button is pressed (from the 2nd pressing on). Can't reproduce. On a Mac 10.5.8, R 2.10.1, running the 64 bit GUI, after choosing the gWidgetstcltk option for GUI toolkit w

Re: [R] Positions in datasets

2009-12-27 Thread Anders Falk
Could someone help me understand this Basically I want to know the position of certain numbers in large output data sets. First consider the following simple example where we get the postions of ones (1) in the vector q. > q <- c(5,1,1,3,1,1,1,1) > q [1] 5 1 1 3 1 1 1 1 > for (i in 1:length(q)) i

Re: [R] Positions in datasets

2009-12-27 Thread David Winsemius
On Dec 27, 2009, at 12:11 PM, Anders Falk wrote: Could someone help me understand this Basically I want to know the position of certain numbers in large output data sets. First consider the following simple example where we get the postions of ones (1) in the vector q. q <- c(5,1,1,3,1,

Re: [R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread David Winsemius
On Dec 27, 2009, at 12:12 PM, Mark Heckmann wrote: Hi David, forgot to mention I use the RGtk2 GUI toolkit. options("guiToolkit"="RGtk2") Under tcl I do not get this results neither. Under RGtk2 I do (Mac OS 10.6.1, R 2.10.0 32-bit). Any ideas? I don't have anything constructive to off

Re: [R] Make the output (from a Loop function) a Vector

2009-12-27 Thread Uwe Ligges
David Winsemius wrote: On Dec 27, 2009, at 11:17 AM, Cat Morning wrote: Hi all, I have made a loop function which prints outputs. For example: for (i in 1:5) + print(i) [1] 1 [1] 2 [1] 3 [1] 4 [1] 5 However, I would like the output to given as a list or a vector, e..g c(1,2,3,4,5). Is i

Re: [R] Positions in datasets

2009-12-27 Thread Uwe Ligges
David Winsemius wrote: On Dec 27, 2009, at 12:11 PM, Anders Falk wrote: Could someone help me understand this Basically I want to know the position of certain numbers in large output data sets. First consider the following simple example where we get the postions of ones (1) in the vector q

Re: [R] how to create a simple loop ?

2009-12-27 Thread John Kane
An alternative approach (clumsy but probably not as clumsy as a loop) would be to create a sixth column as a factor and aggregate on that. Simple-minded example : === mydata <- data.frame(matrix(rnorm(100),nrow=20)) mydata[,6] <- c(rep("a",5),

Re: [R] how to create a simple loop ?

2009-12-27 Thread jim holtman
try this: > mydata <- matrix(runif(5000),ncol=5) > indices <- list(c(173, 193), + c(434, 455), + c(699, 724), + c(955, 977)) > result <- lapply(indices, function(.indx){ + mean(mydata[.indx[1]:.indx[2], 5]) + }) > > > result [[1]] [1] 0.5364535 [

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2009-12-27 Thread Uwe Ligges
Heinz Tuechler wrote: Instead of an answer, may I add question c) can someone state that it is impossible to generate static HTML help pages under Windows? No, it is not impossible, see my answers below. At 21:40 22.12.2009, Steve Rowley wrote: I upgraded to R2.10.1pat and discovered, a

[R] Scaling error

2009-12-27 Thread Muhammad Rahiz
Hi useRs, I ran into an inconsistent output problem again. Here is the simplify illustration I've got a matrix as follows > x V1V2 V3 [1,] 1 2 3 [2,] 4 5 6 [3,] 7 8 9 Associated with the matrix is a scaling factor, sca, derived from, say the mea

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2009-12-27 Thread Jonathan Baron
Slightly (but not completely) irrelevant comment. The next version of the R rpm packaged by Fedora WILL include static web pages by default (so I'm told by Tom [Spot] Callaway). This also goes for the R packages that they package as RPMs. This is irrelevant for Windows users of course, but other

Re: [R] Scaling error

2009-12-27 Thread Daniel Malter
If "out" is what you want to achieve, why don't you multiply "sca" (called "m" below) with the transpose of "x" and then transpose the resulting matrix? x=c(1,2,3,4,5,6,7,8,9) dim(x)=c(3,3) x=t(x) x m=c(2.5,1.7,3.6) x*m #returns what you don't want t(t(x)*m) #returns what you want HTH Daniel

[R] very beginner's question

2009-12-27 Thread Facetious Nickname
Begging the list's indulgence, an extremely dumb beginner's question. I've got 24 months' worth of numbers - ranging from 2 events per month, to 66 events per month. I want to take a stab at making a reasonable guess as to what the next year's data would be, approximately, i.e., based on the

Re: [R] very beginner's question

2009-12-27 Thread Gabor Grothendieck
See ?ets in the forecast package. On Sun, Dec 27, 2009 at 2:51 PM, Facetious Nickname wrote: > > Begging the list's indulgence, an extremely dumb beginner's question.  I've > got 24 months' worth of numbers - ranging from 2 events per month, to 66 > events per month.  I want to take a stab at

Re: [R] Scaling error

2009-12-27 Thread baptiste auguie
Hi, Try this, x <- matrix(1:9, ncol=3, byrow=T) sca <- c(2.5, 1.7, 3.6) x %*% diag(1/sca) HTH, baptiste 2009/12/27 Muhammad Rahiz : > Hi useRs, > > I ran into an inconsistent output problem again. Here is the simplify > illustration > > I've got a matrix as follows > >> x >       V1    V2  

Re: [R] Positions in datasets

2009-12-27 Thread Anders Falk
Thank you both for your excellent help. Best Regards, Anders Falk > > > David Winsemius wrote: >> >> On Dec 27, 2009, at 12:11 PM, Anders Falk wrote: >> >>> Could someone help me understand this >>> >>> Basically I want to know the position of certain numbers in large >>> output >>> data sets. F

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2009-12-27 Thread Steve Rowley
>Heinz Tuechler wrote: >> At 21:40 22.12.2009, Steve Rowley wrote: >>> (a) how to build the static HTML help pages of all currently >>> installed packages under Windows, [...] > >At least two ways: > >Way 1: reinstall all those packages from sources using > R CMD INSTALL --html > >Way 2: go t

Re: [R] Is SEM package of R suitable for sem analysis

2009-12-27 Thread Yihui Xie
Well, I guess it will be extremely difficult to persuade your teacher to use the sem package in R. AFAIK, AMOS and LISREL have become the golden standard for SEM in China, and SEM has become a golden model for analysis in social science and psychology. I have been a cynic to SEM for a long time, be

[R] inquiry

2009-12-27 Thread Jose Betancourt Betancourt
Dear John P. Burkett I would appreciate you to send me some scripts to run DEA with 20 similar DMU Best regards Betancourt -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistem a Nacional de Salu

Re: [R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread Mark Heckmann
Hi David, forgot to mention I use the RGtk2 GUI toolkit. options("guiToolkit"="RGtk2") Under tcl I do not get this results neither. Under RGtk2 I do (Mac OS 10.6.1, R 2.10.0 32-bit). Any ideas? TIA! Mark Am 27.12.2009 um 18:05 schrieb David Winsemius: > > On Dec 27, 2009, at 11:29 AM, Mar

[R] help: creating a unified histogram

2009-12-27 Thread Yael Yohai
Good evening, I would like to put the histograms of several matrices on the same graph, together on a unified histogram (instead of having one bar per value on the x-axis, have multiple bars: one representing each matrix, with different colored bars for example to distinguish between the matrices)

[R] gWidgets / RGtk2 - how to change a handler from a toolbar?

2009-12-27 Thread Mark Heckmann
I want to assign a default handler to a toolbar button and change the handler later. The addhandlerclicked() method does not apply to a gAction Object, I think... defHandler <- function(h, ...) print("default") w <- gwindow() aTest <- gaction(label="Test", icon="

[R] R and Finance - EAD, LGD, PD

2009-12-27 Thread Ricardo Gonçalves Silva
Hi, I'm currently beginning to use R for financial analysis (mainly Basel II benchmarks) and I would like to know if any R-User can give me some initial directions on packages and tutorials which I can use to calculate capital requirements, default probabilities, and related stuff. Thanks in a

Re: [R] R and Finance - EAD, LGD, PD

2009-12-27 Thread Cedrick W. Johnson
Howdy- You may want to check out the R-sig-finance list and search through the postings here: http://n4.nabble.com/Rmetrics-f925806.html There's quite a few packages in the CRAN taskviews as well: http://cran.r-project.org/web/views/Finance.html -cj Ricardo Gonçalves Silva wrote: Hi, I'm

Re: [R] help: creating a unified histogram

2009-12-27 Thread milton ruser
Hi Yael, Have you tried to find it on google "R graph gallery" ? bests milton On Sun, Dec 27, 2009 at 2:45 PM, Yael Yohai wrote: > Good evening, > > I would like to put the histograms of several matrices on the same graph, > together on a unified histogram (instead of having one bar per value

[R] problems in building R with libpng/cairo/jpeg

2009-12-27 Thread Yihui Xie
Hi, I'm installing R 2.10.1 under Linux but I don't know why my installation does not support png/cairo/jpeg: > capabilities() jpeg png tifftcltk X11 aqua http/ftp sockets FALSEFALSEFALSEFALSEFALSEFALSE TRUE TRUE libxml fifo cledit

Re: [R] help: creating a unified histogram

2009-12-27 Thread jim holtman
Here is one way of doing it using the basic graphics: # crate some data x1 <- rnorm(1,0,1) x2 <- rnorm(1,1,2) # get data from histograms bin.size <- seq(-10,10,0.1) # bin size - may sure it spans the range h1 <- hist(x1, plot=FALSE, breaks=bin.size) h2 <- hist(x2, plot=FALSE, breaks=bin.

Re: [R] R on amazon's EC2 "cloud"?

2009-12-27 Thread Carlos J. Gil Bellosta
Hello, I tried Amazon EC2 with R recently and wrote an entry about it to a blog I collaborate with: http://analisisydecision.es/probando-r-sobre-el-ec2-de-amazon/ (Unfortunately, it is in Spanish...) Best regards, Carlos J. Gil Bellosta http://www.datanalytics.com Blair Christian wrote:

Re: [R] Scaling error

2009-12-27 Thread jim holtman
sweep(x, 2, m, FUN='/') On Sun, Dec 27, 2009 at 2:26 PM, Muhammad Rahiz < muhammad.ra...@ouce.ox.ac.uk> wrote: > Hi useRs, > > I ran into an inconsistent output problem again. Here is the simplify > illustration > > I've got a matrix as follows > > > x > V1V2 V3 > [1,] 1 2

[R] CRAN (and crantastic) updates this week

2009-12-27 Thread Crantastic
CRAN (and crantastic) updates this week New packages * batch (1.0-0) Thomas Hoffmann http://crantastic.org/packages/batch Functions to allow you to easily pass command-line arguments into R (primary use is linux), and functions to aid in submitting your R code in parallel

Re: [R] R and Finance - EAD, LGD, PD

2009-12-27 Thread Wensui Liu
i think rick's questions are more related to basel II instead of R and don't think there is such a R package. per my limited knowledge, there are many ways to calculate PD, EAD, and LGD, either on portfolio level or on account level. So it really depends on how you are going to estimate them. On th

[R] Lacunarity analisys using R

2009-12-27 Thread Jose Bustos Melo
Hi R-people, I have done spatial and geostatistics for some time and now I am interested in concentration indexes. There is one index named Lacunarity.  Is there any extension like that in R? Thank you all, José Bustos [[alternative HTML version deleted]] _

Re: [R] gWidgets / RGtk2 - how to change a handler from a toolbar?

2009-12-27 Thread john verzani
Mark Heckmann gmx.de> writes: > > > I want to assign a default handler to a toolbar button and change the > handler later. > The addhandlerclicked() method does not apply to a gAction Object, I > think... > > defHandler <- function(h, ...) print("default") > w <- gwindow()

Re: [R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread john verzani
Mark Heckmann gmx.de> writes: > > In The following code, the table handler is executed twice when the > button is pressed (from the 2nd pressing on). > I want it to be executed only once. Does someone know, why this > happens and how I can change it? > > .. snip .. > Thanks! > Mark > Ma

Re: [R] RGtk2 - retrieve ggraphics mouse coordinates during drag-and-drop event

2009-12-27 Thread john verzani
Mark Heckmann gmx.de> writes: > > Hi all, > > I have a gtable and a ggraphic widget. > I want to drag an element from the table onto the graphic. > When the drag object is released over the ggraphic widget, I want the > mouse coordinates inside the ggraphic to be returned. > Right now I do no

Re: [R] Is SEM package of R suitable for sem analysis

2009-12-27 Thread Wincent
I don't know the situation of psychology. In sociology, SEM is regarded is advanced statistical technique, but I am not quite sure if it is golden model. Actually, SEM is not so common in journal papers. It is not about R. Sorry for being off-topic. Best 2009/12/28 Yihui Xie : > Well, I guess it

[R] Modified R Code

2009-12-27 Thread Maithili Shiva
Dear R helpers,   I have following input files. (Actually they are more than 10 rates but here i am considering only 2 rates to write my problem)   rate1.csv min1    max1    min2  max2  min3   max3 1.051.30   1.30  1.65 1

Re: [R] help: creating a unified histogram

2009-12-27 Thread Jim Lemon
On 12/28/2009 06:45 AM, Yael Yohai wrote: Good evening, I would like to put the histograms of several matrices on the same graph, together on a unified histogram (instead of having one bar per value on the x-axis, have multiple bars: one representing each matrix, with different colored bars for

[R] Modified R Code

2009-12-27 Thread Maithili Shiva
Dear R helpers,   I have following input files. (Actually they are more than 10 rates but here i am considering only 2 rates to write my problem)   rate1.csv min1    max1    min2  max2  min3   max3 1.051.30   1.30  1.65 1

[R] Help with Moving Average in R

2009-12-27 Thread Saji Ren
Hello,guys: I want to use a moving average estimation in my analysis. When refering to this "moving average", I mean a MA in a technical analysis definition, and not to the definition in Time Series Analysis. Actually, it is an AR estimation in TSA. So I use the function "filter" to compute it.

[R] MS-VAR

2009-12-27 Thread Henrique
Dear R users, I would like to estimate a MS-VAR where the probabilities of regime shifts are dependent of an exogenous variable. Is it possible to do this using R? Best, Henrique C. de Andrade Doutorando em Economia Aplicada Universidade Federal do Rio Grande do Sul www.ufrgs.br/ppge ___

Re: [R] Help with Moving Average in R

2009-12-27 Thread Berend Hasselman
Saji Ren wrote: > > ... >> MA2 = filter(x,c(rep(1/2,2),0),sides = 1) >> MA2 > [1] NA NA 2.5 3.5 4.5 5.5 6.5 7.5 8.5 9.5 > > But what I want is: > [1] NA NA 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 > > And I think the command I used to get MA2 should give a result as what I > want, but it just does