Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread philozine
Dear all: These solutions work beautifully. Many, many thanks. And apologies for my lazy language! I did indeed mean permutations Best regards, Brandon --- On Wed, 12/3/08, G. Jay Kerns <[EMAIL PROTECTED]> wrote: > From: G. Jay Kerns <[EMAIL PROTECTED]> > Subject: Re: [R] Create unique

Re: [R] Null values In R.

2008-12-02 Thread Dieter Menne
paul murima wrote: > > > My problem is largely when i attempt to use correlation for my data... > xcc <- cor(a); > > The error i get is as follows > > Error in cor(a) : missing observations in cov/cor > As Daniel suggested, it is always best to use the function's parameter to handle NULLs

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread G. Jay Kerns
Dear Kingsford, You are quite right, my mistake: urnsamples(ID, size = 3, replace = FALSE, ordered = TRUE) Thanks. Jay On Wed, Dec 3, 2008 at 12:04 AM, Kingsford Jones <[EMAIL PROTECTED]> wrote: > However, I believe Brandon was trying to get the permutations of size > 3, rather than combinatio

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread Kingsford Jones
However, I believe Brandon was trying to get the permutations of size 3, rather than combinations. Dylan provided a solution including repeats. Here's one without: > library(gtools) > permutations(5, 3, LETTERS[1:5]) [,1] [,2] [,3] [1,] "A" "B" "C" [2,] "A" "B" "D" [3,] "A" "B" "E

[R] XML-RPC

2008-12-02 Thread Stavros Macrakis
It looks like the xml and httpRequest libraries provide the necessary building blocks for writing an XML-RPC client. Has anyone done this? I'd like to benefit from your experience (or code!). Thanks, -s [[alternative HTML version deleted]] ___

Re: [R] Null values In R.

2008-12-02 Thread Daniel Malter
Hi, for your cor() command you will want to specify the "use" argument as either "complete.obs" or as "pairwise.complete.obs". The difference between the two is that the former only uses those observations for which ALL information in "a" is available, whereas the latter uses information that is av

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread G. Jay Kerns
Dear Brandon, On Tue, Dec 2, 2008 at 10:46 PM, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Tue, Dec 2, 2008 at 7:42 PM, philozine <[EMAIL PROTECTED]> wrote: >> Dear all: >> >> This is one of those "should be easy" problems that I'm having great >> difficulty solving. I have a vector containin

[R] Null values In R.

2008-12-02 Thread paul murima
Hi everyone. I am having problems with NULL values. I understand in R one can command the program to skip null values. Can some one help me on the command line for that. Do i enter is as part of the string in: a<- read.table("filename.csv", header = T, row.names=1, sep=","); My problem is largely

Re: [R] Taking slices with tensorA

2008-12-02 Thread Gabor Grothendieck
There is section on argument matching in ?"[" On Tue, Dec 2, 2008 at 10:49 PM, John Tillinghast <[EMAIL PROTECTED]> wrote: > I've set up a simple tensor with indices 'a' and 'b'. > >> ftable(B) > b u v w x y > a > a1 0.001868954 0.403345197 0

Re: [R] Bug in "transform"?

2008-12-02 Thread hadley wickham
> The underlying issue is actually not in transform() but in data.frame(): > >> aq <- airquality[sample(1:153,6),] >> data.frame(aq, list(a=1,b=2)) > Error in data.frame(aq, list(a = 1, b = 2)) : > arguments imply differing number of rows: 6, 1 >> data.frame(aq, list(a=1)) >Ozone Solar.R Wind

[R] Taking slices with tensorA

2008-12-02 Thread John Tillinghast
I've set up a simple tensor with indices 'a' and 'b'. > ftable(B) b u v w x y a a1 0.001868954 0.403345197 0.030088185 0.137252368 0.142634612 a2 0.396935972 0.945219795 0.068828465 0.314180585 0.446338719 a3 0.752412200 0.748810918 0.1255

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread Dylan Beaudette
On Tue, Dec 2, 2008 at 7:42 PM, philozine <[EMAIL PROTECTED]> wrote: > Dear all: > > This is one of those "should be easy" problems that I'm having great > difficulty solving. I have a vector containing ID codes, and I need to > generate a 3-column matrix that contains all possible combinations o

[R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread philozine
Dear all: This is one of those "should be easy" problems that I'm having great difficulty solving. I have a vector containing ID codes, and I need to generate a 3-column matrix that contains all possible combinations of three. For example, my ID vector looks like this: A B C D E I need to gene

[R] [R-pkgs] Rcpp package relaunched

2008-12-02 Thread Dirk Eddelbuettel
New Rcpp versions 0.6.0 and 0.6.1 - The Rcpp package provides C++ classes that greatly facilitate interfacing C or C++ code in R packages using the .Call() interface provided by R. Rcpp provides matching C++ classes for a large number of basic R da

Re: [R] help on tapply using sample with differing sample-sizes

2008-12-02 Thread Charles C. Berry
On Tue, 2 Dec 2008, Jourdan Gold wrote: Hello, My question likely got buried so I am reposting it in the hopes that someone has an answer. I have thought more about the question and modified my question. I hope tha But apparently, you have not "read the posting guide http://www.R-project.org

Re: [R] Help with maps

2008-12-02 Thread Ray Brownrigg
On Wed, 03 Dec 2008, Ray Brownrigg wrote: > The easiest way would be: > map('world', regions="UK", xlim=c(-10, 5), ylim=c(48, 60)) > But of course: map('world', regions=c("UK", "Ireland"), xlim=c(-10, 5), ylim=c(48, 60)) might be more appropriate. HTH Ray Brownrigg MSCS, Victoria University of

Re: [R] Help with maps

2008-12-02 Thread Ray Brownrigg
On Wed, 03 Dec 2008, Avram Aelony wrote: > On Tuesday, December 02, 2008, at 04:40PM, "hadley wickham" <[EMAIL > PROTECTED]> wrote: > >On Tue, Dec 2, 2008 at 6:21 PM, Avram Aelony <[EMAIL PROTECTED]> wrote: > >> A few questions about maps... > >> > >> (1) How can I find a listing of the internal d

Re: [R] sampling from data.frame

2008-12-02 Thread Charles C. Berry
On Wed, 3 Dec 2008, axionator wrote: Hi all, I have a data frame with "clustered" rows as follows: Cu1 x1 y1 z1 ... Cu1 x2 y2 z2 ... Cu1 x3 y3 z3 ... # end of first cluster Cu1 Cu2 x4 y4 z4 ... Cu2 x5 y5 z5 Cu2 ... # end of second cluster Cu2 Cu3 ... ... "cluster"-size is 3 i

Re: [R] Help with maps

2008-12-02 Thread Avram Aelony
On Tuesday, December 02, 2008, at 04:40PM, "hadley wickham" <[EMAIL PROTECTED]> wrote: >On Tue, Dec 2, 2008 at 6:21 PM, Avram Aelony <[EMAIL PROTECTED]> wrote: >> A few questions about maps... >> >> (1) How can I find a listing of the internal data sets that map() from the >> maps library co

Re: [R] for loop looking for file names

2008-12-02 Thread jim holtman
To get the file names in the current directory try: list.files(pattern="[[:digit:]]{7}E") On Tue, Dec 2, 2008 at 4:11 PM, Steven Kennedy <[EMAIL PROTECTED]> wrote: > > I have a series of csv files in several folders. All begin with a 7 digit > number and end with the letter "E" (eg. 0726016E.csv)

[R] for loop looking for file names

2008-12-02 Thread Steven Kennedy
I have a series of csv files in several folders. All begin with a 7 digit number and end with the letter "E" (eg. 0726016E.csv). I want to be able to read a file in to R, take some of the data out of it and store it in a matrix, then move on to the next file and do the same thing. I was planning

Re: [R] how to handle irregularly spaced data as timeseries

2008-12-02 Thread Gabor Grothendieck
Have a look at the zoo package. There are three vignettes (pdf documents) included with the package that give many examples of its use. Also see ?read.zoo, ?plot.zoo and ?xyplot.zoo You will need something like: library(zoo) z <- read.zoo("myfile", ...whatever...) plot(z) On Tue, Dec 2, 2008

[R] how to handle irregularly spaced data as timeseries

2008-12-02 Thread Kirk Wythers
I have a set of modeled climate data recorded at irregular intervals. The format of the data is such that there are monthly measurements for the years 2000, 2020, 2050, 2080, etc. Therefore I have 12 regular records, a skip of some number of years, then 12 more monthly records, another skip

Re: [R] Help with maps

2008-12-02 Thread hadley wickham
On Tue, Dec 2, 2008 at 6:21 PM, Avram Aelony <[EMAIL PROTECTED]> wrote: > A few questions about maps... > > (1) How can I find a listing of the internal data sets that map() from the > maps library contains? > For example, "usa", "county", "state", "nz" all work. Are there any others? help(packa

[R] Help with maps

2008-12-02 Thread Avram Aelony
A few questions about maps... (1) How can I find a listing of the internal data sets that map() from the maps library contains? For example, "usa", "county", "state", "nz" all work. Are there any others? (2) Is there an easier, more generalized way to produce this (http://www.ai.rug.nl/~hedder

[R] help on tapply using sample with differing sample-sizes

2008-12-02 Thread Jourdan Gold
Hello, My question likely got buried so I am reposting it in the hopes that someone has an answer. I have thought more about the question and modified my question. I hope tha my specific question is: I am attempting to create a bootstrap procedure for a finite sample using the theory of Rao a

Re: [R] ggplot2 facet_wrap problem

2008-12-02 Thread stephen sefick
If you look at the TSS graph in the faceted example and then look at the plot of just the GPP vs. TSS. They are different graphs all together. The one that is not faceted is correct. On Tue, Dec 2, 2008 at 6:36 PM, ONKELINX, Thierry <[EMAIL PROTECTED]> wrote: > Hi Stephen, > > I think you will n

Re: [R] sampling from data.frame

2008-12-02 Thread jim holtman
Not sure exactly what you mean by 'sample' since you did not provide an example of the expected output, or input data that could be used. Here is an example of taking one sample from each cluster: > df <- data.frame(id=paste("C", rep(1:5, each=3), sep=''), data=1:15) > # sample 1 from each cluster

Re: [R] ggplot2 45deg axis labels

2008-12-02 Thread hadley wickham
Hi Stephen, Have a look at the "polishing your plot for publication" chapter of the ggplot2 book. Regards, Hadley On Tue, Dec 2, 2008 at 5:31 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > I would like to rotate the axis labels 45 deg. > > -- > Stephen Sefick > > Let's not spend our time and r

Re: [R] ggplot2 45deg axis labels

2008-12-02 Thread ONKELINX, Thierry
Hi Stephen, Have a look at the ggplot2 book. You will find an example on p. 6 of http://had.co.nz/ggplot2/book/polishing.pdf HTH, Thierry -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] namens stephen sefick Verzonden: wo 3-12-2008 0:31 Aan: R-help Onderwerp: [R] ggplot2 45deg axis la

Re: [R] ggplot2 facet_wrap problem

2008-12-02 Thread ONKELINX, Thierry
Hi Stephen, I think you will need to clarify what your problem is with the second plot. HTH, Thierry -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] namens stephen sefick Verzonden: di 2-12-2008 22:52 Aan: hadley wickham; R-help Onderwerp: [R] ggplot2 facet_wrap problem Hadley, I don

Re: [R] date operations

2008-12-02 Thread jim holtman
If you want to do the addition, 'unclass' the variable: > alpha2+4 [1] "2008-12-25" > alpha2 + unclass(alpha1) [1] "2009-02-15" > On Tue, Dec 2, 2008 at 4:10 PM, Christophe Dutang <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm dealing with dates in R (2.7.2), but some basic operations raise a > wa

Re: [R] date operations

2008-12-02 Thread jim holtman
'str' is your friend. Look at the results: > alpha2=as.Date("2008-12-21") > alpha1=as.Date("2008-12-21")-as.Date("2008-10-26") > alpha1 Time difference of 56 days > alpha2 [1] "2008-12-21" > alpha1+alpha2 Time difference of 14290 days Warning message: Incompatible methods ("Ops.difftime", "+.Date

[R] ggplot2 45deg axis labels

2008-12-02 Thread stephen sefick
I would like to rotate the axis labels 45 deg. -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little proble

[R] sampling from data.frame

2008-12-02 Thread axionator
Hi all, I have a data frame with "clustered" rows as follows: Cu1 x1 y1 z1 ... Cu1 x2 y2 z2 ... Cu1 x3 y3 z3 ... # end of first cluster Cu1 Cu2 x4 y4 z4 ... Cu2 x5 y5 z5 Cu2 ... # end of second cluster Cu2 Cu3 ... ... "cluster"-size is 3 in the example above (rows making up a cl

Re: [R] fGarch and is.na()

2008-12-02 Thread Yohan Chalabi
Thanks for the report, the problem boils down to the call of "methods:::bind_activation(TRUE)" in one of the depended package. I can reproduce the problem with > methods:::bind_activation(TRUE) > dfr <- data.frame(matrix(0, nrow = 1 , ncol = 1000)) > dfr2 <- is.na(dfr) I will forward you remar

[R] simultaneous plots

2008-12-02 Thread David Epstein
Is there a good and concise way of making simultaneous plots that are identical, but directed to different devices? I'm writing an R-script that produces a pdf file. I would really like to check visually whether the pdf file shows what I expect. So I would like the same commands to produce a plot

Re: [R] question about the tisPlot function in package tis

2008-12-02 Thread Jeffrey J. Hallman
[EMAIL PROTECTED] writes: > List, > > I am using the 'tisPlot' function in Jeff Hallman's excellent tis package > and was hoping that someone could spare me from having to dig into the > code of his 'tisPlot' function. So far as I can tell, the preferred > method of controlling the plotting of

Re: [R] QQ plots and boxcox

2008-12-02 Thread John Fox
Dear Erin, What you characterize as "snaky" might also be called bimodal and short-tailed. Try, e.g., plot(density(residuals(dog1.aov))) to see the bimodality more clearly. A Box-Cox transformation can correct skewness, but won't help here. I hope this helps, John --

Re: [R] Suppressing tick labels?

2008-12-02 Thread William Dunlap
> [R] Suppressing tick labels? > Graham Smith myotisone at gmail.com > Tue Dec 2 21:26:03 CET 2008 > > I am trying to suppress the tick labels on the x-axis of the following: > > barchart(richness[Wood=="V"]~Sample[Wood=="V"]) Use the scales= argument. E.g. d<-data.frame(richness=log(1:12),

[R] ggplot2 facet_wrap problem

2008-12-02 Thread stephen sefick
Hadley, I don't know if I am doing something wrong or if it is ggplot please see the two graphs at the bottom of the page (code). melt.nut <- (structure(list(RiverMile = c(119L, 119L, 119L, 119L, 119L, 119L, 119L, 119L, 119L, 148L, 148L, 148L, 148L, 148L, 148L, 148L, 179L, 179L, 179L, 179L, 179L,

[R] QQ plots and boxcox

2008-12-02 Thread Erin Hodgess
Dear R People: In the DASL library, there is a story about hot dogs. Here are the data: Beef186 495 Beef181 477 Beef176 425 Beef149 322 Beef184 482 Beef190 587 Beef158 370 Beef139 322 Beef175 479 Beef148 375 Beef1

Re: [R] optimization problem (optim vs. nlminb)

2008-12-02 Thread Mike Prager
In case anyone is still reading this thread, I want to add this: In a current problem (a data-shy five-parameter nonlinear optimization), I found "nlminb" markedly more reliable than "optim" with method "L-BFGS-B". In reviewing the fit I made, I found that "optim" only came close to its own minimum

[R] date operations

2008-12-02 Thread Christophe Dutang
Hi all, I'm dealing with dates in R (2.7.2), but some basic operations raise a warning. Incompatible methods ("+.Date", "Ops.difftime") for "+" I saw this topic in this mailing list, but I do not understand what to do... cf. https://stat.ethz.ch/pipermail/r-help/2008-June/165842.html Do I

[R] (no subject)

2008-12-02 Thread jestinah mahachie
I have been using rpart to get trees. May someone help me with how I can do some logistic regression modelling to derive odds ratios on the branches. Also help on how to derive estimates on prediction error. -- Kind Regards, Jestinah Home Address: Brusselsepoortstraat 85 9000 Gent Belgium

Re: [R] linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?

2008-12-02 Thread Jarle Brinchmann
Yes I think so if the errors were normally distributed. Unfortunately I'm far from that but the combination of sem & its bootstrap is a good way to deal with it in the normal case. I must admit as a non-statistician I'm a not 100% sure what the difference (if there is one) between a linear functio

Re: [R] linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?

2008-12-02 Thread Spencer Graves
Isn't this a special case of structural equation modeling, handled by the 'sem' package? Spencer Jarle Brinchmann wrote: Thanks for the reply! On Tue, Dec 2, 2008 at 6:34 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: I wonder if you are using this term in its correct technic

[R] Suppressing tick labels?

2008-12-02 Thread Graham Smith
I am trying to suppress the tick labels on the x-axis of the following: barchart(richness[Wood=="V"]~Sample[Wood=="V"]) I have tried col.axis="white" I have tried removing the axis all together with axes=FALSE I have tried xaxt="n" I have also tried labels=c"(label1", "label2") to replace the

Re: [R] Compiling R for 64-bit Windows (was Re: increasing memory limit in Windows Server 2008 64-bit)

2008-12-02 Thread David M Smith
Michael Styer wrote: >> So my next question is, does anyone have any thoughts about how significant >> a project it would be to compile R for 64-bit windows (using, e.g., the >> Portland Group >> compiler)? Based on our experiences at REvolution Computing, it's quite a significant project. We're

Re: [R] match

2008-12-02 Thread Peter Alspach
Tena koe Robert You could first apply paste apply(types, 1, paste, collapse=':') and then match. HTH Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of threshold > Sent: Wednesday, 3 December 2008 8:32 a.m. > To: r-help@r-proje

Re: [R] question on lmer function

2008-12-02 Thread Richard Palmer
Thanks Harold, I will review the lmer vignette again. On Tue, Dec 2, 2008 at 2:12 PM, Doran, Harold <[EMAIL PROTECTED]> wrote: > Richard > > There is much more information that you need to provide before a > thoughtful answer can be provided. Maybe you can describe the structure > of your data,

Re: [R] Bug in "transform"?

2008-12-02 Thread Peter Dalgaard
Prof Brian Ripley wrote: As the help page says If some of the values are not vectors of the appropriate length, you deserve whatever you get! Yes (did I write that?). It is a bit annoying with things that almost work, though. [snip] I often need to use this for creating new var

Re: [R] question about the tisPlot function in package tis

2008-12-02 Thread Gabor Grothendieck
Sorry that should have been: library(zoo) z <- as.zoo(dat, class = "yearmon") plot(z) xyplot(z) On Tue, Dec 2, 2008 at 2:35 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > The development version of zoo has a tis to zoo conversion function > that would allow you to plot your data using plot.z

Re: [R] question about the tisPlot function in package tis

2008-12-02 Thread Gabor Grothendieck
The development version of zoo has a tis to zoo conversion function that would allow you to plot your data using plot.zoo and xplot.zoo in which case you can use classic graphics axis function (for plot.zoo) or lattice facilities (with xyplot.zoo): source("http://r-forge.r-project.org/plugins/scms

[R] match

2008-12-02 Thread threshold
Hi, I would like to check which rows of 'types.prev' matrix pop up in 'types', following R in-built procedure. I tried 'match' function but it works in case of the one dimensional vectors. Will appreciate any suggestions. best, robert > types edateK [1,] 20060819 12.5 [2,] 200

[R] question about the tisPlot function in package tis

2008-12-02 Thread Kyle . Matoba
List, I am using the 'tisPlot' function in Jeff Hallman's excellent tis package and was hoping that someone could spare me from having to dig into the code of his 'tisPlot' function. So far as I can tell, the preferred method of controlling the plotting of the x-axis is using the 'xTickFreq'

Re: [R] question on lmer function

2008-12-02 Thread Doran, Harold
Richard There is much more information that you need to provide before a thoughtful answer can be provided. Maybe you can describe the structure of your data, your outcome variable, etc. There is a vignette in the lmer package called 'Implementation' that will show you some methods for model fitti

Re: [R] Asymmetric CIs

2008-12-02 Thread Frank E Harrell Jr
Sarah E. McCormick wrote: Hi, I was wondering if there was some sort of package or function that calculated asymmetric confidence intervals for small proportions. I thought of both the epicalc and epitools package, but I am hoping to find something where you can just plug in a standard error

Re: [R] linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?

2008-12-02 Thread Jarle Brinchmann
Thanks for the reply! On Tue, Dec 2, 2008 at 6:34 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > I wonder if you are using this term in its correct technical sense. > A linear functional relationship is > > V = a + bU > X = U + e > Y = V + f > > e and f are random errors (often but not necessa

Re: [R] Left-truncated regression

2008-12-02 Thread Tom La Bone
Look at the sand package, which is available at http://www.csm.ornl.gov/esh/statoed/ and the NADA package, which is available from CRAN. One or both may have items of interest. Tom Zita wrote: > > Hi. > > I am looking for a function for left-truncated data. > I have one data set with 2

[R] question on lmer function

2008-12-02 Thread Richard Palmer
suppose something like probability(passing test) is driven by 1. fixed effects -- sex 2. district effects - district funding 3. school effects - neighborhood income, racial composition, % two parent families, ... 4. class effects - teacher quality measurement, 5. individual rand

[R] predicted probabilities after lmer

2008-12-02 Thread arpino
Dear R-users, I'm using lmer to fit two-level logistic models and I'm interested in predicted probabilities that I get in this way (using "fitted"): glm1 = lmer(XY$T1~X1 + X2 + X3 + (1|Cind), family=binomial) #estimation of a two-level logit model fit1=fitted(glm1) # I get the fitted line

Re: [R] Question to regular expressions

2008-12-02 Thread Antje
Thanks a lot again to all of you!!! Antje Antje schrieb: Hi Gabor, it works! Thank you very much! But I still don't understand the difference between [0-9] and [:digit:]... Ciao, Antje Gabor Grothendieck schrieb: Try this: folders <- c("folder1", "f2", "F234562", "12345678", "234567",

Re: [R] Installation of RCurl Windows binary package from BioC extra repos (was Re: [BioC] Rcurl 0.8-1 update for bioconductor 2.7)

2008-12-02 Thread rdb20+
Roger, I had success installing RCurl per Patrick's instructions. I also got DAVIDQuery to install and run correctly but I had to run R CMD INSTALL DAVIDQuery from a cygwin terminal after 1) I replaced cygwin's make program v3.81 with the same version patched for windows from the mingw project. M

[R] Asymmetric CIs

2008-12-02 Thread Sarah E. McCormick
Hi, I was wondering if there was some sort of package or function that calculated asymmetric confidence intervals for small proportions. I thought of both the epicalc and epitools package, but I am hoping to find something where you can just plug in a standard error and point estimate and it wi

Re: [R] factanal question

2008-12-02 Thread William Revelle
At 11:04 AM -0500 12/1/08, John Fox wrote: Dear Bill, Thanks for pointing out that this functionality is already in the psych package. Shouldn't factor.residuals() avoid this computation for oblique rotations? John, Good suggestion. I will add that in the next revision. Bill Regards, Jo

Re: [R] linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?

2008-12-02 Thread Prof Brian Ripley
I wonder if you are using this term in its correct technical sense. A linear functional relationship is V = a + bU X = U + e Y = V + f e and f are random errors (often but not necessarily independent) with distributions possibly depending on U and V respectively. and pairs from (X,Y) are obse

Re: [R] linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?

2008-12-02 Thread Prof Brian Ripley
I wonder if you are using this term in its correct technical sense. A linear functional relationship is V = a + bU X = U + e Y = V + f e and f are random errors (often but not necessarily independent) with distributions possibly depending on U and V respectively. and pairs from (X,Y) are obse

Re: [R] legend idea for latticeExtra

2008-12-02 Thread Deepayan Sarkar
On 12/2/08, baptiste auguie <[EMAIL PROTECTED]> wrote: > Dear list, > > > I've written a small utility function to add arbitrary legend(s) to a > lattice graph (or a combination of them), much like the legend function of > base graphics. I though perhaps it could be useful to someone else, or > im

Re: [R] Bug in "transform"?

2008-12-02 Thread Vitalie Spinu
On Tue, 02 Dec 2008 17:37:44 +0100, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: As the help page says If some of the values are not vectors of the appropriate length, you deserve whatever you get! So you can use mtcars1 <- mtcars mtcars1[c("t1", "t2")] <- cbind(rep(3,32), rep(4

Re: [R] Can't load Rgraphviz on windows-based R

2008-12-02 Thread Rory.WINSTON
You can get LoadLibrary failures if a dependency is not found (e.g. a required dll or shlib used by the dll that you are explicitly loading). So make sure that all necessary dependencies (e.g. graphviz libs) are available in the system path. Rory Rory Winston RBS Global Banking & Markets Offi

[R] linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?

2008-12-02 Thread Jarle Brinchmann
[apologies if this appears twice] Hi, I have a situation where I have a set of pairs of X & Y variables for each of which I have a (fairly) well-defined PDF. The PDF(x_i) 's and PDF(y_i)'s are unfortunately often rather non-Gaussian although most of the time not multi-modal. For these data (est

Re: [R] Bug in "transform"?

2008-12-02 Thread Prof Brian Ripley
As the help page says If some of the values are not vectors of the appropriate length, you deserve whatever you get! So you can use mtcars1 <- mtcars mtcars1[c("t1", "t2")] <- cbind(rep(3,32), rep(4, 32)) or even mtcars1 <- transform(mtcars, t1=rep(3, 32), t2=rep(4, 32)) Vitalie Sp

Re: [R] command files

2008-12-02 Thread Gabor Grothendieck
On Tue, Dec 2, 2008 at 11:18 AM, Barry Rowlingson <[EMAIL PROTECTED]> wrote: > 2008/12/2 b g <[EMAIL PROTECTED]>: >> >> Since I'm a SAS programmer, I'm used to creating command files in an editor >> for submission later. Is there a way to do this in R? I'd need to retain >> an ouput listing and

Re: [R] Bug in "transform"?

2008-12-02 Thread Gabor Grothendieck
Try: cbind(mtcars, t1 = 3, t2 = 4) On Tue, Dec 2, 2008 at 11:14 AM, Vitalie Spinu <[EMAIL PROTECTED]> wrote: > Dear useRs, > > Here is a weird behavior of transform function: > > mtcars1<-matcars > transform(mtcars1,t1=3,t2=4) > Error in data.frame(`_data`, e[!matched]) : > arguments imply dif

Re: [R] Question to regular expressions

2008-12-02 Thread Prof Brian Ripley
Antje wrote: Hi Gabor, it works! Thank you very much! But I still don't understand the difference between [0-9] and [:digit:]... If all else fails, read the help, here ?regex. Both [0-9] and [[:digit:]] are character classes of digits, but the first contains only arabic numerals. In some

Re: [R] command files

2008-12-02 Thread Barry Rowlingson
2008/12/2 b g <[EMAIL PROTECTED]>: > > Since I'm a SAS programmer, I'm used to creating command files in an editor > for submission later. Is there a way to do this in R? I'd need to retain an > ouput listing and a log to check for errors. You probably want R CMD BATCH from a command-line. Fo

[R] Bug in "transform"?

2008-12-02 Thread Vitalie Spinu
Dear useRs, Here is a weird behavior of transform function: mtcars1<-matcars transform(mtcars1,t1=3,t2=4) Error in data.frame(`_data`, e[!matched]) : arguments imply differing number of rows: 32, 1 instead, this works: mtcars1$t1<-0 transform(mtcars1,t1=3,t2=4) also works if applied

Re: [R] Question to regular expressions

2008-12-02 Thread hadley wickham
On Tue, Dec 2, 2008 at 9:48 AM, Antje <[EMAIL PROTECTED]> wrote: > Hi Gabor, > > it works! Thank you very much! But I still don't understand the difference > between [0-9] and [:digit:]... You might find this site helpful: http://regexp.resource.googlepages.com/analyzer.html Copy in your attempt

Re: [R] exclude a vector value from another vector

2008-12-02 Thread Henrique Dallazuanna
Try this: setdiff(pop, sample(pop, 2)) On Mon, Dec 1, 2008 at 5:16 PM, Hamid Hamid <[EMAIL PROTECTED]> wrote: > Dear All, > I am trying to build a program which will take repeated samples (w/o > replacement) from a population of values. The interesting catch is that I > would like the sample va

Re: [R] exclude a vector value from another vector

2008-12-02 Thread Greg Snow
Others have shown ways to remove your sample from the population, but this may be doing things the long way. If you just want several samples from the same population without overlap between any of the samples, just take one sample of size equal to the sum of the individual sample sizes, random

Re: [R] Question to regular expressions

2008-12-02 Thread Gabor Grothendieck
Try this: "^[[:digit:]]{6}$" On Tue, Dec 2, 2008 at 10:48 AM, Antje <[EMAIL PROTECTED]> wrote: > Hi Gabor, > > it works! Thank you very much! But I still don't understand the difference > between [0-9] and [:digit:]... > > Ciao, > Antje > > > Gabor Grothendieck schrieb: >> >> Try this: >> >>> fol

Re: [R] Question to regular expressions

2008-12-02 Thread Antje
Hi Gabor, it works! Thank you very much! But I still don't understand the difference between [0-9] and [:digit:]... Ciao, Antje Gabor Grothendieck schrieb: Try this: folders <- c("folder1", "f2", "F234562", "12345678", "234567", "912345", "333") grep("^[0-9]{6}$", folders, value = TRUE)

Re: [R] Question to regular expressions

2008-12-02 Thread Gabor Grothendieck
Try this: > folders <- c("folder1", "f2", "F234562", "12345678", "234567", "912345", > "333") > grep("^[0-9]{6}$", folders, value = TRUE) [1] "234567" "912345" On Tue, Dec 2, 2008 at 10:32 AM, Antje <[EMAIL PROTECTED]> wrote: > Hi there, > > I know, this question is not directly an R-help quest

[R] Problem with the Rmpi package

2008-12-02 Thread Blanchette, Marco
Dear all, I just started to use the snow package to send multiple jobs on our cluster using MPI and the Rpmi package as the communication method. However, the Rmpi package have been behaving strangely. When I try to detach the Rmpi package I get the following error message: > library(Rmpi) > d

Re: [R] command files

2008-12-02 Thread Rainer M Krug
You could also look at littler Then you could use, under Linux, #!PTHTOR/r x <- read.csv(...) lm(...) . . . Rainer On Tue, Dec 2, 2008 at 4:07 PM, Blanchette, Marco <[EMAIL PROTECTED]> wrote: > Try > >> source('myFirstScript.R') > > Where myFirstScript.R as the following line > > x <- rnorm(10

Re: [R] optimization problem

2008-12-02 Thread Mike Prager
"Hans W. Borchers" <[EMAIL PROTECTED]> wrote: > Why not use one of the global optimizers in R, for instance 'DEoptim', and > then apply optim() to find the last six decimals? I am relatively sure that > the Differential Evolution operator has a better chance to come near a > global optimum than a

[R] Question to regular expressions

2008-12-02 Thread Antje
Hi there, I know, this question is not directly an R-help question but probably someone can give me a hint how to deal with the following problem. I have a vector with file/folder names and want to filter for all entries which have 6 numbers in a row and nothing else. folders <- c("folder1

[R] Wiley Interdisciplinary Reviews

2008-12-02 Thread hadley wickham
They are obviously growing desperate - I have now been asked to write 5 articles! Hadley -- http://had.co.nz/ __ 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/po

Re: [R] Problem with tcl/tk and Rcmdr - urgent help required

2008-12-02 Thread John Fox
Dear Ben, It seems clear that the problem is in loading the tcltk package. To confirm that, does library(tcltk) fail? I'm not very knowledgeable about Mac OS X. I do have a MacBook, with OS X 10.5, however, and encountered no problems installing and running the Rcmdr package. Have you seen the R

Re: [R] Regarding posting a package to R-forge (with one of the dependent packages not in CRAN)

2008-12-02 Thread Marcelo Perlin
Hi Uwe, Thanks for the reply. I already tried that a couple of weeks ago, with the exactly the same arguments you posted. So far no reply from the author. I going to try again. Regards, Marcelo. On Tue, Dec 2, 2008 at 9:42 AM, Uwe Ligges <[EMAIL PROTECTED]>wrote: > > > Marcelo Perlin wrote: >

Re: [R] Can't load Rgraphviz on windows-based R

2008-12-02 Thread Tobias Verbeke
L.S., I am facing the same problem. I followed the all instructions given in help file and some steps of previous discussion (from google search) but I could not install package Rgraphiviz in windows. I tried even the instructions given to install Bioconductor package then only able to insta

Re: [R] command files

2008-12-02 Thread Blanchette, Marco
Try > source('myFirstScript.R') Where myFirstScript.R as the following line x <- rnorm(100) y <- rnorm(100) plot(x,y) You could also use a editor like emacs with the ess-mode where one buffer can be your script with a live R session in a second buffer. Good luck On 12/2/08 7:21 AM, "b g"

[R] fGarch and is.na()

2008-12-02 Thread Felix Lamp
Hello, after loading package "fGarch" the function is.na.data.frame() is behaving different: > sessionInfo() R version 2.8.0 (2008-10-20) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_

[R] command files

2008-12-02 Thread b g
Since I'm a SAS programmer, I'm used to creating command files in an editor for submission later. Is there a way to do this in R? I'd need to retain an ouput listing and a log to check for errors. _ Send e-mail faster without impr

Re: [R] Can't load Rgraphviz on windows-based R

2008-12-02 Thread ram basnet
Dear all, I am facing the same problem. I followed the all instructions given in help file and some steps of previous discussion (from google search) but I could not install package Rgraphiviz in windows.  I tried even the instructions given to install Bioconductor package then only able to inst

[R] Problem with tcl/tk and Rcmdr - urgent help required

2008-12-02 Thread beniamino
Hello everyone, i have been searching the whole day, trying ANY solution offered by the internet and before headbanging against the wall would like to try asking for your help. As many others, i am haveing problems loading the Rcmdr package with Macbook running Tiger 10.4.11. X11 version updated

Re: [R] help with package Rwave

2008-12-02 Thread stephen sefick
I would suggest sowas (Douglas Maraun) or wmtsa (Percival and Walden). I don't know for sure but both of these probably rely on Rwave. I like both of the packages mentioned it just depends on what you want to do- wmtsa will do DWT and CWT + a lot more, and sowas is for testing hypotheses and wav

Re: [R] Examples of advanced data visualization

2008-12-02 Thread Yihui Xie
Since SVG has a lot of elements, Firefox is still under development to support different elements in SVG; see: http://www.mozilla.org/projects/svg/status.html Currently animations won't work under Firefox 3.0.4, and all the rest can be viewed using Firefox 3.0.4. Regards, Yihui -- Yihui Xie <[EM

Re: [R] merge character strings

2008-12-02 Thread Dimitris Rizopoulos
check at paste(), e.g., vec <- c("a", "b", "c") paste(vec, collapse = "") I hope it helps. Best, Dimitris mentor_ wrote: Hi, how can I do the following in R?: vec <- c("a", "b", "c") magic. print(str) "abc" Cheers -- Dimitris Rizopoulos Assistant Professor Department of Biostat

  1   2   >