Re: [R] R on browser

2009-09-20 Thread vinay basavanal
want i meant was there is Rweb (web interface) http://bayes.math.montana.edu/Rweb/Rweb.general.html where we can type in r code and it gives u results ,so i just wanted to know if there r any other such sites -- View this message in context: http://www.nabble.com/R-on-browser-tp25508719p25530

Re: [R] Datetime conversion

2009-09-20 Thread premmad
Thanks to everyone for helping me overcome the problem faced .I have got over with the problem .once again thanks for the immediate response of all the members -- View this message in context: http://www.nabble.com/Datetime-conversion-tp25503138p25530176.html Sent from the R help mailing list a

[R] [R-pkgs] New version of QCA

2009-09-20 Thread Adrian Dusa
Hi, A new version of the QCA package (0.6-0) was submitted to CRAN. This is a major improvement, now working with multi-valued data (previous versions accepted binary data only). The "classical" function qmcc() still accepts only binary data, but the enhanced function eqmcc() is now ready for m

[R] Handling missing data

2009-09-20 Thread premmad
I have to remove missing data both in character and numeric datatype.I tried using NA condition but it is not working ,please help me to solve this. -- View this message in context: http://www.nabble.com/Handling-missing-data-tp25530192p25530192.html Sent from the R help mailing list archive at

[R] Selecting data based on date-Data manupulation

2009-09-20 Thread premmad
I have 70 columns and more than 400k rows .In the data date column will have values from 1900(01/01/1900) .How do i select only the data of recent two years?Help me in this regard -- View this message in context: http://www.nabble.com/Selecting-data-based-on-date-Data-manupulation-tp25530189p255

[R] Point Density calculation

2009-09-20 Thread claw73
Hello everyone, This is my first post but I really need help and think R could be the way to go. I have a question regarding R and finding the most "points" in a certain area. I am looking at various places that have a certain point value associated to each place. The data I will be reading in

[R] Help needed to clarify hclust and cutree algorithms

2009-09-20 Thread Dana Sevak
Dear R Helpers, I read carefully the documentation and all postings on the hclust and cutree functions, however some aspects of the tree ordering and cluster assignment performed by these functions remain unclear to me, so I would very much appreciate your help in making sure I get them right.

Re: [R] Skipping missing files when importing data

2009-09-20 Thread Sundar Dorai-Raj
Try ?file.exists. if (file.exists(fxxx)) { read.table(fxxx) } else { cat("\"", fxxx, "\" is missing\n", sep = "") } HTH, --sundar On Sun, Sep 20, 2009 at 9:28 PM, jiangrm wrote: > Trying to import a bunch of data files named like f001, f002, f999. Some > of the files may be > missing

[R] Skipping missing files when importing data

2009-09-20 Thread jiangrm
Trying to import a bunch of data files named like f001, f002, f999. Some of the files may be missing and the missing files vary from time to time. Used for loop and read.table. When it reaches the missing file (say f100), it shows: Error in file(file, "r") : cannot open the connection In ad

Re: [R] correlation help

2009-09-20 Thread William Revelle
Adrian, To find all the correlations between columns of a matrix and to find their individual significance levels (questionable given that you are doing many correlations) use either the rcorr function in the Hmisc package or the corr.test function in the psych package. Bill \At 6:19 PM

Re: [R] Amazon SimpleDB and R

2009-09-20 Thread Duncan Temple Lang
Hi Tim Since we have a package to interface to Amazon's S3 storage system (http://www.omegahat.org/RAmazonS3), I put together an RAmazonDBREST package that uses the REST interface. It is available at http://www.omegahat.org/RAmazonDBREST/ and installable from source via install.packages("RA

Re: [R] Post-Hoc tests for Friedman Test?

2009-09-20 Thread David Winsemius
On Sep 20, 2009, at 9:05 PM, j...@terraspark.com wrote: Hi there all, This is my first post to the list and I'll first say a few things: - R is great! - The archives of this list have helped me solve all of my problems/ questions so far - I only know enough statistics "to be dangerous" I'm

[R] Post-Hoc tests for Friedman Test?

2009-09-20 Thread jon
Hi there all, This is my first post to the list and I'll first say a few things: - R is great! - The archives of this list have helped me solve all of my problems/questions so far - I only know enough statistics "to be dangerous" I'm looking for a way to do post-hoc tests for the Friedman tes

Re: [R] correlation help

2009-09-20 Thread Jorge Ivan Velez
Adrian, See http://www.nabble.com/Re:-applying-cor.test-to-a-(m,-n)-matrix---SUMMARY-to17150239.html#a17150239 HTH, Jorge On Sun, Sep 20, 2009 at 5:00 PM, Adrian Johnson wrote: > Dear group, > >

Re: [R] A stat related question

2009-09-20 Thread Rolf Turner
On 18/09/2009, at 9:23 PM, RON70 wrote: Can I ask a small stat. related question here? Suppose I have two predictors for a time series processes and accuracy of predictor is measured from MSEs. My question is, if two predictors give same MSE then, necessarily they have to be identical? Ca

[R] problems with Stackpoly, package Plotrix

2009-09-20 Thread Václav Varvařovský
sorry forgot to attach reproducible code: -- Forwarded message -- Date: 2009/9/21 Subject: problems with Stackpoly, package Plotrix To: r-help@r-project.org Dear all, I am fairly new to package Plotrix and I would like to ask you, if any of you could help me with following. a)

Re: [R] xtable + print (html)

2009-09-20 Thread David Winsemius
On Sep 20, 2009, at 6:40 PM, Martin Batholdy wrote: hi, I want html code via the xtable package. I have a data.frame and tried to use the print()-function. But I only get the data.frame printed - no html arround it. what do I have to change? That, my son, is extremely hard to tell since k

[R] problems with Stackpoly, package Plotrix

2009-09-20 Thread Václav Varvařovský
Dear all, I am fairly new to package Plotrix and I would like to ask you, if any of you could help me with following. a) I don't know how to set up border line width in the Stackpoly function (seems that lwd from par doesn't work, or at least not in the way I have written) b) I don't know, how to

Re: [R] help with SAV file

2009-09-20 Thread David Winsemius
On Sep 20, 2009, at 6:23 PM, Rogerio Costa wrote: Hi, I am trying to do a statistical analysis of a SPSS data set, which has 7 different parameters, 4 of which are Yes/No. When I try to select in one of the parameters all the rows with a Yes it always gives me the same error HOW? (

[R] xtable + print (html)

2009-09-20 Thread Martin Batholdy
hi, I want html code via the xtable package. I have a data.frame and tried to use the print()-function. But I only get the data.frame printed - no html arround it. what do I have to change? thanks! __ R-help@r-project.org mailing list https://sta

Re: [R] eval(expr) without printing to screen?

2009-09-20 Thread hadley wickham
> Here is a simpler mockup which shows the issue: > > x = data.frame(rbind(c(1,2,3),c(1,2,3))) > xnames = c("a", "b", "c") > names(x) = xnames > > for(i in 1:length(x)) > { > # Create a varying string expression > expr = paste("y = x$", xnames[i], "[1]", sep="") > > # evaluate expression > eval(par

[R] help with SAV file

2009-09-20 Thread Rogerio Costa
Hi, I am trying to do a statistical analysis of a SPSS data set, which has 7 different parameters, 4 of which are Yes/No. When I try to select in one of the parameters all the rows with a Yes it always gives me the same error : object 'Yes' not found although: > suburban [1] No No Yes

Re: [R] correlation help

2009-09-20 Thread Adrian Johnson
thank you john. however, I am finding it difficult to automate on a matrix. Pardon my ignorance in R computing: I do not know how to automate on a matrix. If I do the following it works: > x = cor.test(d6[1,],d6[2,]) > x Pearson's product-moment correlation data: d6[1, ] and d6[2, ] t

Re: [R] eval(expr) without printing to screen?

2009-09-20 Thread Nick Matzke
baptiste auguie wrote: Hi, What about this, eval(parse(text=expr)) (no print) HTH, baptiste Thanks. For some reason I couldn't think of that, for some reason I had a dim memory in my head that that wouldn't work, but it does. Thanks! Cheers, Nick 2009/9/19 Nick Matzke : Hi, I

Re: [R] running many different regressions

2009-09-20 Thread Schalk Heunis
Georg for example: >data(swiss) >data=swiss >lapply(2:length(data),function(x) lm(data[,1]~data[,x])) HTH Schalk Heunis On Sun, Sep 20, 2009 at 2:05 PM, Georg Ehret wrote: > Dear R community, > I have a dataframe with say 100 different variables. I wish to regress > variable 1 separately on

Re: [R] correlation help

2009-09-20 Thread John Kane
?cor ?cor.test --- On Sun, 9/20/09, Adrian Johnson wrote: > From: Adrian Johnson > Subject: [R] correlation help > To: r-help@r-project.org > Received: Sunday, September 20, 2009, 5:00 PM > Dear group, > > I have a matrix like the following: > > Name     Sample1    > sample2    sample3   samp

Re: [R] Date/Time to date & time

2009-09-20 Thread Mark Knecht
On Sun, Sep 20, 2009 at 1:55 PM, Gabor Grothendieck wrote: > On Sun, Sep 20, 2009 at 4:52 PM, Mark Knecht wrote: >> Thanks Gabor, >>   I did try to use dput but it wasn't cooperating and wanted to send >> FAR too much data. > > dput(head(x, 10)) > As I said, I tried almost exactly that. I didn't

Re: [R] running many different regressions

2009-09-20 Thread John Kane
--- On Sun, 9/20/09, Wensui Liu wrote: > From: Wensui Liu > Subject: Re: [R] running many different regressions > To: "Gabor Grothendieck" > Cc: R-help@r-project.org > Received: Sunday, September 20, 2009, 3:04 PM > should chicken be blamed by the > people allergic by eggs? It's more like :

[R] correlation help

2009-09-20 Thread Adrian Johnson
Dear group, I have a matrix like the following: Name Sample1sample2sample3 sample4 . sample(n) nm110.5 13.5 30 31 nm2 8 1134 29 nm3 9 10.3 27.8 35 nm(j) I w

[R] How to choose knots for GAM?

2009-09-20 Thread Yan Li
Hi, all I want to choose same knots in GAM for 10 different studies so that they has the same basis function. Even though I choose same knots and same dimensions of basis smoothing, the basis representations are still not same. My command is as follows: data.gam<-gam(y~s(age,bs='cr',k=10)+male,f

Re: [R] Date/Time to date & time

2009-09-20 Thread Gabor Grothendieck
On Sun, Sep 20, 2009 at 4:52 PM, Mark Knecht wrote: > Thanks Gabor, >   I did try to use dput but it wasn't cooperating and wanted to send > FAR too much data. dput(head(x, 10)) > >   Your method works well for me but as I look at it I don't > understand the use of double brackets - DF[[1]] - wh

Re: [R] Date/Time to date & time

2009-09-20 Thread Mark Knecht
Thanks Gabor, I did try to use dput but it wasn't cooperating and wanted to send FAR too much data. Your method works well for me but as I look at it I don't understand the use of double brackets - DF[[1]] - why do you do that? Anyway, thanks for the fast reponses from you and Jim. Both

Re: [R] Date/Time to date & time

2009-09-20 Thread Gabor Grothendieck
Note that your explanation refers to strptime but the code uses strftime which accounts for the error. Try this: > Lines <- "ENTRY DATE + 3/23/2009 6:30:00 AM + 3/23/2009 6:30:00 AM + 3/23/2009 6:39:00 AM + 3/23/2009 6:39:00 AM + 3/23/2009 6:48:00 AM + 3/23/2009 6:48:00 AM + 3/23/2009 7:00:00 AM"

Re: [R] Date/Time to date & time

2009-09-20 Thread jim holtman
Here is one way to do it. Not sure why you want columns with either date or time since you already have them. This will create a POSIXct object you can use for processing and then two character columns with date and time. Exactly what are you going to do with the data. > str(x) 'data.frame':

[R] Date/Time to date & time

2009-09-20 Thread Mark Knecht
Hi, Can strptime (or some other function) help me turn the following column of a data.frame into two new columns, one as date and the other as time, preserving the AM/PM value? Thanks, Mark > B ENTRY DATE 1 3/23/2009 6:30:00 AM 2 3/23/2009 6:30:00 AM 3 3/23/2009 6:39:00 AM 4

Re: [R] perl functions in R enviroment

2009-09-20 Thread Gabor Grothendieck
1. You can use the system() function for a less granular interface. See read.xls and xls2csv in the gdata package for an example of calling perl from R using system(). 2. If you do need a more granular interface you could try switching to C (which is even faster than perl) or if you want to use a

[R] perl functions in R enviroment

2009-09-20 Thread John Lande
dear all, I am trying to implement some perl scripting in R to improve the performance of some scripts. I found RSPerl library, but it seems to be quite tricky to import variables. this is a simple example. is there any simpler way to do it? furthermore is there any other available resource to in

Re: [R] Within-group correlation confidence intervals

2009-09-20 Thread David Freedman
you should save your 3 variables into a new *dataframe* d<-mydata[,c("iq","education","achievement")] and then the command would be by(d,d$sex,function(df) cor.test(df$educ,df$achiev)) but you could also just use by(mydata,mydata$sex,function(df) cor.test(df$educ,df$achiev)) david freedman

Re: [R] running many different regressions

2009-09-20 Thread Wensui Liu
should chicken be blamed by the people allergic by eggs? On Sun, Sep 20, 2009 at 3:00 PM, Gabor Grothendieck wrote: > Not everyone carefully examines the code from r-help posts > prior to pasting it in.  Posting code is very dangerous and > should not be done. > > Quite the contrary they often tr

Re: [R] running many different regressions

2009-09-20 Thread Gabor Grothendieck
Not everyone carefully examines the code from r-help posts prior to pasting it in. Posting code is very dangerous and should not be done. Quite the contrary they often try to understand the code by running it. Code like this should never be posted. On Sun, Sep 20, 2009 at 2:47 PM, Wensui Liu

Re: [R] running many different regressions

2009-09-20 Thread Wensui Liu
well, i assume you understand what my code does. please don't use if you don't know what you are using. On Sun, Sep 20, 2009 at 2:44 PM, Gabor Grothendieck wrote: > On Sun, Sep 20, 2009 at 2:38 PM, Wensui Liu wrote: >> I just quickly draft one with boston housing data. and it should be >> close

Re: [R] running many different regressions

2009-09-20 Thread Gabor Grothendieck
On Sun, Sep 20, 2009 at 2:38 PM, Wensui Liu wrote: > I just quickly draft one with boston housing data. and it should be > close to what you need. > > # REMOVE ALL OBJECTS > rm... WARNING!!! Running the code in this post could wipe out your entire workspace Please do NOT post such code. __

Re: [R] running many different regressions

2009-09-20 Thread Wensui Liu
apologize, there is a typo in the glm() :-) On Sun, Sep 20, 2009 at 2:05 PM, Georg Ehret wrote: > Dear R community, >   I have a dataframe with say 100 different variables. I wish to regress > variable 1 separately on every other variable (2-100) in a linear regression > using lm. There must be a

Re: [R] running many different regressions

2009-09-20 Thread Wensui Liu
I just quickly draft one with boston housing data. and it should be close to what you need. # REMOVE ALL OBJECTS rm(list = ls()); # DATA PREPARATION library(MASS); data(Boston); X<-I(as.matrix(Boston[-14])); Y<-I(as.matrix(Boston[14])); for(i in 1:13) { X2 <- X[, i] data <- data.frame(Y, X

[R] missing level of a nested factor results in an NA in lm output

2009-09-20 Thread Timothy Clough
Hello All, I have posted to this list before regarding the same issue so I apologize for the multiple e-mails. I am still struggling with this issue so I thought I'd give it another try. This time I have included reproducible code and a subset of the data I am analyzing. I am running an

[R] running many different regressions

2009-09-20 Thread Georg Ehret
Dear R community, I have a dataframe with say 100 different variables. I wish to regress variable 1 separately on every other variable (2-100) in a linear regression using lm. There must be an easy way to do this without loops, but I have difficulties figuring this out... Can you please help? Th

Re: [R] how to count occurrences of string?

2009-09-20 Thread Daniel Malter
Here is one approach: (Some steps are intermediary steps to illustrate what is going on) #create sample strings #repeat each of them 10 times string=rep(c( "Lorem ipsum dolor sit amet", "Lorem ipsum, and lorem ipsum something else", "Foo", "Bar", "Foobar"),10) ##Create a gender variable gender=r

Re: [R] Read time series

2009-09-20 Thread Wensui Liu
zoo() On Sun, Sep 20, 2009 at 12:24 PM, Alexis Maluendas wrote: > Hi R experts, > > How can I get a ts object from a data frame object which contains a daily > time series in order to apply it time series functions? > > Tanks > > Aleto > >        [[alternative HTML version deleted]] > > _

Re: [R] statistics

2009-09-20 Thread Daniel Malter
btw., even with homework newsgroups it's typically a no-no if you haven't even tried and do not show that you have done anything by yourself. Basically you are saying, I haven't been to class, I did not read the book either, I haven't done and don't know anything; can somebody else do my work for m

Re: [R] statistics

2009-09-20 Thread Daniel Malter
This is not a "please solve my homework for me" newsgroup. Hint: You may want to learn about chi-square tests. Daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-projec

[R] statistics

2009-09-20 Thread Anelle
The myoglobin sequence, with reference number NM_005368 in Gen bank, has the following frequencies of DNA nucleotides: ACGT 237 278 309 242 Do these data provide sufficient evidence, at the 1% level of significance, that the DNA nucleotides have an unequal distribution, that is the DN

[R] how to count occurrences of string?

2009-09-20 Thread w_poet
Hi everyone, I have an array with a variable called comments. I wish to count the number of subjects whose post-experiment comments contain a string x and then cross tab this with other variables of interest, ex. age. Does anyone have any suggestions on how to count unique occurrences of a string

Re: [R] Read time series

2009-09-20 Thread Gabor Grothendieck
Please provide a minimal data object to clarify your question. In particular please read and follow the last line on every message to r-help and read the posting guide also mentioned there. On Sun, Sep 20, 2009 at 12:24 PM, Alexis Maluendas wrote: > Hi R experts, > > How can I get a ts object fro

Re: [R] Function output

2009-09-20 Thread David Winsemius
I think these examples will show what one can and cannot do with the invisible function. > f2 <- function(x,y) return(c(x, invisible(x^y)) ) > f2(2,2) [1] 2 4 #so that not the right way to keep tree hidden > f2 <- function(x,y) invisible(c(print(x),(x^y)) ) > f2(2,2) [1] 2 # success x^y

[R] Read time series

2009-09-20 Thread Alexis Maluendas
Hi R experts, How can I get a ts object from a data frame object which contains a daily time series in order to apply it time series functions? Tanks Aleto [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat

Re: [R] statistics

2009-09-20 Thread Ben Bolker
Ace2 wrote: > > The myoglobin sequence, with reference number NM_005368 in Gen bank, has > the following > frequencies of DNA nucleotides: > ACGT > 237 278 309 242 > Do these data provide sufficient evidence, at the 1% level of > significance, that the DNA nucleotides > have an une

Re: [R] how to add tables of different dimensions

2009-09-20 Thread Henrique Dallazuanna
Try this: colSums(rbind(a, b[1:length(a)]), na.rm = TRUE) On Sat, Sep 19, 2009 at 8:30 PM, Henrik Kallberg wrote: > Hi all! > I'm stuck with this "easy" problem. I have two tables  (a and b) which i > would like to add. table a looks like: > a > var1 var2 > 3      4 > and table b looks like: >

Re: [R] Function output

2009-09-20 Thread David Winsemius
On Sep 20, 2009, at 10:59 AM, manta wrote: Good afternoon, I know it is a simple question but I cannot figure out how to solve this issue. I have a function that calculate two objects. I would like to choose everytime about the tree object, with default to not show it. I cannot understand

[R] Function output

2009-09-20 Thread manta
Good afternoon, I know it is a simple question but I cannot figure out how to solve this issue. I have a function that calculate two objects. I would like to choose everytime about the tree object, with default to not show it. OP<-function(S=100,X,sigma,mu=0,r=0,time=1,n) { value=(S)

Re: [R] axis: forcing last label to print

2009-09-20 Thread Shawn Polson
Thanks for the suggestion Jim, A good thought, but unfortunately this doesn't quite work either: -Since my example is log scale on that axis, the linearly spaced labels still become to numerous near the end forcing the last label not to print -Also, the labels don't print under the appropriate

Re: [R] Truncated plot in the output file

2009-09-20 Thread David Winsemius
On Sep 20, 2009, at 9:25 AM, J Chen wrote: Dear all, I made a large plot and wanted to save it as a tif file. I first opened and specified the size of the window. windows(12,17,rescale="fixed") Then I plot a heatmap using heatmap() when I saved the plot by using "Save as" in the file menu

[R] Truncated plot in the output file

2009-09-20 Thread J Chen
Dear all, I made a large plot and wanted to save it as a tif file. I first opened and specified the size of the window. windows(12,17,rescale="fixed") Then I plot a heatmap using heatmap() when I saved the plot by using "Save as" in the file menu or savePlot("heatmap", type="tif"), the plot i

[R] packGrob and dynamic resizing

2009-09-20 Thread baptiste auguie
Dear all, I'm trying to follow an old document to use Grid frames, Creating Tables of Text Using grid Paul Murrell July 9, 2003 As a minimal example, I wrote this, gf <- grid.frame(layout = grid.layout(1, 1), draw = TRUE) label1 <- textGrob("test", x = 0, just = "left", name="test") gf=place

Re: [R] Plot factors with a loop

2009-09-20 Thread baptiste auguie
Hi, >From what I understand, I would suggest the following strategy, 1- combine all data in a single data.frame (see merge, rbind, reshape package, etc.) 2- plot all data at once using a formula like this, boxplot(d~f,data=df) HTH, baptiste 2009/9/20 Sam Player : > # I have a dataframe with

Re: [R] Plot factors with a loop

2009-09-20 Thread johannes rara
Why do you need to do this using loop? Is this what you want? a <- rep(c("a", "b", "c"), 6) df <- data.frame(f=a, d=rnorm(18)) df boxplot(df$d ~ df$f) 2009/9/20 Sam Player : > # I have a dataframe with a factor and data: > > a <- rep(c("a", "b"), c(6,6)) > df <- data.frame(f=a, d=rnorm(12)) > df

[R] Plot factors with a loop

2009-09-20 Thread Sam Player
# I have a dataframe with a factor and data: a <- rep(c("a", "b"), c(6,6)) df <- data.frame(f=a, d=rnorm(12)) df # I want to make a single plot with boxplots of each factor. I need to do it via a loop as I would like to apply it to other dataframes with many factors. The following is a loop th

Re: [R] Quadratic Constraints

2009-09-20 Thread Hans W. Borchers
The package lpSolve (that I have recommended before) supports so-called 'semi-continuous variables', that is "Semi-continuous variables are variables that must take a value between their their minimum and maximum or zero. So these variables are treated the same as regular variables, e

Re: [R] axis: forcing last label to print

2009-09-20 Thread Jim Lemon
On 09/20/2009 02:12 PM, Shawn Polson wrote: Hello, I often use the axis command to add labels to axes with large numbers of consecutively numbered names: y<- barplot (x, log="x") axis(1, at = y, labels = c(1:12345)) Since there are more labels than will fit in the space, the command only print

Re: [R] Regarding KS Test for Goodness-of-Fit

2009-09-20 Thread Schalk Heunis
Manuj Your approach in (2) would work, looking at the source (just type ks.test) your function will be called with a sorted vector of data values, i.e. HED(sort(x), ...) where x is a a numeric vector of data values and ... is the parameters as passed to ks.test This means your function needs to be

[R] Quadratic Constraints

2009-09-20 Thread vikrant S
HI All, I am unable to solve a optimization Problem Please Help Me out of this to solve. The Optimization problem is as follows :- My objective function is linear and one of the constraint is quadratic. Min z = 5 * X1 + 9* X2 + 7.15 *X3 + 2 * X4 subject to X1 + X2 + X3 +X4 = 9 X1 + X4 < =

Re: [R] Lattice: combine the same strip?

2009-09-20 Thread baptiste auguie
Hi, Not exactly answering your question, but latticeExtra provides a function useOuterStrips that you could use to have a single S11 strip on the left instead. HTH, baptiste 2009/9/20 di jianing : > Hello R helpers, > > I am producing a figure with dual strips, i.e., x~y | S1 + S2, where S1 an

Re: [R] plotting least-squares residuals against x-axis

2009-09-20 Thread Schalk Heunis
Jason Try this > Residuals = residuals(lm(y~x)) > plot(x,Residuals) Schalk Heunis On Sun, Sep 20, 2009 at 1:36 AM, Jason Priem wrote: > Hi, > I want to plot the residuals of a least-squares regression. > > plot(lm(y~x), which=1) > > does this, but it plots the y-axis of my data on the x-axis

Re: [R] random selection from dataset and creating and graphing multiple means

2009-09-20 Thread Schalk Heunis
Mike I split the answer into three parts: A. Random sampling To random select 500 from 5000, you can use:> data5000 = rnorm(5000,200,10) # make some data > s = sample(data5000,500) > head(s) [1] 201.7548 167.5157 106.1064 194.6629 165.9758 187.1152 B. Repeated Random Sampling Its not clear with