[R] [R-pkgs] RQDA-0.1.5 is released

2008-11-23 Thread ronggui
RDQA is a package for Qualitative Data Analysis built upon R. It works both on the Windows and Linux/FreeBSD platforms. RQDA is an easy-to-use tool to assist in the analysis of textual data. At the present, it supports only plain text format data. All the information is stored in SQLite database vi

Re: [R] count the cumulative for each subject

2008-11-23 Thread Daniel Malter
Hi, subject=c(1,1,1,2,2,2) visit=c(1,2,3,1,2,3) x1=c(0.5,1.2,0.7,0.4,0.6,0.1) cum=NULL #initialize for(i in 1:length(subject)){ cum[i]=sum(x1[subject[i]==subject&visit[i]>=visit]) } I am sure there is a way with tapply or similar functions that is computationally more efficient. But if your dat

Re: [R] Is this correct?

2008-11-23 Thread Daniel Malter
Bill is right. Generally, a more appropriate type of question to the list would, for example, be: I want to run OLS. What is the function to do it in R (although this is a particularly stupid example as it is on the first pages of almost all manuals)? You would typically write to the R list if you

[R] count the cumulative for each subject

2008-11-23 Thread gallon li
I have a data set like the following: subject visit x1 1 1 0.5 1 2 1.2 1 3 0.7 2 1 0.4 2 2 0.6 2 3 1.0 . where x1 is the interval between the two visits. Now I want to calculate the cumulative intervals since the beinging, for example subject visit x1 cum 1 1 0.5 0.5 1 2 1.2 0.5+1.2 1 3 0.7

Re: [R] Windows version of package "Ratings"?

2008-11-23 Thread Prof Brian Ripley
On Mon, 24 Nov 2008, Paul Hiemstra wrote: Prew, Paul schreef: Hello, Does anyone know whether a Windows version of the Ratings package will be available? Thank you, Paul Prew Hi Paul, If there are no binary version of the package you can always build the package from source yourself. Ch

Re: [R] More than doubling performance with snow

2008-11-23 Thread Prof Brian Ripley
On Sun, 23 Nov 2008, Hesen Peng wrote: Hey my R buddies, I installed the "snow" and "rpvm" package on my Lenovo Thinkpad T400 today. The experiment below gave me a surprise. The time consumed by serial processing was several times larger than that taken by parallel processing. I'm very curious

Re: [R] Is this correct?

2008-11-23 Thread Bill.Venables
R help does have guidelines. (See the bottom of any message to R help, including yours.) Here is a relevant extract from them: "Basic statistics and classroom homework: R-help is not intended for these." Your questions are entirely inappropriate. It would also be courteous if we knew your nam

[R] Is this correct?

2008-11-23 Thread Rlover
I have to answer the following question for a homework assignment. A researcher was interested in whether people taking part in sports at university made more money after graduating, taking into account the students' GPA. They sampled 200 alumni from a large university. The variables are: income

[R] How to measure the significant difference between two time series

2008-11-23 Thread Bin Zhao
Dear R experts and statisticians, I have some time series datasets, they are several years vegetation indices (about 50 data points per year) sampled from different station. These indices have similar dynamics with seasonal change. My questions are, 1) How can I compare the difference amo

Re: [R] multiple plots in R

2008-11-23 Thread Felipe Carrillo
Here's one way with ggplot2 library(ggplot2) p <- qplot(mpg, wt, data=mtcars) vplayout <- function(x, y) viewport(layout.pos.row=x, layout.pos.col=y) grid.newpage() pushViewport(viewport(layout=grid.layout(3,3))) print(p, vp=vplayout(1,1)) print(p, vp=vplayout(1,2)) print(p, vp=vplayout(1,3)) prin

Re: [R] Overlay two plots on the same device with axes havi ng the same scale.

2008-11-23 Thread Ben Bolker
John Sorkin grecc.umaryland.edu> writes: > I have crated a file containing data with x and y > values and have plotted the data using the output of gam. I > would like to overlay an x,y plot of the data on top of > the line returned by gam. Why not plot the gam fit first and then use points

Re: [R] help needed

2008-11-23 Thread stephen sefick
p <- array( 0, dim =c(5,100)) porig <- array( 0, dim =c(5,1)) x1 <- array( rnorm(990,mean=0,sd=1), dim =c(4,10)) x <- rbind(c(1,1.5,1.4,3,1.9,4,4.9,2.6,3.2,2.4),x1) #this randomizes each column apply(x, MARGIN=2, FUN=sample) I will try and think about it more, but I am not a great programer. Wha

Re: [R] log likelihood

2008-11-23 Thread Ben Bolker
Joseph Magagnoli gmail.com> writes: > I ran a Weibull model, and I am wondering if there is any way to extract > the log likelihood. I tried loglik(model) but it does not seem to work > any help would be greatly appreciated > joe > You have to tell us what you mean by "ran a Weibull model

[R] More than doubling performance with snow

2008-11-23 Thread Hesen Peng
Hey my R buddies, I installed the "snow" and "rpvm" package on my Lenovo Thinkpad T400 today. The experiment below gave me a surprise. The time consumed by serial processing was several times larger than that taken by parallel processing. I'm very curious how this happened. Thank you very much. >

[R] breaking out of a loop from within a function

2008-11-23 Thread Christopher Marcum
Hello useRs, I would like to break out of a for loop from within a function upon some user input. For example, a user hits "Cancel" from a tcl widget called iteratively within a for loop. The for loop then breaks at the current iteration. I can only seem to get break and stop to work at the t

Re: [R] How can I access the list argument within a "for" function call

2008-11-23 Thread Mike Rowe
I'm sorry if I wasn't clear before... Although it is hidden syntactically, a for-loop construct is implemented by a call to the "for" function: "for"(var, list, expr) ...where var is the iteration variable, list is the sequence of values assigned to var on successive iterations, and expr is the

Re: [R] What's the BEST way in R to adapt this vector?

2008-11-23 Thread Jagat.K.Sheth
bEST is up to you to define. Here is one simple way y.new <- c(t(model.matrix(~factor(y)-1))) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of zerfetzen Sent: Saturday, November 22, 2008 12:00 PM To: r-help@r-project.org Subject: [R] What's the BEST way i

[R] [R} Expected Percent Correctly Predicted (ePCP)

2008-11-23 Thread Joseph Magagnoli
Hi all, I ran a logit model and I would like to calculate the ePCP. The problem is that I have missing data and I cant calculate the ePCP. Does anyone know how to calculate this with missing data? here are the codes I used-but I guess it only works when the data is complete ###Model 2 #1 esti

Re: [R] How is R working in multicore and multiprocessor environment?

2008-11-23 Thread jim holtman
Definitely if you want to make sure of the cores. On Sun, Nov 23, 2008 at 6:09 PM, Hesen Peng <[EMAIL PROTECTED]> wrote: > I see. So is it a good idea to use the snow package in running > programs on my intel duo core computer? > > 2008/11/23 jim holtman <[EMAIL PROTECTED]>: >> R is single threade

Re: [R] multiple plots in R

2008-11-23 Thread Sebastian P. Luque
On Sun, 23 Nov 2008 18:19:19 -0800, Suyan Tian <[EMAIL PROTECTED]> wrote: > Hi, I just try to draw multiple plots in one page using R, I used par > command. For example I have 7 plots, but instead of arranging them in > the default way > plot1 plot2 plot3 plot4 plot5 plot6 plot7 > I want them in

Re: [R] multiple plots in R

2008-11-23 Thread Sarah Goslee
You can use frame() to skip a place. On Sun, Nov 23, 2008 at 9:19 PM, Suyan Tian <[EMAIL PROTECTED]> wrote: > Hi, I just try to draw multiple plots in one page using R, I used par > command. For example I have 7 plots, but instead of arranging them in the > default way > > plot1plot2 plot3 >

[R] multiple plots in R

2008-11-23 Thread Suyan Tian
Hi, I just try to draw multiple plots in one page using R, I used par command. For example I have 7 plots, but instead of arranging them in the default way plot1plot2 plot3 plot4 plot5 plot6 plot7 I want them in this order plot1 plot2 plot3 plot4 plot5 plot6 plot7

Re: [R] R on Ubuntu Server

2008-11-23 Thread Paul Hiemstra
In addition to Daniel, you can also use Nomachine NX to run remote X-sessions. Server software is available for linux and solaris and clients are available also for windows. Check out http://www.nomachine.com/. cheers, Paul Daniel Høyer Iversen schreef: Hey I have R installed om my Ubuntu se

Re: [R] Windows version of package "Ratings"?

2008-11-23 Thread Paul Hiemstra
Prew, Paul schreef: Hello, Does anyone know whether a Windows version of the Ratings package will be available? Thank you, Paul Prew CONFIDENTIALITY NOTICE: \ This e-mail communication an...{{dropped:11}} __ R-help@r-project.org mailing list http

Re: [R] How is R working in multicore and multiprocessor environment?

2008-11-23 Thread Hesen Peng
I see. So is it a good idea to use the snow package in running programs on my intel duo core computer? 2008/11/23 jim holtman <[EMAIL PROTECTED]>: > R is single threaded except for some the BLAS matrix routines; it will > only effective use a single core most of the time unless you have a > proble

[R] why this function give error message

2008-11-23 Thread saikat sarkar
Dear R guru, I am Saikat Sarkar working as a researcher of Economics in Tampere University, Finland. I am trying to estimate some Garch related tests with Bayesian analysis by R programme. I am not good in R but trying to survive. Anyway I have the coding but not working properly. I

[R] not R but consumer choice contest that has statistical implications

2008-11-23 Thread markleeds
a friend of mine sent me the following and I'm thinking that there are people on this list that might be interested and could also hit the 10% improvement mark possibly ? i don't know any more about it than the article says so, if someone is interested, I guess you would have to contact netf

Re: [R] Need help: Loading a large data set.

2008-11-23 Thread roger koenker
Both SparseM and Matrix have facilities for rbind and cbind that allow you to concatenate pieces of sparse matrices together. On Nov 23, 2008, at 2:19 PM, Atul Kulkarni wrote: Hi All, I am dealing with a large data set which translates in to a sparse matrix, I want to load this data that i

[R] How is R working in multicore and multiprocessor environment?

2008-11-23 Thread Hesen Peng
My Dear R buddies, I'm feeling ashamed that I've been running my R program on some servers for a while but do not know exactly how R is working. The servers are chained together using Sun Grid Engine. Each node has 8 quad-core CPUs. I wonder how many cores and CPUs are used by a simple single-thre

Re: [R] Need help: Loading a large data set.

2008-11-23 Thread jim holtman
What matrix package are you using? I have not used sparse matrices, but a quick look at the help file of Matrix talks about a file format for reading in a sparse matrix. I would assume that all you need to do is to read in your files and write them out in that format. You can do it in using 'lis

[R] Need help: Loading a large data set.

2008-11-23 Thread Atul Kulkarni
Hi All, I am dealing with a large data set which translates in to a sparse matrix, I want to load this data that is spread in approximately 17000+ files each defining a row and each file has variable number of records that come with its column number and the value that they store. I wish to load

[R] tklistbox - R-Objekt

2008-11-23 Thread thoeb
Hello, I have a problem with a tklistbox. The user should be able to choose one out of two calculation methods needed for further calculations. My r-script for that purpose looks like that: require(tcltk) tt<-tktoplevel() tl<-tklistbox(tt,height=4,selectmode="single",background="white

Re: [R] help needed

2008-11-23 Thread gauravbhatti
Thankyou for the quick reply p <- array( 0, dim =c(5,100)) porig <- array( 0, dim =c(5,1)) x1 <- array( rnorm(990,mean=0,sd=1), dim =c(4,10)) x <- rbind(c(1,1.5,1.4,3,1.9,4,4.9,2.6,3.2,2.4),x1) i = 1; j=1; for ( i in (1:5) ) { xorig1 = x[1,(1:5)]; xorig2 = x[1,(6:10)]; yorig = t.test(x1,x2

Re: [R] R and the Web: A small Wordpress plugin RwebFriend

2008-11-23 Thread Xiaoxu LI
Ajay and R fans, I'll never think my several lines of simplest PHP codes can be something great. They only shortcut Rweb and wordpress. But, SaaS is really wonderful. If only some R web interface can be smartly deployed in an integrated network of servers, say, current global server services donat

Re: [R] Elegant way to transform dataframe?

2008-11-23 Thread Barry Rountree
Original message >Date: Thu, 20 Nov 2008 09:41:11 +0100 >From: "David Hajage" <[EMAIL PROTECTED]> >Subject: Re: [R] Elegant way to transform dataframe? >To: "Barry Rountree" <[EMAIL PROTECTED]> > > I suggest you to have a look to the reshape package, > by Hadley Wickham : http:/

Re: [R] help needed

2008-11-23 Thread stephen sefick
would you post reproducible code with dummy data so that we have something to start with. thanks On Sun, Nov 23, 2008 at 12:08 PM, gauravbhatti <[EMAIL PROTECTED]> wrote: > > hi I have a matrix (10x10) and I have to perform t tests on each row by > considering first 5 elements as data set A and ne

[R] help needed

2008-11-23 Thread gauravbhatti
hi I have a matrix (10x10) and I have to perform t tests on each row by considering first 5 elements as data set A and next 5 as data set B. This part is easy, However after one t test on each row, I have to randomly permute each column to get new values for each row and then perform another t.tes

Re: [R] What's the BEST way in R to adapt this vector?

2008-11-23 Thread zerfetzen
Thanks for the help, I've a few more functions to get familiar with. Those are definitely concise ways to do this! :) -- View this message in context: http://www.nabble.com/What%27s-the-BEST-way-in-R-to-adapt-this-vector--tp20638991p20647978.html Sent from the R help mailing list archive at Nab

Re: [R] Latin Hypercube with condition sum = 1

2008-11-23 Thread Ben Bolker
In that case won't x2 <- (x-min(x))/(max(x)-min(x)) ## establishes criterion 1 x3 <- x2/sum(x2) ## establishes criterion 2 work? I haven't thought about this very carefully, but since transformation makes min(x)=0 and max(x)=1 (and therefore sum(x)>1 -- although it won't work

Re: [R] Latin Hypercube with condition sum = 1

2008-11-23 Thread Rainer M Krug
On Sun, Nov 23, 2008 at 7:43 PM, Ben Bolker <[EMAIL PROTECTED]> wrote: > Rainer M Krug gmail.com> writes: > >> >> Hi >> >> I want to du a sensitivity analysis using Latin Hypercubes. But my >> parameters have to fulfill two conditions: >> >> 1) ranging from 0 to 1 >> 2) have to sum up to 1 >> > >

Re: [R] Latin Hypercube with condition sum = 1

2008-11-23 Thread Ben Bolker
Rainer M Krug gmail.com> writes: > > Hi > > I want to du a sensitivity analysis using Latin Hypercubes. But my > parameters have to fulfill two conditions: > > 1) ranging from 0 to 1 > 2) have to sum up to 1 > Perhaps I'm missing something, but it seems that there's only one vector that sa

Re: [R] Basic question on concatenating factors

2008-11-23 Thread Stavros Macrakis
I originally wrote: >>> This algorithm depends crucially on union preserving the order of the >>> elements of its arguments. As far as I can tell, the spec of union >>> does not require this. If union were to (for example) sort its >>> arguments then merge them (generally a more efficient algorit

[R] Latin Hypercube with condition sum = 1

2008-11-23 Thread Rainer M Krug
Hi I want to du a sensitivity analysis using Latin Hypercubes. But my parameters have to fulfill two conditions: 1) ranging from 0 to 1 2) have to sum up to 1 So far I am using the lhs package and am doing the following: library(lhs) ws <- improvedLHS(1000, 7) wsSums <- rowSums(ws) wss <- ws /

Re: [R] Help in Programming using Methods

2008-11-23 Thread Gabor Grothendieck
Its a matter of where aov is looking for objects. Try replacing the av<- line in test.data.frame with the following which substitutes in the formula and then evaluates the statement (so that it does not have to look for it): av <- eval(substitute(aov(fo, x), list(fo = formula(model On Sun,

Re: [R] Basic question on concatenating factors

2008-11-23 Thread ehud cohen
Thank you all for the help and enlightening comments. EC On Sun, Nov 23, 2008 at 4:40 PM, jim holtman <[EMAIL PROTECTED]> wrote: > > You do have to read a little further on the help page to make sure > that duplicates are removed if they appear after, and not before, > others in the vector to see

[R] Help in Programming using Methods

2008-11-23 Thread Enio Jelihovschi
I WROTE THIS FUNCTION BELOW test <- function(x, ...) UseMethod('test', x) test.data.frame = function(x, model, which, error, ...) { av <- aov(formula(model), data = x) res <- test.aovlist(av, which = which, error = error) return(res) } test.aovlist <- function(x, which, error, ...) { mm

Re: [R] Possible bug in screen ?

2008-11-23 Thread Dieter Menne
_ gmx.net> writes: > after choosen the plot in witch I want to draw a point, just the first > plot draws the point > Is it a bug or just a user-problem ? > > Example : > split.screen(c(2,1)) > screen(1) > plot(1:10) > screen(2) > plot(10:100) > > screen(n=1, new=F) > points(4,3, col="red") > s

Re: [R] Possible bug in screen ?

2008-11-23 Thread David Winsemius
Before raising the bug flag, one should read the help page (more?) carefully: Warnings The recommended way to use these functions is to completely draw a plot and all additions (i.e. points and lines) to the base plot, prior to selecting and plotting on another screen. The behavior

[R] R and the Web: A small Wordpress plugin RwebFriend

2008-11-23 Thread Ajay ohri
Hi, The web interfaces are great examples of using R from the web. The wordpress plugin is a great creative thought. Taking this further- since one critical point in R vs SAS or other Corporate Type Software is the way it handles memory, could we install say R web and these plugins on a cloud sc

Re: [R] Basic question on concatenating factors

2008-11-23 Thread jim holtman
You do have to read a little further on the help page to make sure that duplicates are removed if they appear after, and not before, others in the vector to see that the order is preserved: "Note that unlike the Unix command uniq this omits duplicated and not just repeated elements/rows. That is,

Re: [R] ggplot2 - facet_grid and facet_wrap

2008-11-23 Thread hadley wickham
Hi David, That looks like a bug! I'll look into it. Regards, Hadley On Sat, Nov 22, 2008 at 1:07 PM, David Hajage <[EMAIL PROTECTED]> wrote: > Hello R users (and Hadley) > > I have another question about ggplot2 :-) > > (version 0.8) > > `dat` <- > structure(list(D = c("a", "b", "c", "d"), G =

[R] Demande d'information

2008-11-23 Thread abdelkrim AAZZAB
Bonjour J’aimerai bien savoir  comment implanter un réseau de neurone pour la prévision des séries temporelles financières (Apprentissage, test, validation et prévision) en utilisant l’algorithme MLP sous le logiciel R. Cordialement AAZZAB Abdelkrim   [[alternative H

[R] A small Wordpress plugin RwebFriend

2008-11-23 Thread Xiaoxu LI
Dear R fans, I wrote a trivial wordpress plugin for users of wordpress and Rweb (or other web interface ) Plugin URL: http://lixiaoxu.lxxm.com/rwebfriend/ Xiaoxu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] grep for asterisks "*"'s

2008-11-23 Thread Robin Clark
Excellent the double escape does the job - thanks to everyone who replyed! -- View this message in context: http://www.nabble.com/grep-for-asterisks-%22*%22%27s-tp20644195p20645482.html Sent from the R help mailing list archive at Nabble.com. __ R-hel

Re: [R] unique columns in a matrix and number of each

2008-11-23 Thread Gabor Grothendieck
Define inner as in: http://tolstoy.newcastle.edu.au/R/e4/help/08/08/19562.html and use that with identical to define an inner product: m <- matrix(c(1, 2, 1, 2, 3, 2), 2) # test matrix m colSums(inner(m, u <- unique(m,,2), identical)) u Please provide actual code to create test examples and expe

Re: [R] grep for asterisks "*"'s

2008-11-23 Thread Tony Breyal
Hi Robin! Does the following produce what you want mate? ### R START ### > text <- 'this sentence contains an * (i.e. an astrix).' > grep('\\*', text) [1] 1 ### R END ### Regards, Tony Breyal On 23 Nov, 08:41, Robin Clark <[EMAIL PROTECTED]> wrote: > Hello, > I'm trying to determine if a string

[R] Possible bug in screen ?

2008-11-23 Thread _
Hi all, after choosen the plot in witch I want to draw a point, just the first plot draws the point Is it a bug or just a user-problem ? Example : split.screen(c(2,1)) screen(1) plot(1:10) screen(2) plot(10:100) screen(n=1, new=F) points(4,3, col="red") screen(n=2, new=F) points(20,20, col="re

Re: [R] unique columns in a matrix and number of each

2008-11-23 Thread Sunayan Acharya
maybe there's a much simpler way to do this but here's what I got: > z [,1] [,2] [,3] [,4] [,5] [,6] [1,]114444 [2,]225555 [3,]336666 > z.unique<-unique(z,MARGIN=2) > z.unique [,1] [,2] [1,]14 [2,]25

Re: [R] Growth rate determination using ANCOVA

2008-11-23 Thread Andrew Robinson
Hi David, On Fri, Nov 21, 2008 at 12:01:52PM -0800, dschruth wrote: > I'm a programmer in a biology lab who is starting to use R to automate > some of our statistical analysis of growth rate determination. But I'm > running into some problems as I re-code. > > 1) Hypotheses concerning Slope simil

Re: [R] write every element of a variable into a separate text-file

2008-11-23 Thread Michael Dewey
At 13:39 21/11/2008, [EMAIL PROTECTED] wrote: Hello, what I want to do, is, to write every element of a variable into a separate text-file automatically: I think this may be FAQ 7.34 How can I save the result of each iteration in a loop into a separate file? My Variable: > wull [1] "Hal

Re: [R] grep for asterisks "*"'s

2008-11-23 Thread Ted Harding
On 23-Nov-08 08:41:02, Robin Clark wrote: > Hello, > I'm trying to determine if a string contains asterisks using the grep > function. I know that this is slightly difficult because * is a special > character in regular expressions and needs to be escaped. However, > escaping the * using \ doesn't

[R] grep for asterisks "*"'s

2008-11-23 Thread Robin Clark
Hello, I'm trying to determine if a string contains asterisks using the grep function. I know that this is slightly difficult because * is a special character in regular expressions and needs to be escaped. However, escaping the * using \ doesn't work either: if(grep("\*", model)>0) #does the mod

Re: [R] Growth rate determination using ANCOVA

2008-11-23 Thread Dieter Menne
dschruth gmail.com> writes: ...I am >>worried that our null and alternative hypotheses should be swapped so > that our test is more conservative (Ho=slopes are different ... ie > still acclimating.) > > Is there a way to specify my model that flips these hypotheses? No, that not possible becau