[R] Further Problems with RExcel - OLE action message

2012-06-27 Thread PaulJr
Hello everyone, There is another message that is popping up in RExcel that goes: Microsoft Excel is waiting for another application to complete an OLE action. What does this mean? I have attached a document here that shows the message in detail:

[R] Menu Options Disabled in RExcel

2012-06-27 Thread PaulJr
Dear Richard, I know I should be posting this question on the list (I´ve already submited the question on RExcel´s list and still wating for approval) but I am going to send you the question here also, Please take a look at the document I am attaching, as you can see the Menu Options in RExcel

[R] computing time for solve() in Matrix package

2012-06-27 Thread Paul Rathouz
Hi -- I am wondering why the time to solve (invert) a block diagonal matrix created with bdiag() from the Matrix package does not scale with the number of blocks [all of the same size]. Or, what I am doing wrong. The code / output below creates a series of block diagonal matrices with 4x4

[R] X11 Font is missing during Taylor diagram plot

2012-06-27 Thread mmkamal
Dear Jim, I am sorry to write you directly instead of sending a user forum mail. I have been trying to plot a Taylor diagram but get confronting the following error message: taylor.diagram(ref,model_D1,pos.cor=FALSE) Error in text.default(1.05 * maxray * i, 1.05 * maxray * sqrt(1 -

[R] density function

2012-06-27 Thread pilaw
Hello, I need density function so that I can find expected value (using integration). I use density(): f= density(data) but f isn't a function and I can't get values and integrate it This is very urget, so please help. Greetings Peter -- View this message in context:

[R] how to convert list of matrix (raster:extract o/p) to data table with additional colums (polygon Id, class)

2012-06-27 Thread akjha
Hi List, I have a raster and a polygon with attribute ID and Class. I want to have the fraction of each class present in each pixel of raster. I have use the raster::extract to get the value and weights as below. ex-extract(raster,polygon,weighted=TRUE) this gives me [[1]] value weight

[R] Help with spdep package issue with errorsarlm

2012-06-27 Thread Samantha Sifleet
Hi List, I am hoping some of you have experience with the spdep package. I have had success with lm.morantest and lm.LMtests. I am trying to run a spatial error model and I keep getting the following error Error in res[i, listw$neighbours[[i]]] - listw$weights[[i]] : NAs

[R] rJava Error

2012-06-27 Thread fabin.ittiachan
Hi, I'm receiving an error when I am trying to install rJava. I have posted the error below. RHive_0.0-6.tar.gz rJava_0.9-3.tar.gz RJDBC_0.2-0.tar.gz Rserve_0.6-8.tar.gz [root@localhost Package]# R CMD INSTALL rJava_0.9-3.tar.gz * installing to library ‘/usr/local/lib64/R/library’ *

[R] How to copy files emulating cp -f on Unix

2012-06-27 Thread Tang, Hsiu-Khuern
Hi, Is there a function that emulates cp -f on Unix, in that existing but non-writable destination files are removed first? I thought file.copy(src, dst, overwrite = TRUE) did that, but it doesn't: it will not copy to non-writable dst. To be sure, this behavior is consistent with the

[R] How to connect R to php

2012-06-27 Thread shrutibansal
Hello I want to know Is this possible to connect R with PHP ? I am using operating system-windows 7 there is a R-php software but it is not working for windows 7 OS... Can any body help me? Shruti Bansal -- View this message in context:

Re: [R] chisq.test

2012-06-27 Thread John
On Wed, 27 Jun 2012 16:58:29 +1200 Rolf Turner rolf.tur...@xtra.co.nz wrote: On 27/06/12 08:54, arun wrote: Hi, The error is due to less than 5 observations in some cells. NO, NO, NO It's not the observations that matter, it is the ***EXPECTED COUNTS***. These must

Re: [R] X11 Font is missing during Taylor diagram plot

2012-06-27 Thread Pascal Oettli
Hello, And what is your system? Do you have root privileges? Regards Le 27/06/2012 13:01, mmka...@uwaterloo.ca a écrit : Dear Jim, I am sorry to write you directly instead of sending a user forum mail. I have been trying to plot a Taylor diagram but get confronting the following error

Re: [R] plotting two histograms on one plot with hist function

2012-06-27 Thread Blignaut, M, Mej mb...@sun.ac.za
Thank you for all the advice! After mailing the question, I actually found a function called multhist (plotrix package) that plots two data sets (in single list) on a single histogram. The script is as follows: #I listed to two data sets in “long” format in a .csv file input -

Re: [R] question about formatting Dates

2012-06-27 Thread Patrick Connolly
On Tue, 26-Jun-2012 at 10:54PM -0500, Erin Hodgess wrote: | Dear R People: | | I have dates as factors in the following: | | poudel.df$DATE | [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 | [8] 1/9/2011 1/10/2011 | Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011

[R] lm without intercept, false R-squared

2012-06-27 Thread Christof Kluß
Hi is there a command that calculates the correct adjusted R-squared, when I work without intercept? (The R-squared from lm without intercept is false.) Greetings Chrsitof __ R-help@r-project.org mailing list

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread Uwe Ligges
On 27.06.2012 09:33, Christof Kluß wrote: Hi is there a command that calculates the correct adjusted R-squared, when I work without intercept? (The R-squared from lm without intercept is false.) Then we need your definition of your version of correct - we know the definition of your

Re: [R] selecting rows by maximum value of one variables in dataframe nested by another Variable

2012-06-27 Thread Petr PIKAL
Hi How could I select the rows of a dataset that have the maximum value in one variable and to do this nested in another variable. It is a dataframe in long format with repeated measures per subject. I was not successful using aggregate, because one of the columns has You could do it

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread Mikko Korpela
On 06/27/2012 10:33 AM, Christof Kluß wrote: Hi is there a command that calculates the correct adjusted R-squared, when I work without intercept? (The R-squared from lm without intercept is false.) Hi! This answer in R-FAQ might help you:

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread peter dalgaard
On Jun 27, 2012, at 09:33 , Christof Kluß wrote: Hi is there a command that calculates the correct adjusted R-squared, when I work without intercept? (The R-squared from lm without intercept is false.) When people say that, they are usually implying that a correct R-squared can be

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread Christof Kluß
for example the same model with intercept R² = 0.6, without intercept R² = 0.9 and higher. In my definition of R², R² has to be equal or less without intercept I do not know what R shows, but in the summary of the model without intercept it does not show the R² of the regression line. When I

Re: [R] question about formatting Dates

2012-06-27 Thread Rui Barradas
Hello, I'm afraid you're wrong, this has nothing to do with leading zeros. Just see: x - c(1/2/2011, 1/4/2011, 1/4/2011, 1/4/2011, 1/6/2011, 1/7/2011, 1/8/2011, 1/9/2011, 1/10/2011) as.Date(x, %m/%d/%Y) y - factor(x) str(y) as.Date(as.character(y), %m/%d/%Y) Note that the

[R] Simulating web requests

2012-06-27 Thread Mohan Radhakrishnan
Hi, I am looking for some assistance with these requirements. We are trying to simulate web requests to hit a web applications. Let's assume I have a url to hit that requires a username and password. 1. These web requests should have exponential inter arrival times. 2.

Re: [R] computing time for solve() in Matrix package

2012-06-27 Thread Oliver Ruebenacker
Hello, My guess would be that solve() does not take advantage of the special structure of the matrix and that you may want a sparse matrix representation. Take care Oliver On Tue, Jun 26, 2012 at 1:56 PM, Paul Rathouz rath...@biostat.wisc.edu wrote: Hi -- I am wondering why

Re: [R] Simulating web requests

2012-06-27 Thread Rui Barradas
Hello, Homework? There's a no homework rule but see inline. Em 27-06-2012 10:20, Mohan Radhakrishnan escreveu: Hi, I am looking for some assistance with these requirements. We are trying to simulate web requests to hit a web applications. Let's assume I have a url to hit that

Re: [R] density function

2012-06-27 Thread Rui Barradas
Hello, Maybe the link below is of some use. http://stats.stackexchange.com/questions/14061/area-under-the-pdf-in-kernel-density-estimation-in-r Hope this helps, Rui Barradas Em 27-06-2012 01:13, pilaw escreveu: Hello, I need density function so that I can find expected value (using

Re: [R] selecting rows by maximum value of one variables in dataframe nested by another Variable

2012-06-27 Thread Rui Barradas
Hello, Here's a solution using aggregate and merge. I've kept it in two steps for clarity. d - read.table(text= subjecttime.ms V3 1 1 stringA 1 12 stringB 1 22 stringC 2 1stringB 2 14 stringC 2 25 stringA , header=TRUE) ag -

Re: [R] Simulating web requests

2012-06-27 Thread Mohan Radhakrishnan
Homework ? You mean the question is at a high level. I use R. It is just the simulation part that I am investigating. Several papers on Capacity Planning that I am working on are useful for analyzing log traffic using R for GOF tests etc. But I am not able to find many papers on using R or r-java

[R] formula version of sunflowerplot() fails when axis label specified

2012-06-27 Thread Gerrit Eichner
Hello, R-help, does anybody have already a work-around for the problem that the formula version of sunflowerplot() throws an error when provided with a value for xlab (or ylab) different from NULL: sunflowerplot( Sepal.Length ~ Sepal.Width, data = iris, xlab = A) Error in

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread Uwe Ligges
On 27.06.2012 10:36, Christof Kluß wrote: for example the same model with intercept R² = 0.6, without intercept R² = 0.9 and higher. In my definition of R², R² has to be equal or less without intercept I do not know what R shows, but in the summary of the model without intercept it does not

[R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
Hi R-users, I'm trying to repeat the same procedure to 1000 data set. I know this is very easy, but I got stuck finding the right and fastest way in running it. IID50=Riidf[1:50,1:1000] #where IID50 is a dataframe consist of 1000 time series(as column) and 50 time scales (row). #what I tried to

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Dimitris Rizopoulos
you will have to check what function pargev() returns as a result. I would guess that is probably a list. In any case, you could use something like the following: estIID50 - lapply(IID50, function (m) pargev(lmom.ub(m))) I hope it helps. Best, Dimitris On 6/27/2012 1:31 PM, Al Ehan wrote:

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Rui Barradas
Hello, Try the following. estIID50 - apply( IID50, 2, function(x) pargev(lmom.ub(x)) ) And see ?apply Hope this helps, Rui Barradas Em 27-06-2012 12:31, Al Ehan escreveu: Hi R-users, I'm trying to repeat the same procedure to 1000 data set. I know this is very easy, but I got stuck

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
It's working I am excited than ever!! Thank you so much On Wed, Jun 27, 2012 at 12:45 PM, Dimitris Rizopoulos d.rizopou...@erasmusmc.nl wrote: you will have to check what function pargev() returns as a result. I would guess that is probably a list. In any case, you could use something

Re: [R] MuMIn - assessing variable importance following model averaging, z-stats/p-values or CI?

2012-06-27 Thread Kamil Bartoń
p-value 0.05 means that the 95% confidence intervals span zero. Use confint to get the CI. It is described in ?model.avg. cheers, kamil Dnia 2012-06-27 12:00, Robertson, Andrew pisze: Dear R users, Recent changes to the MuMIn package now means that the model averaging command (model.avg)

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
Sorry, one more simple question. how do I pick, from the generated lapply, the $para for each X. say here I have 2 generated list from previous function. how do I take only the $para for each X? Thank you so much for your kindness. $X1 $X1$type [1] gev $X1$para xi alpha

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Dimitris Rizopoulos
try this: sapply(estIID50, [[, 'para') Best, Dimitris On 6/27/2012 2:17 PM, Al Ehan wrote: Sorry, one more simple question. how do I pick, from the generated lapply, the $para for each X. say here I have 2 generated list from previous function. how do I take only the $para for each X?

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread peter dalgaard
On Jun 27, 2012, at 13:15 , Uwe Ligges wrote: 1 - crossprod(residuals(model)) / crossprod(y - mean(y)) And the reason why that is not used in R: y- rnorm(100,10,1) x - 1:100 model - lm(y~x-1) 1 - crossprod(residuals(model)) / crossprod(y - mean(y)) [,1] [1,] -27.60012 --

Re: [R] increase the usage of CPU and Memory

2012-06-27 Thread Arnaud Mosnier
Hi Xi, Maybe you should try to parallelize your calculations. See package parallel. http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf Arnaud On Mon, Jun 25, 2012 at 8:07 PM, Xi amzhan...@gmail.com wrote: Dear All, I have been searching online for help increasing my R

Re: [R] plotting two histograms on one plot with hist function

2012-06-27 Thread John Kane
-Original Message- From: mb...@sun.ac.za Sent: Wed, 27 Jun 2012 08:32:24 +0200 To: jrkrid...@inbox.com, ke...@math.montana.edu Subject: RE: [R] plotting two histograms on one plot with hist function Thank you for all the advice! After mailing the question, I actually

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread Gabor Grothendieck
On Wed, Jun 27, 2012 at 4:36 AM, Christof Kluß ckl...@email.uni-kiel.de wrote: for example the same model with intercept R² = 0.6, without intercept R² = 0.9 and higher. In my definition of R², R² has to be equal or less without intercept I do not know what R shows, but in the summary of the

Re: [R] Packaging Error

2012-06-27 Thread Mayank Bansal
It would be difficult for me to give the package. Can you explain me what does this error /usr/lib/R/bin/INSTALL: line 34: 9964 Done echo 'tools:::.install_packages()' 9965 Segmentation fault | R_DEFAULT_PACKAGES= LC_COLLATE=C ${R_HOME}/bin/R $myArgs --slave --args ${args} generally mean. The

Re: [R] Packaging Error

2012-06-27 Thread Prof Brian Ripley
On 27/06/2012 15:17, Mayank Bansal wrote: It would be difficult for me to give the package. Then, following the posting guide, you need to find an example you can give. Can you explain me what does this error /usr/lib/R/bin/INSTALL: line 34: 9964 Done echo 'tools:::.install_packages()' 9965

[R] a problem of approach

2012-06-27 Thread Adrian Duşa
Dear R-help list, Part of a program I wrote seem to take a significant amount of time, therefore I am looking for an alternative approach. In order to explain what is does: - the input is a sorted vector of integer numbers - some higher numbers may be derived (using a mathematical formula) from

Re: [R] Simulating web requests

2012-06-27 Thread David Winsemius
On Jun 27, 2012, at 6:58 AM, Mohan Radhakrishnan wrote: Homework ? You mean the question is at a high level. I use R. It is just the simulation part that I am investigating. Several papers on Capacity Planning that I am working on are useful for analyzing log traffic using R for GOF tests

Re: [R] question about formatting Dates

2012-06-27 Thread David L Carlson
How about dates - as.factor(c(1/2/2011, 1/4/2011, 1/4/2011, 1/4/2011, 1/6/2011, 1/7/2011, 1/8/2011, 1/9/2011, 1/10/2011)) dates [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 [8] 1/9/2011 1/10/2011 Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011

[R] ggplot2 ordering in a faceted dotplot.

2012-06-27 Thread John Kane
am trying to produce two dot plot figures in ggplot2. So far the first one (p) in the program below is working fine. However when I want to move to a faceted plot (p1) I seem to lose my ordering or, more likely, I'm just getting an ordering I am not expecting and I always have trouble

Re: [R] chisq.test

2012-06-27 Thread Peter Ehlers
On 2012-06-26 23:02, John wrote: On Wed, 27 Jun 2012 16:58:29 +1200 Rolf Turnerrolf.tur...@xtra.co.nz wrote: On 27/06/12 08:54, arun wrote: Hi, The error is due to less than 5 observations in some cells. NO, NO, NO It's not the observations that matter, it is the

Re: [R] formula version of sunflowerplot() fails when axis label specified

2012-06-27 Thread David L Carlson
It seems to be a bug when you specify an x-label. # No xlab= works fine, but uses variable names to label x and # y axes sunflowerplot(Sepal.Length~Sepal.Width, data=iris) # These all throw the error message sunflowerplot(Sepal.Length~Sepal.Width, data=iris, xlab=A)

Re: [R] formula version of sunflowerplot() fails when axis label specified

2012-06-27 Thread David L Carlson
Or just avoid the formula version: with(iris, sunflowerplot(Sepal.Width, Sepal.Length, xlab=A)) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From:

Re: [R] a problem of approach

2012-06-27 Thread jim holtman
One place to start is to use Rprof to see where time is being spent. I used the sample you sent and this is what I got: 0 16.7 root 1. 16.2 system.time 2. . 16.1 testfoo 3. . . 16.1 setdiff 4. . . .8.2 as.vector 5. . . . .8.2 findSubsets 6. . . . . .6.4 increment

Re: [R] Ljung-Box test (Box.test)

2012-06-27 Thread Rui Barradas
Hello, No, the Ljung-Box test wouldn't be inappropriate in that case. First you detrend the series and then test for serial independence. It's even usual to do so. I would use the default values for lag and fitdf. But use type=Ljung, the Box-Pierce test is nowadays seldom used in pratice, if

Re: [R] a problem of approach

2012-06-27 Thread Adrian Duşa
Hi Jim, On Wed, Jun 27, 2012 at 7:27 PM, jim holtman jholt...@gmail.com wrote: One place to start is to use Rprof to see where time is being spent. I used the sample you sent and this is what I got:  0  16.7 root  1.   16.2 system.time  2. .   16.1 testfoo  3. . .   16.1 setdiff  4. . .

[R] Matrix multiplication using Matrix package

2012-06-27 Thread Doran, Harold
I have the following matrix operation A %*% B %*% A Where these matrices have the following dimensions and class attributes. dim(A) [1] 5764 5764 class(A) [1] dgCMatrix attr(,package) [1] Matrix dim(B) [1] 5764 5764 class(B) [1] dgCMatrix attr(,package) [1] Matrix Now, when I do just

Re: [R] increase the usage of CPU and Memory

2012-06-27 Thread Richard R. Liu
Hello Xi, Have you tried replacing the for loop by an apply construct, e.g., lapply or sapply? In my experience these functions are more efficient than for. At any rate, if you succeed with, say, lapply, there are some R packages that support parallel processing versions. I believe the

Re: [R] a problem of approach

2012-06-27 Thread Petr Savicky
On Wed, Jun 27, 2012 at 05:36:08PM +0300, Adrian Duşa wrote: Dear R-help list, Part of a program I wrote seem to take a significant amount of time, therefore I am looking for an alternative approach. In order to explain what is does: - the input is a sorted vector of integer numbers -

Re: [R] a problem of approach

2012-06-27 Thread Adrian Duşa
On Wed, Jun 27, 2012 at 8:11 PM, jim holtman jholt...@gmail.com wrote: If you look, half of the time is spent in the 'findSubsets function and the other half in determining where the differences are in the sets.  Is there a faster way of doing what findSubsets does since it is the biggest time

Re: [R] density function

2012-06-27 Thread Greg Snow
Here are 2 approaches: Use logspline density estimates (logspline package) rather than kernel density estimates, this can give you a function to pass to integrate or other tools, the estimates may be a little different from the kernel density estimates. If you need to use kernel density

[R] Creating rastor files from kernelbb functions

2012-06-27 Thread Amy Adams
Hello R users, I have used the package adehabitat to create a brownian bridge for my radio-tracked data from one animal (using the kernelbb function). I have worked through page 17 of the manual using the code: data - kernelbb(x, sig1 = 6.23, sig2 = 58, grid = 100) image(data) This produces a

[R] Multivariate P-GARCH Model

2012-06-27 Thread andy
Hi, I am trying to estimate a multivariate P-GARCH model for two factors xy. I have selected p-garch to study the leverage effects. Is there any toolkit in R that can help me do this? Thanks, Andy -- View this message in context:

[R] Strucchange: Breakpoint slow

2012-06-27 Thread Cand2d
Hi to all, I am trying to run breakpoints() on a fairly large sample (10.000 observations). The process is very slow, any idea on how to speed this up? I have tried the hpc=foreach parameter, but this didn't work at all when I tried to run it on a smaller sample. breakpoints(x ~ x.l1 + x.l2 +

[R] Problem installing RBloomberg

2012-06-27 Thread yoda55
I have the following error message when I try to install RBloomberg. Les packages binaires téléchargés sont dans C:\Users\bloom\AppData\Local\Temp\RtmpktX4UK\downloaded_packages Message d'avis : packages ‘quantstrat’, ‘RBloomberg’, ‘rsproxy’, ‘VaR’ are not available (for R version 2.15.1)

Re: [R] Loop for multiple plots in figure

2012-06-27 Thread Marcel Curlin
Well at this point I have what I need (rough plot for data exploration) but the simplicity of the first approach is quite elegant and it has become a learning project. I have succeeded in formatting the overall plot OK but have not been able to solve the problem of titles or any kind of

Re: [R] Strucchange: Breakpoint slow

2012-06-27 Thread Achim Zeileis
On Wed, 27 Jun 2012, Cand2d wrote: Hi to all, I am trying to run breakpoints() on a fairly large sample (10.000 observations). The process is very slow, any idea on how to speed this up? I have tried the hpc=foreach parameter, but this didn't work at all when I tried to run it on a smaller

Re: [R] Problem installing RBloomberg

2012-06-27 Thread Pascal Oettli
Hello, Probably you should try this (thanks Google): install.packages(Rbbg, repos = http://r.findata.org;) Regards Le 27/06/2012 22:54, yoda55 a écrit : I have the following error message when I try to install RBloomberg. Les packages binaires téléchargés sont dans

[R] how to skip from some null file and go on reading?

2012-06-27 Thread Jie Tang
hi , I am reading a series of files by the command shown as below. cop_x_data-read.table(flnm(i) ,skip=2,allowEscapes=TRUE,blank.lines.skip=TRUE) the first two line of the files are headfile and I skip them by skip=2. and sometimes the data file is null and there is no any data in the file except

Re: [R] how to skip from some null file and go on reading?

2012-06-27 Thread Jim Holtman
why cann't you use 'try'? you can get the size of the file with 'file.info' and then make a decision to read or not. Sent from my iPad On Jun 27, 2012, at 23:02, Jie Tang totang...@gmail.com wrote: hi , I am reading a series of files by the command shown as below.

Re: [R] Simulating web requests

2012-06-27 Thread Mohan Radhakrishnan
Not being the expert I have looked at papers like 'simpleR { Using R for Introductory Statistics' by John Verzani. Some sample Code is in these papers. Looks like I have to search for ideas to code a programming language like Java by taking input from R(r-java). Can R be used directly to hit web

[R] trend in incidence rate

2012-06-27 Thread ericlsh
I would like to compare the incidence rates of three groups. They are supposed to have different risks so I would like to test whether there is a increasing trend in the incidence rates. Does R or any packages provide a trend test for incidence rates? I checked epiR and epitools. It seems they do

Re: [R] lm without intercept, false R-squared

2012-06-27 Thread Christof Kluß
for example the same model with intercept R² = 0.6, without intercept R² = 0.9 and higher. In my definition of R², R² has to be equal or less without intercept I do not know what R shows, but in the summary of the model without intercept it does not show the R² of the regression line. When I

Re: [R] Binary Quadratic Opt?

2012-06-27 Thread khris
Hi Petr, Appreciate your feedback and sorry for the delay in responding. The following is the description of problem from start:- We have a set of sensors in XY plane arranged in more or less a rectangular grid and we know their (x,y) co-ordinate. Now these sensors send data and from that data

[R] survfit function

2012-06-27 Thread niloo javan
Hello In (survfit(Surv(Time,Status)~1)) I want to have status=0 as Failure and status=1 as Censore. Changing above formula to (survfit(Surv(Time,Status)~0)) doesnot help!! What should i do? Thank You. _ Best Regards Niloofar.Javanrouh MSc Of BioStatistics 

[R] building binary tree

2012-06-27 Thread Peppino
Hi I am new with R I Have to build a binary tree with R. I'm very confused was wondering if anyone had any R sample code they would share. I've come across a lot of C++ code(nothing in R) and this is not helping. Any bady can help me? Bye Giuseppe -- View this message in context:

[R] Help with spdep package issue with errorsarlm

2012-06-27 Thread Samantha Sifleet
Hi List, I am hoping some of you have experience with the spdep package. I have had success with lm.morantest and lm.LMtests. I am trying to run a spatial error model and I keep getting the following error Error in res[i, listw$neighbours[[i]]] - listw$weights[[i]] : NAs

[R] binary tree

2012-06-27 Thread Peppino
Hi I am new with R I Have to build a binary tree with R. I'm very confused was wondering if anyone had any R sample code they would share. Any bady can help me? Bye Giuseppe -- View this message in context: http://r.789695.n4.nabble.com/binary-tree-tp4634593.html Sent from the R help

Re: [R] crosstable and regression for survey data (weighted)

2012-06-27 Thread haps
Thanks Pablo for your answer, it was very insightful, but I guess I got something wrong. I formed a survey design as: library(survey) mydesign - svydesign(ids=~vill_neigh_code+clust, strata=~strat, weights=~sweight, data=mydata) where strat: stratum (urban or (sub-county) rural). clust:

Re: [R] MuMIn Problem getting adjusted Confidence intervals

2012-06-27 Thread KKulma
Hello, I seem to be having a similar problem, but with glmer models. Here, model.avg() doesn't return anything but coefficient values: fl19-glmer( corrFLEDGE ~ INFECTION * rsLD * bin.age + (1 | year) + (1 | RINGNO),data=corrmalaria,family=poisson) fledglings-dredge(fl19) top.fledglings -

[R] how to create skewness curve

2012-06-27 Thread quantum
I can make kurtosis but now skewness curve. How can I do that? I have used the following code. x-(1:601-301)/50 x dt3-dt(x,3) pt3-pt(x,3) # t distribution has mean 0; variance f/(f-2); skewness 0; excess kurtosis 6/(f-4) dn01-dnorm(x,0,1) pn01-pnorm(x,0,1) dlogis-dlogis(x,0,1)

Re: [R] question about formatting Dates

2012-06-27 Thread arun
Hi, I can see the mistake in the code as $ before Y.   dat1-as.factor(c(1/2/2011,1/4/2011,1/4/2011)) dat1 [1] 1/2/2011 1/4/2011 1/4/2011 Levels: 1/2/2011 1/4/2011  as.Date(as.character(dat1), %m/%d/%Y) [1] 2011-01-02 2011-01-04 2011-01-04 as.Date(as.character(dat1),%m/%d/$Y) [1] NA NA NA

Re: [R] formula version of sunflowerplot() fails when axis label specified

2012-06-27 Thread sina rueeger
Hi Gerrit I did the following: access the function via graphics:::sunflowerplot.formula, and then commented some lines to see, where the problem lies. I guess that it is the chunk with mf - eval(m, parent.frame()), but to be honest, I do not know why. My workaround is as follows:

[R] Make a reference?

2012-06-27 Thread quantum
How can I make a reference i this case? I want to make a reference to 'Artikel XXX' For example In The Artikel '' there is two tables. .. Litterature Artikel XXX -- View this message in context: http://r.789695.n4.nabble.com/Make-a-reference-tp4634611.html Sent from the R help mailing

[R] Filling In Grid based on 0 and 1

2012-06-27 Thread vp726
Hi, I'm wondering if I can do this in R. I have a data set with questions (x-value) and respondents (y-value). If the respondent answered the question they get a 1 and if the respondent didn't answer the question they have a 0. Is there anyway where I can graph something similar to a grid where

Re: [R] colour highlighting inputs and outputs in the R terminal?

2012-06-27 Thread nikola
that's an old thread but checkout the colorout package - it is awesome and it does exactly what you're asking for ! http://cran.r-project.org/web/packages/colorout/ -- View this message in context:

Re: [R] selecting rows by maximum value of one variables in dataframe nested by another Variable

2012-06-27 Thread arun
HI, Try this: dat1 - read.table(text= subject    time.ms V3 1  1  stringA 1  12  stringB 1  22    stringC 2  1    stringB 2  14  stringC 2  25  stringA , sep=,header=TRUE) dat2-aggregate(dat1$time.ms,list(dat1$subject),max) colnames(dat2)-c(subject,time.ms)  

[R] Extract upper case letters

2012-06-27 Thread mdvaan
t - TheWeatherIsVeryNice How do I extract the upper case letters? - TWIVN Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Extract-upper-case-letters-tp4634664.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Prediciting sports team scores

2012-06-27 Thread JerryCleve
A very important thing is home game or guest game. Why did I mention Almeria - Sevilla earlier? Almeria are heroes at home. At least, they were in 2009/2010. They scored almost in every home game, no matter who is there at the other end of it - Barcelona or Real Madrid.

[R] graph with two different arithmetic scales

2012-06-27 Thread denissearchundia
hi i try to do a graph who shows 2 time series at the same time thanks! -- View this message in context: http://r.789695.n4.nabble.com/graph-with-two-different-arithmetic-scales-tp4634672.html Sent from the R help mailing list archive at Nabble.com.

[R] qplot and colors (Please Help)

2012-06-27 Thread David Lyon
Please help: I am using qplot as below and want to specify a different color scheme for race but dont know how, can someone show me. Thanks in advance Code and input file below: library(ggplot2) library(gridExtra) d-read.table(results, header=TRUE, fill=TRUE)

[R] If statement - copying a factor variable to a new variable

2012-06-27 Thread James Holland
I need to look through a dataset with two factor variables, and depending on certain criteria, create a new variable containing the data from one of those other variables. The problem is, R keeps making my new variable an integer and saving the data as a 1 or 2 (I believe the levels of the

[R] Printing a variable in a loop

2012-06-27 Thread kat_the_great
Dear R Users: I'm a STATA user converting to R, and I'd like to be to do the following. #Assign var_1 and var_2 a value 10-var1 20-var2 #Now I'd like to print the values of var_1 and var_2 by looping through var_1 and var_2 in such a manner: while(y3){ print(var_y) y+1-y } In STATA, the y

Re: [R] Extract upper case letters

2012-06-27 Thread R. Michael Weylandt
How do you want your output? If you want a character vector of lowercase letters, just use gsub([^::A-Z::],, t) to substitute for all non-uppercase characters. strsplit() can lead you to a vector of the single-letter upper case letters. Best, Michael On Wed, Jun 27, 2012 at 2:15 PM, mdvaan

[R] Error: figure margins too large

2012-06-27 Thread Karly Harrod
Hello, I am running cluster analysis, and am attempting to create a graph of my clusters. I keep on getting an error that says that my figure margins are too large. d - file.choose() d - read.csv(d,header=TRUE) mydataS - scale(d, center = TRUE, scale=TRUE) #Converts mydataS from a

[R] Replacing sets of rows in matrix within a loop

2012-06-27 Thread nqf
Dear R-help, I am writing some simulation code to create multiple sets of time-to-event clinical trial data (for use in meta-analysis). Within each trial, I want to apply censoring via simulation of uniform variables (with minimum zero and maximum the median outcome time for that particular

Re: [R] graph with two different arithmetic scales

2012-06-27 Thread R. Michael Weylandt
take a look at library(zoo) example(plot.zoo) which shows one way to do this, Best, Michael On Wed, Jun 27, 2012 at 6:50 PM, denissearchundia denissearchun...@yahoo.com.mx wrote: hi i try to do a graph who shows 2 time series at the same time thanks! -- View this message in context:

[R] Running R on a cluster

2012-06-27 Thread Xuefeng Gao
Hello, I have R script my_script.R . It loads a large input file data.txt and then outputs a large matrix out. (the command of running it on cluster using my.cmd is put at the end) Now I have 30 different input files data1.txt, data2.txt ... and data30.txt and want to generate and save 30 output

[R] lattice histogram log and non log values

2012-06-27 Thread LCOG1
Hello all, Please consider the following library(lattice) Colors. -rep(brewer.pal(7, Dark2),2) color - 1 Data.X.. - data.frame(UnitArea = c(rnorm(1000), rnorm(1000)), Type = c(rep(Base,1000),rep(Log,1000))) histogram( ~ UnitArea | Type, data =

Re: [R] Loop for multiple plots in figure

2012-06-27 Thread baptiste auguie
You can use main = unique(d$Subject) to solve this problem. HTH, b. On 27 June 2012 08:49, Marcel Curlin cemar...@u.washington.edu wrote: Well at this point I have what I need (rough plot for data exploration) but the simplicity of the first approach is quite elegant and it has become a

Re: [R] chisq.test

2012-06-27 Thread Omphalodes Verna
Dear all! Thanks for clarification. OV To: Rolf Turner rolf.tur...@xtra.co.nz Sent: Wednesday, June 27, 2012 1:33 PM Subject: Re: [R] chisq.test Hi Rolf, Thanks for spotting the mistake.  A.K. - Original Message - From: Rolf Turner

Re: [R] qplot and colors (Please Help)

2012-06-27 Thread R. Michael Weylandt
Hi David, I believe you left out saying what color scheme you would prefer, so it's hard to help, but you might be a start by looking at the appropriate parts of Hadley's website here: http://had.co.nz/ggplot2/, particularly the scales section. Best, Michael On Wed, Jun 27, 2012 at 11:07 AM,