[R] creating a scale (factor) based on a continuous variable nested within levels of factor

2010-11-07 Thread hind lazrak
Hello R-helpers I hope that my subject line is not detering anyone from helping me out:) I have been stuck of a few hours now, and I don't seem to pinpoint where the problem is. I have a data.frame which is structured as follow: str(hDatPretty) 'data.frame': 1665 obs. of  8 variables: $ time  

[R] When using ACF, receive error: no applicable method for 'ACF' applied to an object of class c('double', 'numeric')

2010-11-07 Thread evt
I am guessing this is a very simple question, but this is only my second day with R so it is all still a bit imposing. I am trying to run an autocorrelation. I imported a CSV file, which has one column labeled logistic. I ran the command: ACF(data$logistic,maxLag=10) However, I received the

Re: [R] is this matrix symmetric

2010-11-07 Thread P Ehlers
Jun Shen wrote: Hi, I have this symmetric matrix, at least I think so. col1 col2 col3 [1,] 0.20 0.05 0.06 [2,] 0.05 0.10 0.03 [3,] 0.06 0.03 0.08 or structure(c(0.2, 0.05, 0.06, 0.05, 0.1, 0.03, 0.06, 0.03, 0.08 ), .Dim = c(3L, 3L), .Dimnames = list(NULL, c(var1, var2, var3))) But

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Tal Galili
Hello Mika, Most of my problems with win7 where permission problems. You can check if that is the case, by setting R to ran with administrator privileges, and see if that solves the problem. Best, Tal Contact Details:---

Re: [R] How to do bootstrap for the complex sample design?

2010-11-07 Thread Fei xu
Dear Professor Lumley; Thank you so much for your invaluable advice! I will digest your advice and try different methods. Great thanks again! Faye Date: Fri, 5 Nov 2010 08:24:00 +1300 Subject: Re: [R] How to do bootstrap for the complex sample design? From: tlum...@uw.edu To:

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread thornbird
Thank you very much. I learned a lot through your help. It worked great for the sample data. But when I try to apply the command to my dataset, I ran into two more problems. First, the dataset is huge, it has thousands of lines. I can read it in R. Using Lines - data may not work such a

[R] saddle points in optim

2010-11-07 Thread Jonathan Phillips
Hi, I've been trying to use optim to minimise least squares for a function, and then get a guess at the error using the hessian matrix (calculated from numDeriv::hessian, which I read in some other r-help post was meant to be more accurate than the hessian given in optim). To get the standard

Re: [R] creating a scale (factor) based on a continuous variable nested within levels of factor

2010-11-07 Thread Dennis Murphy
Hi: If I get your meaning, the cut() function would appear to be your friend in this problem. hDatPretty$liking - cut(hDatPretty$rating, breaks = c(-11, -4, 4, 11), labels = c('dislike', 'neutral', 'like')) HTH, Dennis On Sat, Nov 6, 2010 at 11:15 PM, hind

[R] using variable in rmysql query

2010-11-07 Thread Mohan L
Dear All, I am using this query it returns id : id - dbGetQuery(con1,SELECT id FROM tenants WHERE name LIKE '%consim%') But In my case the string consim is there in another variable(it is coming from configuration file); str - consim I am trying to replace the string some this like, but it

Re: [R] When using ACF, receive error: no applicable method for 'ACF' applied to an object of class c('double', 'numeric')

2010-11-07 Thread Dennis Murphy
Hi: On Sat, Nov 6, 2010 at 11:22 PM, evt ethu...@gmail.com wrote: I am guessing this is a very simple question, but this is only my second day with R so it is all still a bit imposing. I am trying to run an autocorrelation. I imported a CSV file, which has one column labeled logistic.

[R] Sweave: option keep.source=TRUE and package cacheSweave

2010-11-07 Thread Renaud Lancelot
Dear all, When I use the cacheSweave package together with the Sweave option keep.source = TRUE, all the LaTeX code before the Sweave code chunk is included in the TeX file to be compiled. For example, with the following Sweave file \documentclass[12pt]{article} \usepackage[nogin]{Sweave} %

[R] remove data frame from list of data frames

2010-11-07 Thread Matthew Finkbeiner
I have a list of data frames like this: a- data.frame(x=runif(10), y = runif(10), Acc = 1) b- data.frame(x=runif(10), y = runif(10), Acc = 0) ls- list(a,b) and I want to remove the data frames from ls that have Acc values other than 1. How do I do that? Thanks for any help! Matthew

Re: [R] Plotting a grid of directly specified colours

2010-11-07 Thread Peter Davenport
All helpful suggestions: thanks loads Baptiste, Barry, Jim. image() and color2D.matplot() seem most easily adaptable for my purposes. I've copied a couple of examples below for anyone else facing the same q's. Best, Peter #color matrix cseq-seq(0,150,1) lseq-seq(0,100,1) clen-length(cseq)

[R] How do I order xyplot line points?

2010-11-07 Thread Alex Reynolds
I have the following xyplot figure: http://img577.imageshack.us/img577/686/filesizeresults1200.png The data are organized in a matrix file as follows: Type ElementsChromosome Time bedGz 1200chr114.240 bedGz 1200chr27.949 bedGz 1200

Re: [R] using variable in rmysql query

2010-11-07 Thread jim holtman
?paste id - dbGetQuery(con1,paste(SELECT id FROM tenants WHERE name LIKE '%, ,str, %', sep = '')) On Sun, Nov 7, 2010 at 4:51 AM, Mohan L l.mohanphys...@gmail.com wrote: Dear All, I am using this query it returns id : id - dbGetQuery(con1,SELECT id FROM tenants WHERE name LIKE

Re: [R] remove data frame from list of data frames

2010-11-07 Thread jim holtman
Is this what you are asking; this accepts any dataframe that has at least one Acc = 1; changing 'any' to 'all' means all Acc==1. Play around and get what you need: ls- list(a,b) ls [[1]] x y Acc 1 0.26550866 0.2059746 1 2 0.37212390 0.1765568 1 3 0.57285336 0.6870228

Re: [R] How do I order xyplot line points?

2010-11-07 Thread baptiste auguie
Hi, try this, xyplot(Time~Chromosome|factor(Elements), data = mtx[order(mtx$Chromosome), ], ... [snipped]) HTH, baptiste On 7 November 2010 13:17, Alex Reynolds reyno...@u.washington.edu wrote: I have the following xyplot figure:  

Re: [R] How do I order xyplot line points?

2010-11-07 Thread Alex Reynolds
Perfect, thanks! On Nov 7, 2010, at 4:59 AM, baptiste auguie wrote: Hi, try this, xyplot(Time~Chromosome|factor(Elements), data = mtx[order(mtx$Chromosome), ], ... [snipped]) HTH, baptiste On 7 November 2010 13:17, Alex Reynolds reyno...@u.washington.edu

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Mike Marchywka
From: tal.gal...@gmail.com Date: Sun, 7 Nov 2010 09:27:10 +0200 Subject: Re: [R] can't load nlme on windoze 7 To: marchy...@hotmail.com CC: r-help@r-project.org Hello Mika, Most of my problems with win7 where permission problems. You can check if

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread Gabor Grothendieck
On Sat, Nov 6, 2010 at 11:05 PM, thornbird huachang...@gmail.com wrote: Thank you very much. I learned a lot through your help. It worked great for the sample data. But when I try to apply the command to my dataset, I ran into two more problems. First, the dataset is huge, it has thousands

[R] help to sum up data frame

2010-11-07 Thread Mohan L
Dear All, I have a data frame like this: name ip Bsent Breceived a 10.00 0.00 a 2 1.43 19.83 a 1 0.00 0.00 a 21.00 1.00 b 10.00 2.00 b 3 0.00 2.00 b

Re: [R] help to sum up data frame

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 8:59 AM, Mohan L wrote: Dear All, I have a data frame like this: name ip Bsent Breceived a 10.00 0.00 a 2 1.43 19.83 a 1 0.00 0.00 a 21.00 1.00 b 10.00

Re: [R] Sweave: option keep.source=TRUE and package cacheSweave

2010-11-07 Thread Duncan Murdoch
Renaud Lancelot wrote: Dear all, When I use the cacheSweave package together with the Sweave option keep.source = TRUE, all the LaTeX code before the Sweave code chunk is included in the TeX file to be compiled. For example, with the following Sweave file The author of cacheSweave is aware of

Re: [R] is this matrix symmetric

2010-11-07 Thread Jorge Ivan Velez
Hi Jun, Just remove the col.names: colnames(x) - NULL isSymmetric(x) [1] TRUE HTH, Jorge On Sun, Nov 7, 2010 at 1:21 AM, Jun Shen wrote: Hi, I have this symmetric matrix, at least I think so. col1 col2 col3 [1,] 0.20 0.05 0.06 [2,] 0.05 0.10 0.03 [3,] 0.06 0.03 0.08 or

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Mike Marchywka
On further investgiation, I clicked on the R picture using windoze explorer and ran as admin. First, I got a prompt saying it could not find cygwin1.dll. I changed env variables to add cygwin to path and now it just silently hangs. If I ask for more details and run R --verbose in gdb and then

Re: [R] anova(lme.model)

2010-11-07 Thread Bert Gunter
I said nothing about legitimacy. I only suggested what I thought was a more satisfactory way the OP could get the issues resolved, since they seemed to go beyond R. The R-sig-mixed-models (check spelling) list might be a good place to look. I believe Th R-help archives not the packages contain

[R] regular exprs

2010-11-07 Thread Dimitris Rizopoulos
Dear All, I would appreciate any help with the following: given the vector 'x' x - c(Ass1, Ass.s1, Ass2, Ass.s2) I would like to pick up the positions where the character string contains Ass but does not contain Ass.s, so for 'x' that would be positions 1 and 3. I guess this could be

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Uwe Ligges
I wonder why cygwin is mentioned here. If you are using the setup installer, it is a native Windows executable and does not run under cygwin. cygwin1.dll should not be required anywhere. The cygwin platform is not supported. Best, Uwe Ligges On 07.11.2010 14:37, Mike Marchywka wrote: On

Re: [R] saddle points in optim

2010-11-07 Thread Ben Bolker
Jonathan Phillips 994phij at gmail.com writes: I've been trying to use optim to minimise least squares for a function, and then get a guess at the error using the hessian matrix (calculated from numDeriv::hessian, which I read in some other r-help post was meant to be more accurate than the

Re: [R] regular exprs

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 10:15 AM, Dimitris Rizopoulos wrote: Dear All, I would appreciate any help with the following: given the vector 'x' x - c(Ass1, Ass.s1, Ass2, Ass.s2) I would like to pick up the positions where the character string contains Ass but does not contain Ass.s, so for 'x'

Re: [R] regular exprs

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 10:30 AM, David Winsemius wrote: On Nov 7, 2010, at 10:15 AM, Dimitris Rizopoulos wrote: Dear All, I would appreciate any help with the following: given the vector 'x' x - c(Ass1, Ass.s1, Ass2, Ass.s2) I would like to pick up the positions where the character string

Re: [R] regular exprs

2010-11-07 Thread Henrique Dallazuanna
Try this: grep(Ass[^\\.], x) On Sun, Nov 7, 2010 at 1:15 PM, Dimitris Rizopoulos d.rizopou...@erasmusmc.nl wrote: Dear All, I would appreciate any help with the following: given the vector 'x' x - c(Ass1, Ass.s1, Ass2, Ass.s2) I would like to pick up the positions where the character

[R] varclus in Hmisc vs SAS PROC VARCLUS

2010-11-07 Thread Lars Bishop
Hi, I'll apreciate your guidance on how can I re-create the output from SAS PROC VARCLUS in R. I've found the varclus function in Hmisc. However, is it possible to use that function to compute for each variable the 1-R**2 ratio (this is the ratio of 1 minus the R-squared with Own Cluster to one

[R] Integrate and mapply

2010-11-07 Thread Vaiva P
Hi, I need some help on integrating a function that is a vector. I have a function - vector which each element is different. And, naturally, function integrate() does not work I checked the article of U. Ligges and J. Fox (2008) about code optimization How Can I Avoid This Loop or Make It Faster?

Re: [R] creating a scale (factor) based on a continuous variable nested within levels of factor

2010-11-07 Thread hind lazrak
Hello Dennis and r-helpers Thank you very much for your reply. The problem is solved now even if I don't seen why the command that I had posted as an alternative solution did not work... hDatPretty$liking - by(hDatPretty$rating, hDatPretty$songId,function (z) { cut(hDatPretty$z, c(-10,

Re: [R] Heatmap construction problems

2010-11-07 Thread Hadley Wickham
It's hard to know without a minimal reproducible example, but you probably want scale_fill_gradient or scale_fill_gradientn. Hadley On Thu, Oct 28, 2010 at 9:42 AM, Struchtemeyer, Chris stru...@okstate.edu wrote: I am very new to R and don't have any computer program experience whatsoever.  I

[R] stupid R tricks

2010-11-07 Thread Carl Witthoft
Hi all, Just thought I'd post this (maybe) helpful tool I wrote. For people like me who are bad at keeping a clean environment, it's a time-saver. #simple command to get only one type of object in current environment lstype-function(type='closure'){ inlist-ls(.GlobalEnv) if

Re: [R] ggplot2: facet_grid with only one level does not display the graph with the facet_grid level in title

2010-11-07 Thread Hadley Wickham
This is on my to do list: https://github.com/hadley/ggplot2/issues/labels/facet#issue/107 Hadley On Thu, Oct 28, 2010 at 11:51 AM, Matthew Pettis matthew.pet...@gmail.com wrote: Hi All, Here is the code that I'll be referring to: p - ggplot(wastran.data, aes(PER_KEY, EVENTS)) (p - p +    

Re: [R] Integrate and mapply

2010-11-07 Thread Uwe Ligges
So undint(u) is a 15 dimensional vector. What do the different dimensions mean? How would you define the integral of a 15 dimensional vector? It would help if you could provide some background on what your code is supposed to do. Uwe Ligges On 07.11.2010 17:01, Vaiva P wrote: Hi, I

Re: [R] Integrate and mapply

2010-11-07 Thread Joshua Wiley
Hi, Have you tried just your function (undint) on its own (i.e., without trying to feed it to integrate)? If you did, you would notice that it does not return anything (hence, I could not get any result). See inline comments for some additional thoughts. On Sun, Nov 7, 2010 at 8:01 AM, Vaiva P

Re: [R] regular exprs

2010-11-07 Thread Gabor Grothendieck
On Sun, Nov 7, 2010 at 10:15 AM, Dimitris Rizopoulos d.rizopou...@erasmusmc.nl wrote: Dear All, I would appreciate any help with the following: given the vector 'x' x - c(Ass1, Ass.s1, Ass2, Ass.s2) I would like to pick up the positions where the character string contains Ass but does not

Re: [R] saddle points in optim

2010-11-07 Thread Ravi Varadhan
Try optimx package (with the option all.methods=TRUE). This helps you in 2 different ways: (1) you can compare estimates from multiple optimizers, and (2) you can look at the first- and second-order KKT conditions for optimality. Hope this helps, Ravi.

Re: [R] stupid R tricks

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 11:40 AM, Carl Witthoft wrote: Hi all, Just thought I'd post this (maybe) helpful tool I wrote. For people like me who are bad at keeping a clean environment, it's a time-saver. #simple command to get only one type of object in current environment

Re: [R] saddle points in optim

2010-11-07 Thread Ravi Varadhan
The hessian from `optim' is not as accurate as that from `numDeriv' (with the default of Richardson extrapolation), so I would trust the numDeriv's hessian result over that of optim. However, without seeing what you actually did, this is only a surmise. Ravi.

Re: [R] help to sum up data frame

2010-11-07 Thread John Kane
With your data set as the data.frame xx library(reshape2) xx - melt(xx) dcast(xx, name ~ variable, sum) --- On Sun, 11/7/10, Mohan L l.mohanphys...@gmail.com wrote: From: Mohan L l.mohanphys...@gmail.com Subject: [R] help to sum up data frame To: r-help@r-project.org Received: Sunday,

[R] How is MissInfo calculated? (mitools)

2010-11-07 Thread Robin Jeffries
What does missInfo compute and how is it computed? There is only 1 observation missing the ethnic3 variable. There is no other missing data. N=1409 summary(MIcombine(mod1)) Multiple imputation results: with(rt.imp, glm(G1 ~ stdage + female + as.factor(ethnic3) + u, family = binomial()))

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Mike Marchywka
Date: Sun, 7 Nov 2010 16:19:16 +0100 From: lig...@statistik.tu-dortmund.de To: marchy...@hotmail.com CC: tal.gal...@gmail.com; r-help@r-project.org Subject: Re: [R] can't load nlme on windoze 7 I wonder why cygwin is mentioned here. Yeah, that

Re: [R] stupid R tricks

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 12:25 PM, David Winsemius wrote: On Nov 7, 2010, at 11:40 AM, Carl Witthoft wrote: Hi all, Just thought I'd post this (maybe) helpful tool I wrote. For people like me who are bad at keeping a clean environment, it's a time-saver. #simple command to get only one

Re: [R] How is MissInfo calculated? (mitools)

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 1:24 PM, Robin Jeffries wrote: What does missInfo compute help(package=mitools) And some obvious Goggling (lumley micombine missinfo) produced this link to a 2005 course syllabus that Lumley (the package author) leaves online:

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Mike Marchywka
Either hotmail or the list spam filter butchered my dll list but I would mention that the cygwin dll occurs when I tried to load the nlme library. I posted the build settings in first post and am now floundering with the tar file to find the Makefile so I can change them to avoid using cygwin,

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Uwe Ligges
Why don't you install the Windows binary? install.packages(nlme) should do the trick? Otherwise, see R Installation and Administration manual fir details how to set up an environment for installing from sources under Windows. Note that nlme is a recommended package and included in the

[R] mean on a plot

2010-11-07 Thread romzero
Hi, i need to draw a plot with means of values, reading a table from datafile. Example of datafile: DaysWeight 0 178.00 0 250.00 0 242.00 0 239.00 0 223.00 0 188.00 0 237.00 0 212.00 0 273.00 0 191.00 0 173.00 0 233.00

Re: [R] remove data frame from list of data frames

2010-11-07 Thread Matthew Finkbeiner
Thank you Jim (and others who responded off list). This does the trick for me perfectly: ls[sapply(ls, function(x) all(x$Acc == 1))] Thanks again! Matthew On Sun, Nov 7, 2010 at 11:34 PM, jim holtman jholt...@gmail.com wrote: Is this what you are asking; this accepts any dataframe that has

Re: [R] Integrate and mapply

2010-11-07 Thread Joshua Wiley
Hi, I still do not really understand, but I have a couple ideas: On Sun, Nov 7, 2010 at 11:09 AM, Vaiva P asva...@gmail.com wrote: Thank you guys for  a quick reaction. I decided it to write a common letter to you both at once. I tried to calculate the value of a a function without

Re: [R] mean on a plot

2010-11-07 Thread Joshua Wiley
Hi Romzero, This gets the job done, though it is not the most elegant solution ever (for those I'd take a look at the ggplot2 or lattice packages). ## Read in data la - read.table(textConnection( DaysWeight 0 178.00 0 250.00 0 242.00 0 239.00 0 223.00 0

[R] multiple regression analysis

2010-11-07 Thread Matevž Pavlič
Hi all, This is more a help on ideas that on actuall R code. Those of you which are geologist or work with boreholes woudl understand that i would like to achieve. I'll tr to explain as good as I can...so here it goes.. I have around 1000 geomechanical (geological) borehole logs in

Re: [R] Computing ergodic mean with CODA

2010-11-07 Thread Ben Bolker
Raquel Rangel de Meireles Guimarães raquelrguimadem at gmail.com writes: Hi all, I would like to compute ergodic mean using MCMC output from WinBUGS. I tried using CODA package, but it seems that it is not implemented yet. Could anyone help me to compute this? Attached to this email

[R] High Frequency Trading

2010-11-07 Thread Deb Midya
Hi R users,   Thanks in advance.   I am using R 2.12.0 on Windows XP.   My objective is to construct algorithms for High Frequency Trading.   May I request you to provide me information such as packages or tools please.   Thank you very much for the time you have given.   Regards,   Deb  

Re: [R] mean on a plot

2010-11-07 Thread romzero
Perfect. Thank you Joshua. -- View this message in context: http://r.789695.n4.nabble.com/mean-on-a-plot-tp3031068p3031267.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] About 5.1 Arrays

2010-11-07 Thread Michael Friendly
Hi Stephan Since early in November you have posted queries on R-help on 5 different topics as you are trying to learn to use R. This is a good thing, and many contributors to R-help have replied, taking pains to provide explanations and examples to be helpful. But, in return, it doesn't

[R] An example for predab.resample in r

2010-11-07 Thread Azadeh Shohoudi
Hi; I want to use bootstrap .632 with predab.resample, but the description is not clear for me. Can any body give me an example please. Thanks; Azad. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] 3-way interaction simple slopes

2010-11-07 Thread Michael Friendly
You would get more helpful replies if you indicated which among MONTHS, CEXPOSE.M and bf.m were factors vs. covariates, and for which factor or factors you wanted to test the simple slopes. You will find that linearHypothesis in the car package can test these things, and the effects package can

[R] Rdindex truncating titles?

2010-11-07 Thread Rolf Turner
When building packages these days I keep getting warnings from R CMD build to the effect that INDEX is not up to date. The INDEXes always seem to be up do to date to *me*. Then I thought to compare the INDEX from the package source with the INDEX in the installed package (after building with

Re: [R] High Frequency Trading

2010-11-07 Thread Deb Midya
Thanks for your reply.   I am looking for some algorithms to find pattern and trend in stocks in real time.   I have experience in Modern Portfolio Optimization Using S-PLUS. I have used various analytical tools such Mean-Variance, CVaR, CDaR, MAD, Re sampling and others analytical tools.   I

Re: [R] Rdindex truncating titles?

2010-11-07 Thread Duncan Murdoch
On 07/11/2010 6:22 PM, Rolf Turner wrote: When building packages these days I keep getting warnings from R CMD build to the effect that INDEX is not up to date. The INDEXes always seem to be up do to date to *me*. Then I thought to compare the INDEX from the package source with the INDEX in

Re: [R] remove data frame from list of data frames

2010-11-07 Thread Henrique Dallazuanna
Try this also: ls[colSums(sapply(ls, '[[', 'Acc')) 0] On Sun, Nov 7, 2010 at 9:07 AM, Matthew Finkbeiner matthew.finkbei...@mq.edu.au wrote: I have a list of data frames like this: a- data.frame(x=runif(10), y = runif(10), Acc = 1) b- data.frame(x=runif(10), y = runif(10), Acc = 0) ls-

Re: [R] can't load nlme on windoze 7

2010-11-07 Thread Mike Marchywka
Date: Sun, 7 Nov 2010 20:57:19 +0100 From: lig...@statistik.tu-dortmund.de To: marchy...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] can't load nlme on windoze 7 Trying R CMD INSTALL ...zip said that  unpackPkgZip was missing so

Re: [R] High Frequency Trading

2010-11-07 Thread fjpcaballero
Unless you can be more specific, for the 'pattern recognition' part I can only recommend you to take a look to the CRAN task views on Machine Learning, Clustering, Multivariate Statistics, and Finance. For the 'real time' part, I think it is fair to say that it is hard to get anything done in

Re: [R] stupid R tricks

2010-11-07 Thread Henrique Dallazuanna
See 'mode' argument in ls.str function. On Sun, Nov 7, 2010 at 2:40 PM, Carl Witthoft c...@witthoft.com wrote: Hi all, Just thought I'd post this (maybe) helpful tool I wrote. For people like me who are bad at keeping a clean environment, it's a time-saver. #simple command to get only one

Re: [R] Rdindex truncating titles?

2010-11-07 Thread Rolf Turner
On 8/11/2010, at 12:39 PM, Duncan Murdoch wrote: SNIP I think you need to give us the source to look at to see what's going on. Duncan Murdoch The same phenomenon can be observed for my Iso package which is available from CRAN. The diff results for Iso are like so: diff INDEX

[R] help! kennard-stone algorithm in soil.spec packages does not work for my dataset!!!

2010-11-07 Thread bbslover
http://r.789695.n4.nabble.com/file/n3031344/RSV.Rdata RSV.Rdata I want to split my dataset to training set and test set using kennard-stone(KS) algorithm, it is lucky there is R packages soil.spec to implement it. but when I used it to my dataset, it does not work, who can help me, how reasons

Re: [R] help! kennard-stone algorithm in soil.spec packages does not work for my dataset!!!

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 6:53 PM, bbslover wrote: http://r.789695.n4.nabble.com/file/n3031344/RSV.Rdata RSV.Rdata I want to split my dataset to training set and test set using kennard-stone(KS) algorithm, it is lucky there is R packages soil.spec to implement it. but when I used it to my

Re: [R] Rdindex truncating titles?

2010-11-07 Thread Duncan Murdoch
On 07/11/2010 6:55 PM, Rolf Turner wrote: On 8/11/2010, at 12:39 PM, Duncan Murdoch wrote: SNIP I think you need to give us the source to look at to see what's going on. Duncan Murdoch The same phenomenon can be observed for my Iso package which is available from CRAN. The diff

Re: [R] About 5.1 Arrays

2010-11-07 Thread Joshua Wiley
On Sat, Nov 6, 2010 at 7:38 AM, Stephen Liu sati...@yahoo.com wrote: Hi Joshua, Thanks for your advice. 1) Re your advice:-[quote] a3d , , 1 --- this is the first position of the third dimension ***THIS IS THE THIRD DIMENSION***     [,1] [,2] [,3] [,4]  --- positions 1, 2, 3, 4 of the

Re: [R] How is MissInfo calculated? (mitools)

2010-11-07 Thread John Fox
Dear Robin, You already have a literal answer to your question, which is to look at MIcombine.default, but this is just implements Rubin's rules for combining multiple imputations, which are described in most treatments of the subject. What's curious is that with only one missing observation

Re: [R] An example for predab.resample in r

2010-11-07 Thread Frank Harrell
predab.resample can be called by users but usually is not. It is called by calibrate.* and validate.* functions in the rms and Design packages (you neglected to say which package you were using; update to rms if using Design). The calibrate and validate functions make it easy to use .632.

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread thornbird
Hi thanks for quick reply. I am new to using R and still tried to figure out how to use Zoo package. Here is the code I have so far: library(zoo) colClasses - c(NULL, character, character, numeric, character, character, NULL) col.names - c(NA, webpage, item, value, day, date, NA) # z -

Re: [R] Rdindex truncating titles?

2010-11-07 Thread Rolf Turner
On 8/11/2010, at 1:24 PM, Duncan Murdoch wrote: SNIP ... The docs do say to limit the length of titles to 65 characters if possible; this is one place where it matters. SNIP The 65 character limit had not previously impinged itself upon my consciousness. Adhering to this

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread thornbird
Hi thanks for quick reply. I am new to using R and still tried to figure out how to use Zoo package. Here is the code I have so far: library(zoo) colClasses - c(NULL, character, character, numeric, character, character, NULL) col.names - c(NA, webpage, item, value, day, date, NA) # z -

[R] Exponent of sqr symmetric matrix

2010-11-07 Thread zhiji19
Dear R experts, I really have difficulty when I try to deal with this question. suppose X is a square symmetric matrix. The exponent of X is defined by the matrix limit as following: exp(X) = lim (I + X/n)^n, note: the limit is from n to infinite. How can I write R function for the above?

Re: [R] Exponent of sqr symmetric matrix

2010-11-07 Thread Dennis Murphy
Hi: Check out the expm package, particularly function expm(). HTH, Dennis On Sun, Nov 7, 2010 at 6:21 PM, zhiji19 zhij...@gmail.com wrote: Dear R experts, I really have difficulty when I try to deal with this question. suppose X is a square symmetric matrix. The exponent of X is defined

[R] R help: reorder columns in an xyplot

2010-11-07 Thread rent0009
Hello. First post, though I have read scores. Mostly i can solve my problems reading the archives, but I lack the vocabulary to ask this one right. Any social faux pais, I apologize. I am sure this is a very basic question and I am embarrassed to ask, but I spent several hours scouring the

Re: [R] R help: reorder columns in an xyplot

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 10:35 PM, rent0...@umn.edu wrote: Hello. First post, though I have read scores. Mostly i can solve my problems reading the archives, but I lack the vocabulary to ask this one right. Any social faux pais, I apologize. I am sure this is a very basic question and I am

Re: [R] R help: reorder columns in an xyplot

2010-11-07 Thread Michael Rentz
Mr. Dunlap and Dr. Winsemius: Thank you both for your very quick, very handy, and very correct response. That was it. I only wish I had broken down and admitted defeat and asked for help hours ago. That was indeed what I needed, now the before does indeed come before the after! Thanks

[R] conditional probability

2010-11-07 Thread Jumlong Vongprasert
Dear all I have problem with calculate probability, I have data x1,...,x10, I want to calculate probability x11 given x1,...,x10 with two conditions. 1. x is normal 2. unknow distribution How I can do this. Many Thanks. Jumlong -- Jumlong Vongprasert

[R] unknown dimensions for loglm

2010-11-07 Thread Jason Hwa
Dear R-help community, I am working with multidimensional contingency tables and I am having trouble getting loglm to run on all dimensions without typing out each dimension. I have generated random data and provided output for the results I want below: d1.c1 - rnorm(20, .10, .02) d1.c2 -

[R] Rserve causes Perl error

2010-11-07 Thread Ralf B
Hi all, I tried to run Rserve: I installed it from CRAN using install.packages(Rserve) and tried to run it from the command line using: R CMD Rserve I am getting an error telling me that the command perl cannot be found. What is wrong and what can I do to fix this? Do I need to install any

[R] RMark error: only 0's may be mixed with negative subscripts

2010-11-07 Thread Umesh Srinivasan
Hi all, I have just started using RMark to analyse capture-recapture data. I am trying to analyse a simulated data set using the Robust Design (two primary periods with three secondary sessions in each) to estimate apparent survival. On specifying the time intervals (that tell R about the primary