Re: [R] (no subject)

2011-06-20 Thread Ethan Brown
300,                                # image resolution (dpi) > > #         units="in", width=8.3, height=5.8,      # image dimensions > > (inches) > > #         compression="none"                      # image compression > > #                                                 #  (

Re: [R] (no subject)

2011-06-20 Thread Ethan Brown
Hi Ungku, it's really difficult for us to take a huge block of code and understand where an error happened. There's several things that can help us help you: 1) First and foremost, what is the error message or undesired behavior you're experiencing? 2) Second, please pare down the code to the plac

Re: [R] (no subject)

2011-06-19 Thread Bhoom Suktitipat
Hi Jim, Just want to make sure that I understand correctly.What do you mean by SNP = Single Nucleotide Polymorphism? Bhoom On Sun, Jun 19, 2011 at 5:57 PM, Jim Silverton wrote: > Hello, Does anyone has software to simulate SNP data? Specifically I would > like any package that produces 2 x 3 S

Re: [R] (no subject)

2011-06-19 Thread Jim Silverton
Hello, Does anyone has software to simulate SNP data? Specifically I would like any package that produces 2 x 3 SNP data. -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] (no subject)

2011-06-02 Thread Johannes Huesing
Ungku Akashah [Thu, Jun 02, 2011 at 10:31:53AM CEST]: > Error in lda.default(x, grouping, ...) : > variables 1 3 5 8 10 15 17 20 27 29 34 appear to be constant within > groups Please do read the posting guide before posing a question here. The message would have benefitted from a title. M

Re: [R] (no subject)

2011-05-21 Thread Bert Gunter
Amen to David's comments (I'm sorry to say ...) In addition: Learn to use the Help system. ?help (at the command line) and "An Introduction to R" manual provide info. To answer your question: library(lattice) ?strip.default -- Bert On Sat, May 21, 2011 at 1:27 PM, David Winsemius wrote: > > O

Re: [R] (no subject)

2011-05-21 Thread David Winsemius
On May 21, 2011, at 3:15 PM, Ramnath R wrote: What does *strip=function *and *strip.default *means for eg: *strip=function(bg='white', ... ) strip.default(bg='white', ...) I am guessing from my experience that you are working on a plotting problem and trying to understand some lat

Re: [R] (no subject)

2011-05-14 Thread John Kane
--- On Sat, 5/14/11, Ramnath R wrote: > From: Ramnath R > Subject: [R] (no subject) > To: r-help@r-project.org > Received: Saturday, May 14, 2011, 9:45 AM > Can any one help me where i can find > small standalone R programs that do > things like > scatterplot, mean/median, kernel density estim

Re: [R] (no subject)

2011-05-12 Thread Ista Zahn
Hi Fabian, You my find my discussion of "types" of SS helpful. My website has been down for some time, but you can retrieve it from http://psychology.okstate.edu/faculty/jgrice/psyc5314/SS_types.pdf among other places. Best, Ista On Thu, May 12, 2011 at 10:33 AM, Fabian wrote: > #subject: type I

Re: [R] (no subject)

2011-05-07 Thread Dennis Murphy
Hi: To quote one of the sages of this list: 'Loops? We don't need no steenking loops!!'. Here's one way to do what you were asking with a two-pass approach. Generate some random data, use the sample() function to get 20 indices which are then used to generate NAs in the original vector. Then repl

Re: [R] (no subject)

2011-04-18 Thread Hadley Wickham
Yes, it's fixed and a new version of plyr has been pushed up to cran - hopefully will be available for download soon. In the meantime, I think you can fix it by running library(stats) before library(ggplot2). Hadley On Sun, Apr 17, 2011 at 3:51 PM, Bryan Hanson wrote: > Is there any news on thi

Re: [R] (no subject)

2011-04-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.04.2011 14:32:11: > Hai, > > Where can i get the dataset votes.repub > Ram Use your favourite browser, put R votes.repub in its search facilities and you shall be lucky enough to get it from first several hits. If you have installed R you can star

Re: [R] (no subject)

2011-04-18 Thread Uwe Ligges
This is a bug in the very recent version of the plyr package. Its maintainer has been notified and promised an update. Uwe Ligges On 17.04.2011 22:51, Bryan Hanson wrote: Is there any news on this issue? I have the same problem but on a Mac. I have upgraded R and updated the built packages.

Re: [R] (no subject)

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 8:58 AM, Ramnath R wrote: Hai, Where can i get the dataset votes.repub Time for you to do your own searching. -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] (no subject)

2011-04-18 Thread Ramnath R
Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Ram On Mon, Apr 18, 2011 at 6:02 PM, Ramnath R wrote: > Hai, > > Where can i get the dataset votes.repub > Ram > > > > On Mon, Apr 18, 2011 at 4:11 PM, Ram

Re: [R] (no subject)

2011-04-18 Thread Ramnath R
Hai, Where can i get the dataset votes.repub Ram On Mon, Apr 18, 2011 at 4:11 PM, Ramnath R wrote: > Hai > > From which CRAN mirror can get the package ‘LPP2005REC’ > > Ram > [[alternative HTML version deleted]] __ R-help@r-project.org mai

Re: [R] (no subject)

2011-04-18 Thread Alexander Engelhardt
Am 18.04.2011 14:58, schrieb Ramnath R: Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Ram Hi, if you have the package installed, go > ?iris to find out which package it belongs to. If not, just googl

Re: [R] (no subject)

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 8:58 AM, Ramnath R wrote: Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present ?data -- David Winsemius, MD West Hartford, CT __ R-help@

Re: [R] (no subject)

2011-04-18 Thread Uwe Ligges
On 18.04.2011 14:58, Ramnath R wrote: Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Type ?iris Uwe Ligges Ram [[alternative HTML version deleted]] _

Re: [R] (no subject)

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 6:41 AM, Ramnath R wrote: Hai From which CRAN mirror can get the package ‘LPP2005REC’ What makes you think any CRAN mirror should have such package? -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing lis

Re: [R] (no subject)

2011-04-18 Thread Philipp Pagel
On Mon, Apr 18, 2011 at 04:11:57PM +0530, Ramnath R wrote: > Hai > > From which CRAN mirror can get the package ?LPP2005REC? As the first hit of a google search for "LPP2005REC" told me it is not a package but a dataset in package timeSeries. cu Philipp -- Dr. Philipp Pagel Lehrstuhl

Re: [R] (no subject)

2011-04-17 Thread Bryan Hanson
Is there any news on this issue? I have the same problem but on a Mac. I have upgraded R and updated the built packages. The console output and sessionInfo are below. The problem is triggered by library(ggplot2) my .Rprofile If I do library(ggplot2) after the aborted start up ggplot2 is loaded

Re: [R] (no subject)

2011-04-16 Thread Steve Lianoglou
Out of curiosity, do you have a problem calling `library(ggplot2)` from the R prompt (after R is finished "spinning up")? I vaguely recall (~ 2 years ago) that I was trying to load some packages in my ~/.Rprofile since I thought I always wanted them in R anyway and had problems ... I've given up t

Re: [R] (no subject)

2011-03-29 Thread Uwe Ligges
On 29.03.2011 11:31, Meytar Sorek-Hamer wrote: Hellp I posted a message but didn't get any reply How can I send it again please? > Thank you Meytar __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] (no subject)

2011-03-29 Thread Meytar Sorek-Hamer
Hellp I posted a message but didn't get any reply How can I send it again please? Thank you Meytar __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.h

Re: [R] (no subject)

2011-03-20 Thread Jeff Newmiller
1) If you think McAfee is interfering, then you should look toward your support options for that software to help you remove the setting that relates to R or rcom. You may be able to test your theory by disabling that software temporarily. 2) If R is working at the console, and RGui is working,

Re: [R] (no subject)

2011-03-15 Thread rex.dwyer
day, March 15, 2011 10:09 AM To: Jonathan P Daily Cc: r-help@r-project.org Subject: Re: [R] (no subject) ?strsplit x <- "ThisIsaString" y<- strsplit(x,"") This gives a list, which you can convert to a vector by unlist(y) Incidentally, you could have found out about s

Re: [R] (no subject)

2011-03-15 Thread Bert Gunter
?strsplit x <- "ThisIsaString" y<- strsplit(x,"") This gives a list, which you can convert to a vector by unlist(y) Incidentally, you could have found out about strsplit via R's help.search("character string") (or similar) or even googling "R string function" . Please use R's native Help capabil

Re: [R] (no subject)

2011-03-14 Thread David Winsemius
On Mar 14, 2011, at 12:25 PM, Andreas Emanuelsson wrote: Hi everyone, I have problems with a double for loop and the program response: "Error in 1:mass[j] : NA/NaN argument" I'm trying to create a very simple script to generate a vector full of objects with the value [fuel] and in the amou

Re: [R] (no subject)

2011-03-14 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Andreas Emanuelsson > Sent: Monday, March 14, 2011 9:25 AM > To: r-help@r-project.org > Subject: [R] (no subject) > > Hi everyone, I have problems with a double for loop and the p

Re: [R] (no subject)

2011-03-11 Thread Joshua Wiley
Just as a note, if you are going to convert a factor to numeric, the preferred idiom is: ## hypothetical numeric factor x <- factor(paste(10:15)) ## preferred method for conversion as.numeric(levels(x))[x] Cheers, Josh __ R-help@r-project.org mailing

Re: [R] (no subject)

2011-03-11 Thread Ista Zahn
Hi Andreas, if your factor is named "x", you can do as.numeric(as.character(x)) Best, Ista On Fri, Mar 11, 2011 at 10:45 AM, Andreas Emanuelsson wrote: > Hi, I have tried to load a file originally from Excel, via csv, text and > clipboard today. > > When I succeed I cannot change the format from

Re: [R] (no subject)

2011-03-11 Thread Joshua Wiley
Hi Andreas, Assuming you are using read.table(), try setting the argument: stringsAsFactors = FALSE Also consider what about the Excel file is making R default to a factor rather than numerical? There may be a nonstandard reprsentation of missing data (e.g., "."), which could also be specified t

Re: [R] (no subject)

2011-03-11 Thread jim holtman
If you are using 'read.csv', add the parameteras.is=TRUE to prevent conversion to factors. If you have factors that are supposed to be numeric, use the following df$mydata <- as.numeric(as.character(df$mydata)) On Fri, Mar 11, 2011 at 10:45 AM, Andreas Emanuelsson wrote: > Hi, I have trie

Re: [R] (no subject)

2011-02-21 Thread Jim Lemon
On 02/22/2011 03:31 AM, Schmidt, Lindsey C (MU-Student) wrote: What is plot.new? and how can i get it to work so i can load other data? Hi Lindsey, It looks to me as though spelling mistakes in your code are causing failures to generate some of the objects that you then pass to "plot". The pl

Re: [R] (no subject)

2011-02-21 Thread Phil Spector
Please start R and enter the following commands: library(splancs) area = 6*4 lambda = 1.5 N = rpois(1,lambda*area) u = runif(N,-2,4) v = runif(N,0,4) h = chull(u,v) h = c(h,h[1]) plot(u[h],v[h],"l",asp=1) points(u,v) If you do not get the plot you're expecting, then repost 1) adding an informa

Re: [R] (no subject)

2011-02-21 Thread K. Elo
Hi! 21.02.2011 08:50, Schmidt, Lindsey C (MU-Student) wrote: > What is plot.new? How can I fix this data or add plot.new so it works? ?plot.new ?plot plot(u[h],v[h],type="l",asp=1) seems to work for me... HTH, Kimmo __ R-help@r-project.org mailing li

Re: [R] (no subject)

2011-02-14 Thread Jannis
First of all I would advice you to use meaningful subjects when posting to the list. My second point is only a vague guess, but if you use the exact code that you posted there may be bracket missing(its the closing bracket of the jpg() call ). May this produce your error? Third, you shou

Re: [R] (no subject)

2011-02-01 Thread Dennis Murphy
Hi: Here are three more 'solutions' using packages doBy, plyr and data.table. ### For illustration: maxima for all mouce/GPR* conditions (1) doBy: library(doBy) dfsub <- subsetBy( ~ 1, subset = condition != 'con', data = df) summaryBy(responce ~ mouce + condition, data = dfsub, FUN = max) mou

Re: [R] (no subject)

2011-02-01 Thread Ista Zahn
max(dat[dat$condition=="GPR119a", "responce"]) aggregate(dat$responce, by=list(dat$condition), max) see ?"[" and ?aggregate -Ista On Tue, Feb 1, 2011 at 2:05 PM, A. Ramzan wrote: > Hello > > I am trying to find a way to find the max value, for only a subset of a > dataframe, depending on how th

Re: [R] (no subject)

2011-02-01 Thread Dario Strbenac
If your data frame is called myDF, max(myDF[myDF[, condition] == "GPR119a", "responce"]) Original message >Date: 01 Feb 2011 19:05:46 + >From: r-help-boun...@r-project.org (on behalf of "A. Ramzan" ) >Subject: [R] (no subject) >To: r-help@r-project.org > >Hello > >I am trying to f

Re: [R] (no subject)

2011-02-01 Thread Den
max(subset(dataName, condition=="GPR119a")$responce) У Аўт, 01/02/2011 у 19:05 +, A. Ramzan піша: > Hello > > I am trying to find a way to find the max value, for only a subset of a > dataframe, depending on how the data is grouped for example, > > How would I find the maxmium responce, for

Re: [R] (no subject)

2011-02-01 Thread Erik Iverson
?tapply would be one way to get the max for all conditions at once. Your example is not reproducible, so I cannot give you a reproducible answer, but adapt the following: tapply(df$responce, df$condition, max) A. Ramzan wrote: Hello I am trying to find a way to find the max value, for only

Re: [R] (no subject)

2011-01-28 Thread Siri Bjoner
This looks like homework. We don't do homework. Certainly not when you obviously haven't a) read the posting guide, b) asked your professor/tutor, c) googled to see if you find something online, d) at least made an effort to try, and e) read the posting guide. Do all the points above and th

Re: [R] (no subject)

2010-12-11 Thread Dennis Murphy
Hi: Here's a plyr solution: library(plyr) dg <- data.frame(x1 = rep(1:2, c(10, 15)), x2 = 1:25) f <- function(x) head(rev(sort(x)), 5) > ddply(dg, 'x1', summarise, x2 = f(x2)) x1 x2 1 1 10 2 1 9 3 1 8 4 1 7 5 1 6 6 2 25 7 2 24 8 2 23 9 2 22 10 2 21 HTH, Dennis On Fri,

Re: [R] (no subject)

2010-12-10 Thread David L Lorenz
Andrija, You should be able to extract the data that you want using a call like this (AD substituted for your c) with(AD, tapply(X2, X1, function(x) sort(x, dec=T)[1:5])) That returns a list like this: $`1` [1] 10 9 8 7 6 $`2` [1] 25 24 23 22 21 Just package it the way that you want. Da

Re: [R] (no subject)

2010-12-10 Thread jim holtman
try this: > do.call(rbind, lapply(split(x, x$X1), function(.grp){ + .ord <- .grp[order(.grp$X2, decreasing = TRUE),] + .ord[seq(min(5, nrow(.grp))),] + })) X1 X2 1.10 1 10 1.9 1 9 1.8 1 8 1.7 1 7 1.6 1 6 2.25 2 25 2.24 2 24 2.23 2 23 2.22 2 22 2.21 2 21 On Fri, Dec

Re: [R] (no subject)

2010-11-20 Thread Michael Bedward
On 20 November 2010 20:57, Stephen Liu wrote: > Hi Michael, > > Thanks for your advice. > > data() only displays a list of files.  Is there an easy to show the brief > summary of files rather than calling each file. What sort of summary do you want ? The data() command should display names and a

Re: [R] (no subject)

2010-11-20 Thread Stephen Liu
: Michael Bedward To: Stephen Liu Cc: r-help@r-project.org Sent: Sat, November 20, 2010 5:46:35 PM Subject: Re: [R] (no subject) Type data() to list the numerous example data sets included with the standard R distribution. Michael On 20 November 2010 20:42, Stephen Liu wrote: > Hi fo

Re: [R] (no subject)

2010-11-20 Thread Michael Bedward
Type data() to list the numerous example data sets included with the standard R distribution. Michael On 20 November 2010 20:42, Stephen Liu wrote: > Hi folks, > > Please advise where can I down free data files for learning R?  Google search > brought me many, not easy for to screen.  TIA > > B.

Re: [R] (no subject)

2010-11-13 Thread Uwe Ligges
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html Uwe Ligges On 13.11.2010 17:18, sundar wrote: Gud evening sir ,I want do the cluster analysis algorithm in r software can u guide me sir My mail id is :sundars...@gmail.com And I want the brief explanation to fo

Re: [R] (no subject)

2010-11-05 Thread Michael Bedward
Hello, One approach would be to fit your distribution using MCMC with, for example, the rjags package. Then you can use the "zeroes trick" or "ones trick" to implement your new distribution as described here... http://mathstat.helsinki.fi/openbugs/data/Docu/Tricks.html You will find a summary of

Re: [R] (no subject)

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 2:20 PM, Czerminski, Ryszard wrote: I would appreciate any advice about how to add rectangular grid to the plot generated by levelplot() similarly as grid() function adds grid to the regular plot() ?panel.grid Best regards, Ryszard -- David Winsemius, MD West Hartford

Re: [R] (no subject)

2010-10-26 Thread Gavin Simpson
On Fri, 2010-10-22 at 05:54 -0700, Penny Adversario wrote: > I am doing cluster analysis on 8768 respondents on 5 lifestyle > variables and am having difficulty constructing a dissimilarity matrix > which I will use for PAM. I always get an error: “cannot allocate > vector of size 293.3 Mb” even

Re: [R] (no subject)

2010-10-26 Thread Gabor Grothendieck
On Tue, Oct 26, 2010 at 10:27 AM, David Winsemius wrote: > > On Oct 25, 2010, at 11:17 PM, Arsalan Fathi wrote: > >> hello. >> how are you? >> my name is arsalan. I'm from iran. >> i want to write the program that done random walk(one variable and two >> variable). >> please help me. > > You shoul

Re: [R] (no subject)

2010-10-26 Thread David Winsemius
On Oct 25, 2010, at 11:17 PM, Arsalan Fathi wrote: hello. how are you? my name is arsalan. I'm from iran. i want to write the program that done random walk(one variable and two variable). please help me. You should learn to use a search engine that is specific to R. Here's an example: htt

Re: [R] (no subject)

2010-10-22 Thread Tal Galili
Hi Penny, Could you provide the code you are using? (also, using a subject to the e-mail, would have been nice :) ) Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] (no subject)

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 5:03 AM, Gouveia, Ana wrote: Does anyone know the why for this error when doing a logistic regression with binomial family? Thank you Kind regards ana Error in family$linkfun(mustart) : Value -1717986918 out of range (0, 1) in attachment is my data set and the comands I

Re: [R] (no subject)

2010-10-14 Thread Michael Bedward
Hello Julia, I'm afraid your code had multiple problems: variables declared but not used, incorrect or unnecessary use of the "c" function, out-of-bounds subscripts and overwriting of result objects. Rather than point them all out in detail I've modified your code so that it works (see below). Pl

Re: [R] (no subject)

2010-10-12 Thread Greg Snow
This looks like homework and there are enough teachers on this list that we frown on doing others homework for them (sometimes help if it is clear what help is allowed by the teacher). Some hints to get you started: You should read the document "An Introduction to R" that comes with every R in

Re: [R] (no subject)

2010-10-11 Thread jim holtman
use 'axis' with 'at=' and 'labels=' to put your own labels on the axis. Have to guess at your data since you did not provide a reproducible example: x <- seq(as.POSIXct('2010-10-11 00:00'), as.POSIXct('2010-10-12 00:00'), length = 20) plot(x, x, type = 'o', yaxt = 'n') axis.POSIXct(2, at = seq(as

Re: [R] (no subject)

2010-10-11 Thread David Winsemius
Two things I see. First is that par needs to be called _before_ the plot (although its effects will persist if you need to keep hacking away) and the second is that yaxp is expecting numeric arguments (which you are offering) but in your case these will need to be the numeric values in a

Re: [R] (no subject)

2010-09-25 Thread Tal Galili
Did you look at: ?curve Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---

Re: [R] (no subject)

2010-09-10 Thread Jim Lemon
On 09/10/2010 07:38 PM, Tanvir Khan wrote: Hello, I'm trying to do bar plot where 'sex' will be the category axis and 'occupation' will represent the bars and the clusters will represent the mean 'income'. sex occupation income 1 female j 12 2male b

Re: [R] (no subject)

2010-09-10 Thread ONKELINX, Thierry
Have a look at the ggplot2 package install.packages("ggplot2") library(ggplot2) ggplot(data, aes(x = sex, y = income, fill = occupation)) + geom_bar(position = "dodge") Have a look at http://had.co.nz/ggplot2/ for more information and examples. HTH, Thierry --

Re: [R] (no subject)

2010-08-25 Thread Sarah Goslee
Hello, http://www.rseek.org is extremely useful if you know what you want to do but not how to do it. Going there and putting "quantile regression with multilevel data" into the search box returns many references to functions and packages that may be of use. This list can't do much more for you w

Re: [R] (no subject)

2010-08-19 Thread Ben Bolker
Kalaivani Mani yahoo.co.in> writes: > To >   > R group > Help Desk (We're not the "help desk" (!!) You can buy support from various companies if you want ...)   > I am a user of R software.  I am facing a problem while using > "frailtyPenal" command in R.2.11.1. When I use > these command,

Re: [R] (no subject)

2010-08-09 Thread Ivan Calandra
Hi Hannah, First, don't forget to add a subject to your email! Second, the best way to share data is to copy/paste the output from the dput() function into the email. I have never used pvclust, but the error tells you that your object "cluster" is not a matrix. What does str(cluster) return?

Re: [R] (no subject)

2010-07-30 Thread Gray Calhoun
On Fri, Jul 30, 2010 at 4:59 AM, Daniel Nordlund wrote: > You haven't provided a reproducible example, so I am going to guess at some > of what you are doing.  You also have used some function names for your > variable names which I like to avoid, so I have used 'b' as the name of the > vector

Re: [R] (no subject)

2010-07-30 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Natasa Tzortzaki > Sent: Friday, July 30, 2010 1:19 AM > To: r-help@r-project.org > Subject: [R] (no subject) > > > hello, > > i am new to R and trying to calculate the beta coe

Re: [R] (no subject)

2010-07-30 Thread Dennis Murphy
Hi: Avoiding loops in R by using vectorization is usually one of the best ways to improve performance. Since we can't replicate your data (e.g., tslength is not given), instead I'll generate a couple of functions to extract the estimated beta from randomly generated data. The replicate() function

Re: [R] (no subject)

2010-07-24 Thread Paul Smith
2010/7/23 w 霍 : > I use the constrOptim to maximize a function with four constriants but the > answer does not leave from the starting value and there is only one outer > iteration. The function is defined as follows: > tm<-function(p){ > p1<-p[1]; p2<-p[2]; p3<-p[3]; > p4<-1-p1-p2-p3; > p1*p2*p3

Re: [R] (no subject)

2010-07-11 Thread RICHARD M. HEIBERGER
You need three more lines of code abline(h=0) xx <- seq(1.96, 4, length=25) polygon(x=c(xx[1],xx,xx[25]), y=c(0,dnorm(xx),0), col='red') Please see the normal.and.t.dist function in the HH package for more detailed control of the graph. ## install.packages("HH") ## if you don't have it yet

Re: [R] (no subject)

2010-07-11 Thread Charles C. Berry
On Sun, 11 Jul 2010, li li wrote: Hi all, I want to add the red color under the standard normal curve to the right of 1.96. Can anyone give me a hand? Please see the code below. Thank you. x <- seq(-4, 4, length=100) hx <- dnorm(x) par(pty="s") plot(x, hx, type="l", xlab="z value", ylab="

Re: [R] (no subject)

2010-06-25 Thread Berend Hasselman
You posted the exact same question several days ago (June 17) under a different name. You got two perfectly good and adequate answers. /Berend -- View this message in context: http://r.789695.n4.nabble.com/no-subject-tp2268375p2268685.html Sent from the R help mailing list archive at Nabble.co

Re: [R] (no subject)

2010-06-25 Thread Allan Engelhardt
Maybe something like: y <- readLines("foo") z <- strsplit(y, ",") cols <- sort(unique(unlist(z))) # Assuming this is what you want for column names m <- matrix(0, nrow=length(z), ncol=length(cols), dimnames=list(as.character(1:length(z)), cols)) for (i in 1:length(z)) { m[i, z[[i]]]

Re: [R] (no subject)

2010-06-05 Thread Joris Meys
OK, as you're new: 1) this is a list about R, not about statistics. 2) it looks awkwardly much like a homework assignment. People tend to be not really keen on solving those ones. 3) READ THE POSTING GUIDELINES. Seriously, read them. http://www.R-project.org/posting-guide.html As a tip : go throu

Re: [R] (no subject)

2010-06-03 Thread John Kane
It looks like superpose.eb is someone's function and not in a package. https://stat.ethz.ch/pipermail/r-help/2002-November/027299.html --- On Thu, 6/3/10, Rosario Garcia Gil wrote: > From: Rosario Garcia Gil > Subject: [R] (no subject) > To: "r-help@r-project.org" > Received: Thursday, June 3

Re: [R] (no subject)

2010-06-03 Thread Jorge Ivan Velez
Hi Rosario, It saying that because you could have not loaded that function in your R session. It availbale at [1]. Go there, copy and paste it in your session. You should be ready to go after doing this. HTH, Jorge [1] http://egret.psychol.cam.ac.uk/statistics/R/graphs1.html On Thu, Jun 3, 201

Re: [R] (no subject)

2010-06-03 Thread Sarah Goslee
I don't have any idea where you came up with superpose.ep - rseek.org doesn't return any results for a function of that name. If you check the package information for gplots you'll see that plotCI() is available to plot error bars. There's also the errbar() function from hmisc, and probably sever

Re: [R] (no subject)

2010-05-26 Thread Henrique Dallazuanna
ditional test in a function to indicate that > there is something wrong if one of the u$POSITION is different from zero. > > > > > From: Henrique Dallazuanna [mailto:www...@gmail.com] > Sent: Wednesday, May 26, 2010 2:41 PM > To: arnaud Gaboury > Cc: r-help@r-project.org >

Re: [R] (no subject)

2010-05-26 Thread Joris Meys
What exactly are you trying to do? If you want to know which position is wrong, try : if (sum(u$POSITION==0)>0) cat("WARNING:POSITION IS WRONG FOR ",which(u$POSITION==0),"\n") or even : wrong <- which(u$POSITION==0) if(length(wrong)>0) cat("WARNING: POSITION IS WRONG FOR",u$DESCRIPTION[wrong],"\n

Re: [R] (no subject)

2010-05-26 Thread Henrique Dallazuanna
Try this: ifelse(!u$POSITION, 'Positions are wrong', '') On Wed, May 26, 2010 at 9:31 AM, arnaud Gaboury wrote: > Dear group, > > Here is my data frame: > > > dput(u) > structure(list(DESCRIPTION = structure(c(2L, 5L, 6L, 7L, 9L, > 11L, 12L, 15L, 14L, 16L, 1L, 10L, 3L, 4L, 13L, 8L, 17L), .Label

Re: [R] (no subject)

2010-05-18 Thread David Winsemius
e to send, so you can try the commands. Thanks a lot for your help! Arantzazu Blanco Bernardeau Dpto de Química Agrícola, Geología y Edafología Universidad de Murcia-Campus de Espinardo Date: Tue, 18 May 2010 11:54:20 -0400 Subject: Re: [R] (no

Re: [R] (no subject)

2010-05-18 Thread Peter Ehlers
Arantzazu, Your problem is that the data were probably imported from Excel where you had at least one cell containing "#N/A". You need to replace those cases in your dataframe with NA. Then you should be able to do as.numeric(as.character(arcilla)). -Peter Ehlers On 2010-05-18 10:07, Arantzazu

Re: [R] (no subject)

2010-05-18 Thread Steve Lianoglou
One last thing: before you take my advice on how to recode your nominal/categorical "clay" variable for your regression model, take some time to see how other people talk about this and do some searching on phrases like "regression model with nominal variables" (that's just the one I used). You'l

Re: [R] (no subject)

2010-05-18 Thread Arantzazu Blanco Bernardeau
> Date: Tue, 18 May 2010 11:54:20 -0400 > Subject: Re: [R] (no subject) > From: mailinglist.honey...@gmail.com > To: aramu...@hotmail.com > CC: r-help@r-project.org > > Hi, > > Sorry, I'm not really getting what going on here ... perhaps having > more domain knowled

Re: [R] (no subject)

2010-05-18 Thread Steve Lianoglou
Hi, Sorry, I'm not really getting what going on here ... perhaps having more domain knowledge would help me make better sense of our question. In particular: On Tue, May 18, 2010 at 11:35 AM, Arantzazu Blanco Bernardeau wrote: > > Hello > I have a data array with soil variables (caperf), in whi

Re: [R] (no subject)

2010-04-13 Thread Steve Lianoglou
Hi, On Tue, Apr 13, 2010 at 11:35 AM, Danai Katsande wrote: > I am trying to plot a smoothing spline to using the following code, and an > error pops up: > >> car <- read.table("car.csv",sep=",",header=T) >> attach(car) >> names(car) >  [1] "veh_value" "exposure"  "clm"       "numclaims" "claimcs

Re: [R] (no subject)

2010-04-13 Thread Danai Katsande
I am trying to plot a smoothing spline to using the following code, and an error pops up: > car <- read.table("car.csv",sep=",",header=T) > attach(car) > names(car) [1] "veh_value" "exposure" "clm" "numclaims" "claimcst0" "veh_body" [7] "veh_age" "gender""area" "agecat""X_O

Re: [R] (no subject)

2010-03-31 Thread Jim Lemon
On 03/31/2010 03:15 PM, Roslina Zakaria wrote: Hi r-users, I would like to display my legend with fill box and line symbol. The first color will be in the box and the second colour will just be a line. legend("topright", c("observed","gamma sum fit"), col= c("greenyellow","red"),pch=c(

Re: [R] (no subject)

2010-03-13 Thread michael watson (IAH-C)
Use the GDD library From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Jillian E Kozyra [jill...@gmail.com] Sent: 13 March 2010 16:26 To: r-help@r-project.org Subject: [R] (no subject) Dear Colleagues, We are attempting to crea

Re: [R] (no subject)

2010-03-01 Thread Twaha Mlwilo
Jim, Thanks a lot, regards > Date: Mon, 1 Mar 2010 21:02:27 +1100 > From: j...@bitwrit.com.au > To: uddessy2...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] (no subject) > > On 03/01/2010 05:00 PM, Twaha Mlwilo wrote: > > > > > > > >

Re: [R] (no subject)

2010-03-01 Thread Jim Lemon
On 03/01/2010 05:00 PM, Twaha Mlwilo wrote: Hello all, Iam newbie here and to R too.Is it possible to customize R to be used to people who has limited knowledge of statistics to perform simple data analysis?.Which language to use?. Any alternative suggestion?. Hi Twaha, You may be looking

Re: [R] (no subject)

2010-02-20 Thread jim holtman
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. You should at least include the function code you are talking about. A function will return a value that has

Re: [R] (no subject)

2010-02-15 Thread Liviu Andronic
Hello You are more likely to get help if you provide a subject more informative than "no subject". On 2/15/10, hussain abu-saaq wrote: > is there a good notes for loops(if else and while) in r. > Check this [1][3], but also the R manuals [2]. [1] http://www.r-project.org/doc/Rnews/Rnews_2008-

Re: [R] (no subject)

2010-02-13 Thread Ben Bolker
; >> as.Date("02 03 2008",format="%m/%d/%Y") > [1] NA > I hope you can help me here > - Original Message - > From: Ben Bolker > Date: Saturday, February 13, 2010 1:03 pm > Subject: Re: [R] (no subject) > To: r-h...@stat.math.ethz.ch >

Re: [R] (no subject)

2010-02-13 Thread Ben Bolker
Hussain Abusaaq fsu.edu> writes: > I have this vector and I want to change it to date. > > for example G=[05 12 2008] > > or g=[2] > f=[3] > y=[2208] > Something like as.Date(paste(rev(G),collapse="-")) __ R-help@r-project.org mailing list

Re: [R] (no subject)

2010-02-12 Thread Jim Lemon
On 02/13/2010 05:49 AM, Drew Smathers wrote: Sent from my iPod Yes, I can see that's a problem. Do you really want the solution? Jim __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] (no subject)

2010-01-26 Thread David Winsemius
On Jan 25, 2010, at 1:46 PM, Chuck White wrote: Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('',10),rep('', 20),rep('',30),rep('',40)) orig

<    1   2   3   4   5   6   >