Re: [R] help with the maxBHHH routine

2011-05-03 Thread Arne Henningsen
Dear Rohit On 3 May 2011 22:53, Rohit Pandey wrote: > Hello R community, > > I have been using R's inbuilt maximum likelihood functions, for the > different methods (NR, BFGS, etc). > > I have figured out how to use all of them except the maxBHHH function. This > one is different from the others

[R] HELP

2011-05-03 Thread Nekeisha Spencer
Accelerated Failure Time Model to Proportional Hazard Form Greetings R users: I have been working on a problem for a while and can't seem to get any result. I am trying to convert accelerated failure time estimates to proportional form. I keep getting an error that I can't understand and do

Re: [R] RStudio -manipulate command

2011-05-03 Thread veepsirtt
Why the mean value " h" is not changing as the slider moves from 0 to 25 ?. It remains always constant. library(manipulate) example <- function(x.max){ plot(cars, xlim=c(0,x.max)) abline(h=mean(cars$dist),col="blue",lty=2) } manipulate( example(x.max), x.max=slider(0,25, step=5) ) veepsirtt

[R] nls problem with R

2011-05-03 Thread sterlesser
the original data are V2 =c(371000,285000 ,156000, 20600, 4420, 3870, 5500 ) T2=c( 0.3403 ,0.4181 ,0.4986 ,0.7451 ,1.0069 ,1.553) nls2=nls(V2~v0*(1-epi+epi*exp(-cl*(T2-t0))),start=list(v0=10^7,epi=0.9,cl=6.2,t0=8.7)) after execution error occurs as below

Re: [R] How to fit a random data into Beta distribution?

2011-05-03 Thread Shekhar
Hi Steven, Thanks for the quick reply. i have tried but its giving me error--->Error in optim(x = c(38.1815173696765, -12.7988197976440, -3.88212459045077, : initial value in 'vmmin' is not finite i have tried something like this: library(MASS) x<-rnorm(n=100,mean=10,sd=20); fitdistr(x,dbeta,

[R] problem with package "adapt" for R in Mac

2011-05-03 Thread Matías Ramírez Salgado
Hi, How i can install the package "adapt" in some version of R for mac? i try in 2.13, 2.9,2.7 and other previous versions... and nothing happens. and another question: There are some packages that do the same but that it is implemented for mac? (calculate integrals in 2 or more dimmensions). h

Re: [R] na.omit - Is it working properly?

2011-05-03 Thread peter dalgaard
On May 3, 2011, at 21:18 , Kalicin, Sarah wrote: > > I have a work around for this, but can someone explain why the first example > does not work properly? I believed it worked in the previous version of R, by > selecting just the rows=200525 and omitting the na's. I just upgraded to > 2.13.

Re: [R] fitting distributions using fitdistr (MASS)

2011-05-03 Thread David Winsemius
On May 3, 2011, at 10:03 PM, Usha wrote: Thanks for the help. I would like to explain my problem. I have sample of scores from tests which varies form 0 to 35. Now, i want to find out the best fit distribution for this data. I need to order the distributions based on their best fit. For this

Re: [R] fitting distributions using fitdistr (MASS)

2011-05-03 Thread Usha
Thanks for the help. I would like to explain my problem. I have sample of scores from tests which varies form 0 to 35. Now, i want to find out the best fit distribution for this data. I need to order the distributions based on their best fit. For this i am using the function fitdistr(). [One of th

[R] Specification of the model

2011-05-03 Thread jouba
Hi all , 1. In Laavan the package when you have two variables a and b which have a direct effect on one another for example like this: (a ↔ b), To write this in the model we must write how:a ~~b Or we must write two equations:a ~ bb ~ a in this case there is some information to add for the res

Re: [R] na.omit - Is it working properly?

2011-05-03 Thread P Ehlers
Kalicin, Sarah wrote: \begin{quote} I have a work around for this, but can someone explain why the first example does not work properly? I believed it worked in the previous version of R, by selecting just the rows=200525 and omitting the na's. \end{quote} You can prove this statement by providin

Re: [R] help with the maxBHHH routine

2011-05-03 Thread Ravi Varadhan
maxBHHH is *not* an in-built R function. It is in a distributed package called "maxLik". Always tell us which package is being used so that it is easier for us to help you. The error message says that the gradient function is returning a 10 x 2 matrix, whereas you say that you have 1000's of

Re: [R] scatterplot3d using colors in groups

2011-05-03 Thread Duncan Mackay
At 10:15 04/05/2011, you wrote: Content-Type: text/plain Content-Disposition: inline Content-length: 537 Hi everyone, I would like to improve my plot and I was wondering if someone can help me whith it. I'm trying this plot using two groups, but I want to choice the colors (the black and whi

Re: [R] Watts Strogatz game

2011-05-03 Thread Andrew Robinson
Hi, I have no familiarity with these functions --- I see that they are not in base R --- so I suggest that at very least you identify the package that you are using. Better would be to contact the package maintainer directly. Sometimes maintainers do not read R-help. Cheers Andrew On Tue, May

[R] scatterplot3d using colors in groups

2011-05-03 Thread Jose Bustos Melo
Hi everyone, I would like to improve my plot and I was wondering if someone can help me whith it. I'm trying this plot using two groups, but I want to choice the colors (the black and white circles) but I don't know how to change it from here. These are my sentences: myplot3d<- scatterplot3d(

Re: [R] Compiling Rgraphiz on Windows 7 64bit with R-2.13.0

2011-05-03 Thread Martin Morgan
On 05/03/2011 03:23 PM, Ben Rhelp wrote: Hi all, I am trying to compile Rgraphiz on Windows 7 64bit with R-2.13.0. I have installed Rtools213.exe from [1]. The 64bit packages in [2] provided me with the 64 bit version of graphviz. After intalling the binary version Rgraphviz 1.30 (in 32bit) it

[R] error term for ANOVA of generalized randomized block design

2011-05-03 Thread Kelsey Ketcheson
Does anyone know how to write the code for an anova for a generalized randomized block design? I have two blocks (random) and three treatments (fixed). Each treatment has two reps at each site. I know that for a RCBD with no replication that an anova can be run using aov(object~Block *Trt), but

Re: [R] na.omit - Is it working properly?

2011-05-03 Thread Andrew Robinson
Hi Sarah, I'm not sure that I understand your problem. You have shown us three ways to try to omit missing values, and one of them seems to work. But you're concerned because some aspect of it doesn't match the ones that don't work? But they don't work! I wonder if you could send an example i

Re: [R] delete excel id automatically generated

2011-05-03 Thread Andrew Robinson
Try the function rownames() Andrew On Tue, May 03, 2011 at 03:29:37AM -0700, agent dunham wrote: > Dear community, > > I uploaded an excel with read.xls. My xls file actually have a column which > is an id, ("plot" is the id) : > > plot height area > 347.6 5.4 > 853.2 4.1 > 8

Re: [R] help with the maxBHHH routine

2011-05-03 Thread Andrew Robinson
I suggest that you provide some commented, minimal, self-contained, reproducible code. Cheers Andrew On Wed, May 04, 2011 at 02:23:29AM +0530, Rohit Pandey wrote: > Hello R community, > > I have been using R's inbuilt maximum likelihood functions, for the > different methods (NR, BFGS, etc). >

Re: [R] Unexp. behavior from boot with multiple statistics

2011-05-03 Thread Andrew Robinson
Your interpretation of what the output is supposed to look like is actually correct. Take a look at the estimates of the bias in the BootStrap Statistics. You will see that they are the same as the difference between the location of colMeans of t and t0. I hope that this helps, Andrew On Tue,

Re: [R] having trouble with "R CMD INSTALL"

2011-05-03 Thread Gene Leynes
Uwe, It think the problem turned out to be with my "profile.site" file. As I recall, temporarily deleting / renaming it was the simple fix. I think it had to do with something I use to parse the commandArgs Thank you for your reply, and sorry for not responding sooner. I didn't think anyone re

[R] Compiling Rgraphiz on Windows 7 64bit with R-2.13.0

2011-05-03 Thread Ben Rhelp
Hi all, I am trying to compile Rgraphiz on Windows 7 64bit with R-2.13.0. I have installed Rtools213.exe from [1]. The 64bit packages in [2] provided me with the 64 bit version of graphviz. After intalling the binary version Rgraphviz 1.30 (in 32bit) it complains (as expected) that: > libra

Re: [R] Overlapping x axes using Lattice

2011-05-03 Thread Breheny, Patrick
I'm not clear on what you're looking for here. Your x-axis is numeric, why are you converting it to a factor? If you keep it numeric, the labels don't overlap. Or perhaps you don't want it to be numeric, in which case why not just change the aspect ratio of the plot until they no longer overl

Re: [R] ANOVA 1 too few degrees of freedom

2011-05-03 Thread Rovinpiper
Hi Richard, Thanks for your advice. I think that your suggestion is that I run the ANOVA with Combined.Plot as a factor. I have tried that does not alleviate the problem. Did I understand you properly? Do you have another idea? Thanks, David -- View this message in context: http://r.789695.

[R] Overlapping x axes using Lattice

2011-05-03 Thread Andrew McFadden
Hi R users I apologise in advance for this question as I suspect it is simple and perhaps others have had this problem. I am struggling to sort out how to fix the x axes so that the labels don't overlap. I have put the following example together to show my problem. library(lattice) titre <- as

Re: [R] Change the names of a dataframe

2011-05-03 Thread Duncan Murdoch
On 03/05/2011 4:43 PM, Jun Shen wrote: Dear list, This may sound silly. What is the right way to change the names of a dataframe? Let's say I have this data frame (dose) with four columns with names "ID", "DOSE", "TIME" "CMT". I want to change "DOSE" to "AMT". So I did names(dose[2])<-'AMT' Bu

Re: [R] adaptIntegrate - how to pass additional parameters to the integrand

2011-05-03 Thread baptiste auguie
Hi, The package maintainer is aware of this feature request. In the meantime, I've used Currying, require(cubature) f <- function(x, a) cos(2*pi*x*a) # a simple test function adaptIntegrate(roxygen::Curry(f, a=0.2), lower=0, upper=2) HTH, baptiste On 4 May 2011 05:57, Ravi Varadhan wrote

[R] help with the maxBHHH routine

2011-05-03 Thread Rohit Pandey
Hello R community, I have been using R's inbuilt maximum likelihood functions, for the different methods (NR, BFGS, etc). I have figured out how to use all of them except the maxBHHH function. This one is different from the others as it requires an observation level gradient. I am using the foll

Re: [R] Change the names of a dataframe

2011-05-03 Thread Greg Snow
In the first case you create a new data frame consisting of the 2nd column of the original, then change the name of the only column in that new data frame, then since nothing is done with that data frame it gets thrown away. So it is not that nothing happened, but just that nothing useful happe

[R] turning data with start and end date into daily data

2011-05-03 Thread Dimitri Liakhovitski
Hello! I have data that contain, among other things the date for the beginning and for the end of a (daily) time series (see example below - "mydata") mystring1<-c("String 1", "String 2") mystring2<-c("String a", "String b") starts<-c(as.Date("2011-02-01"),as.Date("2011-03-02")) ends<-c(as.Date("

[R] Change the names of a dataframe

2011-05-03 Thread Jun Shen
Dear list, This may sound silly. What is the right way to change the names of a dataframe? Let's say I have this data frame (dose) with four columns with names "ID", "DOSE", "TIME" "CMT". I want to change "DOSE" to "AMT". So I did names(dose[2])<-'AMT' But nothing happened. The name of the secon

Re: [R] How to fit a random data into Beta distribution?

2011-05-03 Thread Steven Kennedy
library(MASS) fitdistr(x,"beta",list(shape1=1,shape2=1)) On Tue, May 3, 2011 at 9:44 PM, Shekhar wrote: > > Hi, > I have some random data and i want to find out the parameters of Beta > distribution ( a and b) such that this data approximately fits into > this distribution. I have tried by plot

[R] bootstrap vignette construction and package installation

2011-05-03 Thread Murat Tasan
hi all - i'm trying to 'R CMD build' a package, but i have what appears to be a bootstrapping problem: i've included a vignette in my package, with R code interwoven (and built using Sweave), but in this documentation i have a code line: > library(MyPackage) now, when trying to build a .tar.gz ins

Re: [R] ANOVA 1 too few degrees of freedom

2011-05-03 Thread Richard M. Heiberger
Most likely your combined.trt is linearly dependent on the combined.plot factor. Try Anova.Trt.D.M.T.Pr.Model <- aov(Combined.Rs ~ as.factor(Combined.Plot) . and see if combined.plot now has the 11 df you are anticipating. Rich On Tue, May 3, 2011 at 3:37 PM, Rovinpiper wrote: > I'm runn

[R] NEW SUMMER ONLINE R COURSE: Fundamentals of Using R

2011-05-03 Thread Geoffrey Hubona
NEW SECTION BEGINS JUNE 1 (11AM-2PM ET) AND MAY 27 (6PM-9PM ET) The non-profit organization Information Institute ( http://www.information-institute.org) is offering a live, interactive, synchronous online course entitled Fundamentals of Using R. The registration cost for the 14-hour, 5 week cou

[R] ANOVA 1 too few degrees of freedom

2011-05-03 Thread Rovinpiper
I'm running an ANOVA on some data for respiration in a forest. I am having a problem with my degrees of freedom. For one of my variables I get one fewer degrees of freedom than I should. I have 12 plots and I therefore expected 11 degrees of freedom, but instead I got 10. Any ideas? I have some

[R] Unexp. behavior from boot with multiple statistics

2011-05-03 Thread algorimancer
I am attempting to use package boot to summarize and compare the performance of three models. I'm using R 2.13.0 in a Win32 environment. My statistic function returns a vector of 6 values, 3 of which are error rates for different models, and 3 are pairwise differences between those error rates.

Re: [R] Simple General Statistics and R question (with 3 line example) - get z value from pairwise.wilcox.test

2011-05-03 Thread peter dalgaard
On Apr 28, 2011, at 15:18 , JP wrote: > > > I have found that when doing a wilcoxon signed ranked test you should report: > > - The median value (and not the mean or sd, presumably because of the > underlying potential non normal distribution) > - The Z score (or value) > - r > - p value > .

Re: [R] ID parameter in model

2011-05-03 Thread Göran Broström
On Mon, May 2, 2011 at 5:38 PM, Mike Harwood wrote: > Hello, > > I am apparently confused about the use of an id parameter for an event > history/survival model, and why the EHA documentation for aftreg does > not specify one.  All assistance and insights are appreciated. Which version of eha are

Re: [R] Simple loop

2011-05-03 Thread Dennis Murphy
Hi: Here are two more candidates, using packages plyr and data.table. Your toy data frame is called dd below. library(plyr) ddply(dd, .(Site, Prof), transform, Hadj = H - min(H)) Site Prof H Hadj 111 248 211 160 311 67 51 412 230 512 56 3

[R] na.omit - Is it working properly?

2011-05-03 Thread Kalicin, Sarah
I have a work around for this, but can someone explain why the first example does not work properly? I believed it worked in the previous version of R, by selecting just the rows=200525 and omitting the na's. I just upgraded to 2.13. I am also concern with the row numbers being different in the

Re: [R] Simple loop

2011-05-03 Thread andrija djurovic
William, you are right. Thanks for clarification. Andrija On Tue, May 3, 2011 at 9:04 PM, William Dunlap wrote: > > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > > -Original Message- > > From: r-help-boun...@r-project.org > > [mailto:r-help-boun...@r-project.org] On B

Re: [R] Simple loop

2011-05-03 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of andrija djurovic > Sent: Tuesday, May 03, 2011 11:28 AM > To: Woida71 > Cc: r-help@r-project.org > Subject: Re: [R] Sim

[R] How do I break a foreach loop?

2011-05-03 Thread Xing Qiu
Hi, I've noticed that the usual "break", "next" commands do not work in a foreach loop, is there a nice way to do that? A little more detail: I am using foreach to conduct a very time consuming (may take several days if done sequentially) simulation study. The number of simulations is set to 100

[R] Loading a FORTRAN DLL

2011-05-03 Thread vioravis
I have a FORTRAN DLL file obtained from Compaq Visual Fortran and when I try to load the DLL into the R environment I get an error. > dyn.load("my_function.dll") "This application has failed to start because MSCVRTD.dll was not found. Re-installing this application may fix the problem." When I

Re: [R] data transformation ----Box-Cox Transformations

2011-05-03 Thread John Fox
Dear Stuart, See ?bcPower and ?powerTransform in the car package, the latter for univariate and multivariate conditional and unconditional ML Box-Cox. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociol

Re: [R] Simple loop

2011-05-03 Thread andrija djurovic
Hi. There is no need to do this in a for loop. Here is one approach: x <- read.table(textConnection("Site Prof H 1 1 24 1 1 16 1 1 67 1 2 23 1 2 56 1 2 45 2 1 67 2 1 46"), header = TRUE) closeAllConnections() x cbind(x,newCo

Re: [R] Simple loop

2011-05-03 Thread Jonathan Daily
It is actually possible and preferable to do this with no loops. Assuming your data is in a dataframe called dat: idx <- with(dat, Site == 1 & Prof == 1) dat <- within(dat, { new = H - ifelse(Site == 1 & Prof == 1, min(H[idx]), min(H[!idx])) }) dat which also serves to illuminate the difference b

Re: [R] Controlling the extent of ablines on plot

2011-05-03 Thread Duncan Murdoch
On 03/05/2011 1:26 PM, Ryan Utz wrote: Well... that could work. Problem is in the actual graphs I'm making, there are to be>30 lines per graph (as many as 60 in some cases). Any way I could use the lines command without having to write out 60 lines of code per figure? That's why I like ablines; y

Re: [R] adaptIntegrate - how to pass additional parameters to the integrand

2011-05-03 Thread Ravi Varadhan
Ok, I get it. require(cubature) f <- function(x, a) cos(2*pi*x*a) # a simple test function # this works a <- 0.2 adaptIntegrate(function(x, argA=a) f(x, a=argA), lower=0, upper=2) # but this doesn't work rm(a) adaptIntegrate(function(x, argA=a) f(x, a=argA), lower=0, upper=2, a=0.2) Ravi. __

Re: [R] Constructing a histogram with words as labels as height as frequency?

2011-05-03 Thread Greg Snow
?barplot -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Caitlin > Sent: Tuesday, May 03, 2011 11:36 AM > To:

Re: [R] Controlling the extent of ablines on plot

2011-05-03 Thread Joshua Wiley
On Tue, May 3, 2011 at 10:40 AM, Joshua Wiley wrote: > The issue is the plotting region is slightly padded.  The easiest > option, I think, would be to clip() it.  I have a general sense that > one of the par() options would let you adjust the padding to 0, but I > could just be imagining that (an

Re: [R] Controlling the extent of ablines on plot

2011-05-03 Thread Joshua Wiley
Hi Ryan, The issue is the plotting region is slightly padded. The easiest option, I think, would be to clip() it. I have a general sense that one of the par() options would let you adjust the padding to 0, but I could just be imagining that (anyone else??). Anyway, here are some options: ### p

Re: [R] data transformation ----Box-Cox Transformations

2011-05-03 Thread Greg Snow
There is the bct function in the TeachingDemos package that does Box-Cox transforms (though you could also write your own fairly simply). The lappy/sapply functions will apply a function to each column of a data frame. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healt

[R] Constructing a histogram with words as labels as height as frequency?

2011-05-03 Thread Caitlin
Hi all. I need to construct a plot showing words on the x-axis and how many times each word was given as a verbal response on the y-axis as solid bar (frequency). Is there a convenient function to do this in R? I considered hist(), but I'm not sure how to construct the text file. Example: apple,

Re: [R] Help converting a data.frame to ordered factors

2011-05-03 Thread Rob Cassidy
Hi again, Now that I have the data.frame as ordered factors, when I try to transpose it, I lose the factor orders. > datfact<-data.frame(c1,c2,c96) > sapply(datfact, class) c1c2c96 [1,] "ordered" "ordered" "ordered" [2,] "factor" "factor" "factor" > > dafacT<-as.data.

Re: [R] RODBC: forcing a special column to be read in as character

2011-05-03 Thread Jack T.
I've had the same problem and ended up using the xlsReadWrite package. It takes more time to import a sheet but does have the colClasses command. Following your example: library(xlsReadWrite) read.xls("testtable", sheet = "sheet1", colClasses="character") should worked, it did for me -- View t

Re: [R] adaptIntegrate - how to pass additional parameters to the integrand

2011-05-03 Thread HC
Dr. Ligges, Thanks a lot for providing syntax for passing additional parameters. It worked for me and has solved my problem. Many thanks for your quick help. HC -- View this message in context: http://r.789695.n4.nabble.com/adaptIntegrate-how-to-pass-additional-parameters-to-the-integrand-tp34

[R] step.gam with a list of data frames

2011-05-03 Thread Kim Vanselow
Dear R-helpers, I used the step.gam function (package gam, Trevor Hastie) on a data frame without problems. Then I created a list of several bootstrap samples from this data frame. Now I want to use the step.gam function on this list using a for-loop. The code is working well until the step.gam

Re: [R] Controlling the extent of ablines on plot

2011-05-03 Thread Greg Snow
Check your par() settings, specifically "xpd". For more control see ?clip. If that does not do enough for you then use lines or segments for complete control. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Mes

[R] Simple loop

2011-05-03 Thread Woida71
Hello everybody, I am beginning with loops and functions and would be glad to have help in the following question: If i have a dataframe like this Site Prof H 1 1 24 1 1 16 1 1 67 1 2 23 1 2 56 1 2 45 2 1 67 2 1 46 An

[R] data transformation ----Box-Cox Transformations

2011-05-03 Thread Stuart
Hi Could any one please help how I can trnasform data based on Box-Cox Transformations. I have massive data set with many variables. If possible someone can write few lines so I can read in all data set once and transform it. g1 g2 g2 97.03703704 89.25925926 4.4 24.9074

Re: [R] Controlling the extent of ablines on plot

2011-05-03 Thread Ryan Utz
Well... that could work. Problem is in the actual graphs I'm making, there are to be >30 lines per graph (as many as 60 in some cases). Any way I could use the lines command without having to write out 60 lines of code per figure? That's why I like ablines; you just have to specify a single value a

Re: [R] loading only parts of RData files?

2011-05-03 Thread Christian Schulz
Hi, g.data is perhaps a interesting package for you. HTH, Christian Dear List members, I would like to load R objects saved as RData file but ran into the problem that these objects are too large for my RAM ('Can not allocate vactor of size XX...'). Switching to a Linux machine is no opti

Re: [R] Controlling the extent of ablines on plot

2011-05-03 Thread Jerome Asselin
On Tue, 2011-05-03 at 10:36 -0600, Ryan Utz wrote: > Hi all, > > I'm attempting to make a quite-specific plot where the axes cross at the > origin and with gridlines for guidance. I've been using ablines to create > the reference lines because I want a lot of control as to where they are > placed

[R] Controlling the extent of ablines on plot

2011-05-03 Thread Ryan Utz
Hi all, I'm attempting to make a quite-specific plot where the axes cross at the origin and with gridlines for guidance. I've been using ablines to create the reference lines because I want a lot of control as to where they are placed on the axis. This command works very well for such control. How

Re: [R] Sum the cell of a vector

2011-05-03 Thread Jonathan Daily
?cumsum On Tue, May 3, 2011 at 11:32 AM, Alaios wrote: > Dear all, > I would like to know what is the most time efficient way to calculate the > following in a huge vector. > > Let's say that I have the vector > > 1,2,3,4,5,6 > and I want to return a vector of the same length which every cell co

Re: [R] Help converting a data.frame to ordered factors

2011-05-03 Thread Rob Cassidy
Thanks, Phil. I could have sworn that I tried that (several times). It works perfectly, of course. Thanks again, Robert -- View this message in context: http://r.789695.n4.nabble.com/Help-converting-a-data-frame-to-ordered-factors-tp3490838p3492705.html Sent from the R help mailing list archive

[R] Sum the cell of a vector

2011-05-03 Thread Alaios
Dear all, I would like to know what is the most time efficient way to calculate the following in a huge vector. Let's say that I have the vector 1,2,3,4,5,6 and I want to return a vector of the same length which every cell containing the sum of the previous cells like this 1, 1+2, 1+2+3, 1+2+3

Re: [R] Bigining with a Program of SVR

2011-05-03 Thread ypriverol
I saw the format of the caret data some days ago. It is possible to convert my csv data with the same data a format as the caret dataset. My idea is to use firstly the same scripts as caret tutorial, then i want to remove problems related with data formats and incompatibilities. Thanks for your t

[R] loading only parts of RData files?

2011-05-03 Thread Jannis
Dear List members, I would like to load R objects saved as RData file but ran into the problem that these objects are too large for my RAM ('Can not allocate vactor of size XX...'). Switching to a Linux machine is no option, neither is raising the memory limit. I am now wondering whether it i

Re: [R] fitting distributions using fitdistr (MASS)

2011-05-03 Thread Ravi Varadhan
Your simulation example is bad. You cannot fit a beta distribution to a data that is not in [0,1], leave alone negative data. x <- runif(1007) fitdistr(x, "beta", start=list(shape1=0.5, shape2=0.5)) But try this instead: x <- runif(100, 1, 27) fitdistr(x, "beta", start=list(shape1=0.5, shap

Re: [R] fitting distributions using fitdistr (MASS)

2011-05-03 Thread Prof Brian Ripley
On Tue, 3 May 2011, Usha wrote: Please guide me through to resolve the error message that I get this is what i have done. x1<- rnorm(100,2,1) x1fitbeta<-fitdistr(x1,"beta") Error in fitdistr(x1, "beta") : 'start' must be a named list You have many errors, starting with not reading the post

Re: [R] Bigining with a Program of SVR

2011-05-03 Thread Max Kuhn
See the examples at the end of: http://cran.r-project.org/web/packages/caret/vignettes/caretTrain.pdf for a QSAR data set for modeling the log blood-brain barrier concentration. SVMs are not used there but, if you use train(), the syntax is very similar. On Tue, May 3, 2011 at 9:38 AM, yprive

Re: [R] Axis trouble

2011-05-03 Thread David Winsemius
On May 3, 2011, at 7:10 AM, David Winsemius wrote: On May 3, 2011, at 6:12 AM, swaraj basu wrote: Hello Everyone, I am having problem in defining specific axis for plotting a vactor. vecAVG <- c(0.2, 0.4, 0.6, 0.2, 0.4) names(vecAVG)<-c("br

Re: [R] Axis trouble

2011-05-03 Thread David Winsemius
On May 3, 2011, at 6:12 AM, swaraj basu wrote: Hello Everyone, I am having problem in defining specific axis for plotting a vactor. vecAVG <- c(0.2, 0.4, 0.6, 0.2, 0.4) names(vecAVG)<-c("brain","heart","kidney","lung","blood")

Re: [R] Bigining with a Program of SVR

2011-05-03 Thread ypriverol
well, first of all thank for your answer. I need some example that works with Support Vector Regression. This is the format of my data: VDP V1V2 9.15 1234.5 10 9.15 2345.6 15 6.7789.0 12 6.7234.6 11 3.2 123.6 5 3.2 235.7 8 VDP is t

Re: [R] Axis trouble

2011-05-03 Thread Breheny, Patrick
The expression 0:g_range[2] is not meaningful. The : operator is for integers, while your data is continuous. Likely, you want something along the lines of axis(2, las=1, at=pretty(vecAVG)) ___ Patrick Breheny Assistant Professor Department of Biostatistics Department of

Re: [R] Problems with Rterm 2.13.0 - but not RGui

2011-05-03 Thread Stefan McKinnon Høj-Edwards
I've changed to the hard path in the PATH environment variable in Windows and it works. If you are talking about the search path in R, I do not have a clue on how to test it. Regards, Stefan -Oprindelig meddelelse- Fra: Jonathan Daily [mailto:biomathjda...@gmail.com] Sendt: 3. maj 2011

[R] Generating summary statistics and simple statistical analysis from my data-set: how can I automate the analysis?

2011-05-03 Thread dereksloan
I am fairly new to R and have a (for me) slightly complicated set of data to analyse. It contains several continuous and categorical variables for a group of individuals – e.g; ID Sex Age Familysize Phone Education 1 M 23 3 Yes Primary

[R] delete excel id automatically generated

2011-05-03 Thread agent dunham
Dear community, I uploaded an excel with read.xls. My xls file actually have a column which is an id, ("plot" is the id) : plot height area 347.6 5.4 853.2 4.1 895.4 8.4 121 6.76.2 ... 1325 2.11.5 However R uses another id, this way: r id plot height are

Re: [R] problem with Sweave and pdflatex

2011-05-03 Thread Frank Lehmann
I set the path with no spaces and run as administrator, but the problem is not fixed. I'm not quite shure, but I can't remember the problem bevore R version 2.13. Could it be, that the new R version causes that problem? Frank Lehmann -Ursprüngliche Nachricht- Von: Uwe Ligges [mailto:lig..

[R] Watts Strogatz game

2011-05-03 Thread kparamas
Hi, I have a erdos-renyi game with 6000 nodes and probability 0.003. g1 = erdos.renyi.game(6000, 0.003) How to create a Watts Strogatz game with the same probability. g1 = watts.strogatz.game(1, 6000, ?, ?) What should be the third and fourth parameter to this argument. -- View this message i

Re: [R] install rdcomclient source

2011-05-03 Thread Uwe Ligges
On 03.05.2011 15:05, Richard Wang wrote: Thanks. I didn't know that. I just found it in Brian Ripley's page. Is this the cran extras? Right, and under Windows it is a default repository. Uwe Ligges Thanks Richard On 3 May 2011, at 13:19, Uwe Ligges wrote: On 03.05.2011 14:09,

Re: [R] Categorical bubble plot

2011-05-03 Thread Jurgens de Bruin
So I have been playing with bubble plot and I was able to create bubble plot with relatively simple data. I am no having problems when I increase the complexity of my data. Below is a example of my data: phytochemicalMainClassFitValues Name A 0.5

Re: [R] Lasso with Categorical Variables

2011-05-03 Thread Clemontina Alexander
Thanks for all your help and I apologize for not being clear in the beginning. I will try the "group lasso" packages. From the paper, it seems like that is what I want to do. Thanks again! On Tue, May 3, 2011 at 2:40 AM, Nick Sabbe wrote: > For performance reasons, I advise on using the followi

[R] How to fit a random data into Beta distribution?

2011-05-03 Thread Shekhar
Hi, I have some random data and i want to find out the parameters of Beta distribution ( a and b) such that this data approximately fits into this distribution. I have tried by plot the histograms and graph, but it requires lot of tuning and i am unable to do that. can anyone tell me how to do it p

[R] fitting distributions using fitdistr (MASS)

2011-05-03 Thread Usha
Please guide me through to resolve the error message that I get this is what i have done. >x1<- rnorm(100,2,1) >x1fitbeta<-fitdistr(x1,"beta") Error in fitdistr(x1, "beta") : 'start' must be a named list Yes, I do understand that sometime for the distribution to converge to the given set of data

[R] Axis trouble

2011-05-03 Thread swaraj basu
Hello Everyone, I am having problem in defining specific axis for plotting a vactor. vecAVG <- c(0.2, 0.4, 0.6, 0.2, 0.4) names(vecAVG)<-c("brain","heart","kidney","lung","blood") par(mar=c(12,4.1,4.1, 2.1)) plot(sort(

Re: [R] removing columns

2011-05-03 Thread David Winsemius
On May 3, 2011, at 4:24 AM, Uwe Ligges wrote: On 03.05.2011 13:16, nuncio m wrote: Hi list, I have a matrix with all elements of some columns are zeroes. Is it possible to remove these columns: Xnew <- X[ , as.logical(colSums(X)), drop=FALSE] A counter-example: X <- matrix(c(1,1,1,-1

Re: [R] Rodbc quesion: how to reliably determine the data type?

2011-05-03 Thread David Winsemius
On May 3, 2011, at 2:10 AM, Albert-Jan Roskam wrote: Hi Jeff, Ah, thanks a lot! Yes, meanwhile I also switched to csv. This still requires knowledge about the regional settings (Sys.getlocale), but it's a lot more transparent. I'm quite new to R and I must say that stuff like this is ea

Re: [R] Categorical bubble plot

2011-05-03 Thread Ben Bolker
On 11-05-03 09:23 AM, Jurgens de Bruin wrote: > So I have been playing with bubble plot and I was able to create bubble > plot with relatively simple data. I am no having problems when I > increase the complexity of my data. Below is a example of my data: > > phytochemicalMainClassFitValue

Re: [R] install rdcomclient source

2011-05-03 Thread Richard Wang
Thanks. I didn't know that. I just found it in Brian Ripley's page. Is this the cran extras? Thanks Richard On 3 May 2011, at 13:19, Uwe Ligges wrote: > > > On 03.05.2011 14:09, Richard Wang wrote: >> Thanks. One more question. If I use install.packsges, do I need to install >> Rtool

Re: [R] latex, eps graphics and transparent colors / sam2p

2011-05-03 Thread Michael Friendly
On 04/13/2011 05:06 PM, Ben Bolker wrote: > Thomas Lumley uw.edu> writes: > >> >> On Thu, Apr 14, 2011 at 5:30 AM, >> Michael Friendly yorku.ca> wrote: >>> I have a diagram to be included in latex, where all my figures are .eps >>> graphics (so pdflatex is not an option) >> >> You could use

Re: [R] install rdcomclient source

2011-05-03 Thread Uwe Ligges
On 03.05.2011 14:09, Richard Wang wrote: Thanks. One more question. If I use install.packsges, do I need to install Rtool or utils package is sufficient? It depends on how demanding the package is. For the one you mentioned, you will need the Rtools, since C/C++ sources are to be compiled

Re: [R] install rdcomclient source

2011-05-03 Thread Richard Wang
Thanks. One more question. If I use install.packsges, do I need to install Rtool or utils package is sufficient? Thanks, Richard On 3 May 2011, at 12:26, Uwe Ligges wrote: > > > On 02.05.2011 23:48, Richard Wang wrote: >> Hi, >> >> I'd like to ask a installation question. I want to insta

Re: [R] Problems with Rterm 2.13.0 - but not RGui

2011-05-03 Thread Søren Højsgaard
A safe way out of this mess is to install R somewhere else. For example, create a directory c:\Programs and install R there. Regards Søren -Oprindelig meddelelse- Fra: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] På vegne af Jonathan Daily Sendt: 3. maj 2011 13:

Re: [R] Problems with Rterm 2.13.0 - but not RGui

2011-05-03 Thread Jonathan Daily
Ah ok. I suppose the fix is to get the hard path (C:/Program Files/...) on the search path and remove the symlink from the search path. Does that work? 2011/5/3 Stefan McKinnon Høj-Edwards : > Yes, the message is pretty clear, but it has nothing to do with running as > admin. > I have just tried

Re: [R] install rdcomclient source

2011-05-03 Thread Uwe Ligges
On 02.05.2011 23:48, Richard Wang wrote: Hi, I'd like to ask a installation question. I want to install a source code through the following command, R CMD INSTALL RDCOMClient This is intended to be used in the shell of your OS (assuming Windows given the package), not in R. From within

  1   2   >