Re: [R] GSEA package error

2012-11-29 Thread Pascal Oettli
Hello, For clarification, is it 'GSEA' or 'GSCA' package? And from where did you get it? Regards, Pascal Le 29/11/2012 07:59, Seb a écrit : Dear R gurus I’m trying to use the GSCA package to a series of microarray data (prostate cancer normal vs tumor (29 vs 29 paired)) but I’m running

Re: [R] in Rd documentation, line breaks in code blocks?

2012-11-29 Thread Ulrich Staudinger
Have it for now ... \preformatted{ .. } does the job. On Wed, Nov 28, 2012 at 9:21 PM, Ulrich Staudinger ustaudin...@gmail.com wrote: Hi everyone, following the gentle advice from this list, I write a package description Rd file. I have a section in there. In this section, I have a

Re: [R] Can you turn a string into a (working) symbol?

2012-11-29 Thread R. Michael Weylandt
On Wed, Nov 28, 2012 at 3:06 AM, andrewH ahoer...@rprogress.org wrote: Dear Michael – This is _very_ interesting and I want to play around with the functions you suggest. I had no idea it was so easy to define assignment operators. However, one question: even after reading the “get”

Re: [R] Windows 8 stability

2012-11-29 Thread Duncan Murdoch
On 12-11-28 5:00 PM, Nelson Chen wrote: My version of R (2.15.2), 64 bit version, has been crashing sporadically running under newly upgraded Windows 8. I suspect it may be some sort of memory allocation issue. Does anyone know of ways one can diagnose and fix this problem? Thanks. How to

[R] Fwd: Re: choose folder interactively

2012-11-29 Thread Ivan Calandra
Thanks Philippe for your answer! It doesn't work for me, but I guess I have something wrong with Tcl/Tk. Ivan -- Ivan CALANDRA Université de Bourgogne UMR CNRS/uB 6282 Biogéosciences 6 Boulevard Gabriel 21000 Dijon, FRANCE +33(0)3.80.39.63.06 ivan.calan...@u-bourgogne.fr

[R] [R-pkgs] New package gdimap

2012-11-29 Thread Adelino Silva
Dear list, A new package gdimap titled Generalized Diffusion Magnetic Resonance Imaging is now available on CRAN. Best wishes, Adelino [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-project.org

Re: [R] Plot with residuals in mgcv

2012-11-29 Thread Simon Wood
Hi Silje, Thanks for this. I guess RUTE is a numeric variable in this model and hence only has one associated random coefficient? This then causes a problem when calling predict.gam as part of processing 'residuals=T'. I've fixed the problem for the next release, but did you really want a

Re: [R] Problem with Stationary Bootstrap

2012-11-29 Thread Rui Barradas
Hello, You should post to the list, not just send your questions to me. If you Cc the list the odds of getting more and better answers are bigger. As for your question, 1. You forgot a variable X1, like this your code doesn't run. In what follows I assume it's also a runif(40, 0, 20). 2.

Re: [R] error, R commends cannot show the expected output

2012-11-29 Thread John Kane
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example John Kane Kingston ON Canada -Original Message- From: dtustud...@hotmail.com Sent: Wed, 28 Nov 2012 18:38:46 -0700 To: michael.weyla...@gmail.com Subject: Re: [R] error, R commends cannot show

Re: [R] Order function

2012-11-29 Thread John Kane
This is not a homework help list and it is even less a homework help list when there is no clear statement of the problem. I'd suggest reading something about how R works -there are some very good tutorials and introductions listed on the R site, and then perhaps coming back here if you have a

Re: [R] Confidence intervals for estimates of all independent variables in WLS regression

2012-11-29 Thread Rui Barradas
Hello, Try the following function. ci_lm - function(object, level = 0.95){ summfit - summary(object) beta - summfit$coefficients[, 1] se - summfit$coefficients[, 2] df - summfit$df[1] alpha - 1 - level lower - beta + qt(alpha/2, df = df)*se upper - beta + qt(1

Re: [R] Conditional model in R

2012-11-29 Thread Jean V Adams
Kirsten, The overall model is the combination of both models. If you call the parameter estimates from the logistic regression betas and the parameter estimates from the linear regression alpha, you could write the predictive equation something like this (ignoring error terms): cover

Re: [R] error, R commends cannot show the expected output

2012-11-29 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jack Bryan Sent: Thursday, November 29, 2012 2:39 AM To: michael.weyla...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] error, R commends cannot show the expected

Re: [R] Order function

2012-11-29 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of maths123 Sent: Wednesday, November 28, 2012 9:11 PM To: r-help@r-project.org Subject: Re: [R] Order function And yes I want the variable 1 to have the identifier 1 etc.

Re: [R] Factor function for coded numerical values

2012-11-29 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of maths123 Sent: Monday, November 26, 2012 8:25 PM To: r-help@r-project.org Subject: Re: [R] Factor function for coded numerical values The question says that there is an

Re: [R] some help

2012-11-29 Thread PIKAL Petr
Hi Maybe you could use stack(dat) or melt(dat) from reshape package. Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of dattel_palme Sent: Monday, November 26, 2012 12:13 PM To: r-help@r-project.org Subject: Re:

Re: [R] Can R be embedded in html?

2012-11-29 Thread Jagat.K.Sheth
Try R package 'brew'? From its package description Description:brew implements a templating framework for mixing text and R code for report generation. brew template syntax is similar to PHP, Ruby's erb module, Java Server

[R] splitting a string by space except when contained within quotes

2012-11-29 Thread downtowater
I've been trying to split a space delimited string with double-quotes in R for some time but without success. An example of a string is as follows: /rainfall snowfall Channel storage Rivulet storage/ It's important for us because these are column headings that must match the subsequent data.

[R] RGtk2 widget font changing

2012-11-29 Thread KRISHNA2222
I am developing A Gui using RGtk2 package. I wanted to know how the font attributes of names of widgets like menu bar, text, label etc. are changed. i mean to have menu bar item bold, italic and some specific size etc. Is there a need to create a style using PANGO library??? Krishna -- View

Re: [R] How to handle Chinese character in R plot?

2012-11-29 Thread Manish Gupta
Hi, I m working on R plot with Russian label but on windows (adobe) russian text are not visible. Do i need to install some package to view it. pdf(sample.pdf,width = 6.6 ,height = 4.2,family= URWHelvetica, encoding=KOI8-R) x-c(1,2,3,4,5) y-c(2,3,4,5,6)

Re: [R] remove NA or 0 values

2012-11-29 Thread sudhi rao
df - df[-which(is.na(df$Field)), ] - removing rows with NULL fields df - df[-which(df$Field == ), ] - removing rows with empty fields On Wednesday, November 28, 2012 2:23:00 PM UTC+5:30, catalin roibu wrote: Dear R users, I want to remove zero's or NA values after this model. year

[R] deleting data of a given date range.

2012-11-29 Thread siddanth911
hey, I have a huge dataset with over 30 rows which contains data about something from 2009-2012. does anyone know how i can delete all the rows which contain data from 2009 and only have data from 2010-2012??? is there a particular function i can use on the date column so that all data from

[R] Survreg Problem

2012-11-29 Thread Lumar
Hello community, I have a problem with my survreg function in R-Statistics. My created code is the following: library(survival) surv=Surv(IPT_IN_DAYS,Status) survival.data.weibull=survreg(surv~AGE_DAYS+KM_COUNT+LL_PER_DAY+IPT_HIS+IPT_SDEV, data=spss, dist=weibull, scale=2.0)

[R] worldmap_region/country problem

2012-11-29 Thread anna . fechner
Dear R community, I'm trying to graphically illustrate my data with a worlmap. Unfortunately, my data is partly on country basis and partly on regional basis (e.g. certain African countries are aggregated to one region). I am using the package rwoldmap. The data on country basis can be

[R] Label axis with strings instead of numbers

2012-11-29 Thread seanlilley
I have created a bubble plot in R using the following formula: symbols(Data$Day.Number,Data$Team,circles=Data$Total.amount, inches=0.5, fg=white,bg=red,xlab=Day Number,ylab=Team) The data set is called Data, and I have the columns Day.Number, Team and Total.amount. The data is plotting fine,

[R] libary survival

2012-11-29 Thread Thiago Luiz Nogueira da Silva
Hello,I would like to know if there is residue analysis after the Cox model and make the adjustment for my random cluster? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] comparing two vectors

2012-11-29 Thread soham chakraborty
Hello, I am performing Newton Raphson iteration where the parameter vector which I want to optimize is an *nx1* vector. I am running a while loop which will continue unless a stopping condition is satisfied Now, the stopping condition will have to be such that the parameter vector after two

Re: [R] Error 0ps.factor: level sets of factors are different

2012-11-29 Thread arun
Hi, You could do this with ?merge() or ?join() library(plyr) new-data.frame(ID=1:10,height1=NA) combo-data.frame(ID=c(3,7,9,10),height=c(185,NA,158,176))  join(new,combo,type=left)[,-2] #Joining by: ID  #  ID height #1   1 NA #2   2 NA #3   3    185 #4   4 NA #5   5 NA #6   6

Re: [R] Conditional model in R

2012-11-29 Thread Kirsten Martin
Jean, Thank you! That is exactly the type of information I was looking for! The script for the combined model is what I couldn't seem to come up with on my own. Thank you again for your help! Sincerely, Kirsten -- View this message in context:

[R] Simper analysis with Morisita-Horn

2012-11-29 Thread VG
Dear ecology fellows, I tried to implement Morisita-Horn distance (instead of Bray that is in the current version) in the code for the Simper analysis in vegan. I would be very grateful if someone can check if the code is right. function (comm, group, ...) { if (any(rowSums(comm, na.rm =

Re: [R] GLM Coding Issue

2012-11-29 Thread Craig P O'Connell
Thank you both for the extensive amount of help!  I am sorry it has taken me a bit to respond, but i've been trying to plug away at this.  I still have a few questions, if you don't mind giving me some pointers: Here is the fake data again: treatment feeding avoid

Re: [R] Calculating Linkage Disequilibrium for Microsatellite Markers?

2012-11-29 Thread david_c
Function LDkl of package gap. I am also trying to use it. -- View this message in context: http://r.789695.n4.nabble.com/Calculating-Linkage-Disequilibrium-for-Microsatellite-Markers-tp4642701p4651285.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] deleting data of a given date range.

2012-11-29 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of siddanth911 Sent: Thursday, November 29, 2012 12:10 PM To: r-help@r-project.org Subject: [R] deleting data of a given date range. hey, I have a huge dataset with over

Re: [R] Conditional model in R

2012-11-29 Thread Kirsten Martin
Thank you very much, I'll look into that package! Kirsten _ Kirsten Martin Von Holle Lab Department of Biology, BL 405 University of Central Florida Orlando, FL 32816 From: Jagat.K.Sheth [via R]

Re: [R] splitting a string by space except when contained within quotes

2012-11-29 Thread Gabor Grothendieck
On Thu, Nov 29, 2012 at 9:43 AM, downtowater downtowa...@yahoo.ca wrote: I've been trying to split a space delimited string with double-quotes in R for some time but without success. An example of a string is as follows: /rainfall snowfall Channel storage Rivulet storage/ It's important for

[R] QQplot

2012-11-29 Thread Nathan
Hi! http://r.789695.n4.nabble.com/file/n4651293/qq.png We are stuck with a problem considering the qqplot of a dataset. We are trying to discover what kind of distribution this is. We already tried to normal, exponential or the logaritmical distribution but none of those are able to solve our

Re: [R] Label axis with strings instead of numbers

2012-11-29 Thread Rui Barradas
Hello, See the ?axis function, argument 'labels'. Hope this helps, Rui Barradas Em 29-11-2012 12:20, seanlilley escreveu: I have created a bubble plot in R using the following formula: symbols(Data$Day.Number,Data$Team,circles=Data$Total.amount, inches=0.5, fg=white,bg=red,xlab=Day

Re: [R] splitting a string by space except when contained within quotes

2012-11-29 Thread William Dunlap
Try using scan(quote='', ...), as in the following str - 'rainfall snowfall Channel storage Rivulet storage' scan(text=str, what=, quote='', quiet=TRUE) [1] rainfallsnowfallChannel storage Rivulet storage Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com

[R] bootstrapped cox regression (rms package)

2012-11-29 Thread Eric Claus
Hi, I am trying to convert a colleague from using SPSS to R, but am having trouble generating a result that is similar enough to a bootstrapped cox regression analysis that was run in SPSS. I tried unsuccessfully with bootcens, but have had some success with the bootcov function in the rms

Re: [R] How to handle Chinese [It seems Cyrillic] character in R plot?

2012-11-29 Thread Prof Brian Ripley
Your subject line says Chinese! On 29/11/2012 08:42, Manish Gupta wrote: Hi, I m working on R plot with Russian label but on windows (adobe) russian text are not visible. Do i need to install some package to view it. pdf(sample.pdf,width = 6.6 ,height = 4.2,family= URWHelvetica,

Re: [R] Label axis with strings instead of numbers

2012-11-29 Thread seanlilley
Hi, The axis function plots an axis ontop of my current axis. So although I am able to write my labels in, they are written ontop of the numbers in the current axis rather than replacing them. Any other alternatives? Sean -- View this message in context:

Re: [R] comparing two vectors

2012-11-29 Thread Berend Hasselman
On 29-11-2012, at 14:28, soham chakraborty wrote: Hello, I am performing Newton Raphson iteration where the parameter vector which I want to optimize is an *nx1* vector. Are you trying to solve a system of nonlinear equations? Have a look at package nleqslv. Are you max-/min-imizing a

Re: [R] Can R be embedded in html?

2012-11-29 Thread Gergely Daróczi
I grab the opportunity to suggest giving a try `pander` package, which holds a forked version of `brew` called `Pandoc.brew`. If you are familiar with `brew`, you could easily create nicely formatted HTML output automatically beside other formats, example:

Re: [R] splitting a string by space except when contained within quotes

2012-11-29 Thread arun
Hi, May be this helps: str1 - 'rainfall snowfall Channel storage Rivulet storage' res-unlist(strsplit(gsub([\],,str1), ))  res1-c(res[1],res[2],paste(res[3],res[4],),paste(res[5],res[6],collapse=))  res1 #[1] rainfall snowfall Channel storage Rivulet storage A.K. -

Re: [R] splitting a string by space except when contained within quotes

2012-11-29 Thread arun
Hi, You could also do this:  res-unlist(strsplit(str,[\]))  res1-res[res!= ] res2-c(unlist(strsplit(res1[grepl(\\s+$,res1)], )),res1[!grepl(\\s+$,res1)]) res2 #[1] rainfall    snowfall    Channel storage Rivulet storage A.K. - Original Message - From: downtowater

[R] Deleting certain observations (and their imprint?)

2012-11-29 Thread Stodola, Kirk
I'm manipulating a large dataset and need to eliminate some observations based on specific identifiers. This isn't a problem in and of itself (using which.. or subset..) but an imprint of the deleted observations seem to remain, even though they have 0 observations. This is causing me

Re: [R] GSCA package error

2012-11-29 Thread Seb
it's the GSCA packagei made a typo in the subject, my apologies the package is available from here http://www.biostat.wisc.edu/~kendzior/GSCA/ i am now trying to do co-expression analysis using EBcoexpress but looks like i have a similar problem due to the sample size! thanks! -- View

Re: [R] QQplot

2012-11-29 Thread FJ M
Have you tried fitting your data to the Pearson family of distributions? In particular the Pearson Type IV has parameters to fit skewed and kurtotic distributions. The Pearson library is described here: http://cran.r-project.org/web/packages/PearsonDS/PearsonDS.pdf The Type IV is described

Re: [R] Deleting certain observations (and their imprint?)

2012-11-29 Thread Sarah Goslee
Hi Kirk, It's because tension is a factor with three levels, as you could see with str(warpbreaks). Factors are one of the mysteries of R that distinguish a novice from an initiate. Reading ?subset directs you to ?droplevels. Here's an example: summary(warpbreaks) breaks wool

[R] How to use doSMP(revoIPC) with R 2.15.x version

2012-11-29 Thread 박상규
Hello, I'd like to use package 'doSMP'. But I can only found source codes in the CRAN. I tried to build source code using 'r CMD build doSMP' in the source directory, the following error is shown: ERROR: dependencies 'foreach', 'iterators', 'revoIPC' are not available for pack age 'doSMP'

[R] knitr error with Lyx

2012-11-29 Thread Mark Lamias
R Users, I just upgraded my version of R from R-2.15.0 to R-2.15.2 and installed the latest versions of LyX and MikTex running Windows 7 Ultimate, 64-bit OS.  Prior to the upgrade, I was using Lyx with knitr to generate a document with no problems.  However, after the upgrade, and using the

Re: [R] Label axis with strings instead of numbers

2012-11-29 Thread Rui Barradas
Hello, Use argument yaxt = n of function symbols. yaxt means y axis type and n for none (or no). Then plot the axis with axis(2, ...) Hope this helps, Rui Barradas Em 29-11-2012 16:17, seanlilley escreveu: Hi, The axis function plots an axis ontop of my current axis. So although I am able

[R] What am I missing when using zoo on version 2.15?

2012-11-29 Thread Eduardo M. A. M.Mendes
Hello I am running R versions 2.13 and 2.15. One of my codes run ok on 2.13 but on 2.15. I have tried to understand what is wrong but come up with nothing. Here is the code rm(list=ls()) graphics.off() library(R.matlab) library(zoo); library(xts); library(lattice);

Re: [R] RGL plot : cex and zlim arguments do not work

2012-11-29 Thread Stephane Chantepie
Hi Ducan and others, I am sorry for this such late reply but I did not see that I had a reply... I have not solved the problem text3d(1:3, 1:3, 1:3, LETTERS[1:3], cex=1:3) does not work for me Maybe it is related to my material, I am on linux debian Sys.info() sysname Linux release

[R] Fast Normalize by Group

2012-11-29 Thread Noah Silverman
Hi, I have a very large data set (aprox. 100,000 rows.) The data comes from around 10,000 groups with about 10 entered per group. The values are in one column, the group ID is an integer in the second column. I want to normalize the values by group: for(g in unique(groups){

Re: [R] knitr error with Lyx

2012-11-29 Thread Yihui Xie
Quite a few people have had this problem, but since I'm unable to reproduce it, I'm not exactly sure how to fix it either. A few references that might be helpful to you: http://stackoverflow.com/q/12448507/559676 https://github.com/yihui/knitr/issues/413 It is very likely to be a pure LaTeX

Re: [R] Fast Normalize by Group

2012-11-29 Thread Peter Langfelder
Not tested but should work: sums = tapply(x, group, sum); sums.ext = sums[ match(group, names(sums))] normalized = x/sums.ext It may be that the tapply is just as slow as your loop though, I'm not sure. HTH, Peter On Thu, Nov 29, 2012 at 10:55 AM, Noah Silverman noahsilver...@ucla.edu wrote:

Re: [R] Fast Normalize by Group

2012-11-29 Thread Mikołaj Hnatiuk
Yes, type in: ?by for example: data - data.frame(fac=factor(c(A,A,B,B)), vec=c(1:4) ) by(data$vec,data$fac, FUN=sum) Best, Mikołaj Hnatiuk 2012/11/29 Noah Silverman noahsilver...@ucla.edu Hi, I have a very large data set (aprox. 100,000 rows.) The data comes from around 10,000 groups

Re: [R] Fast Normalize by Group

2012-11-29 Thread Rui Barradas
Hello, If yopu want one value per group use tapply(), if you want one value per value of x use ave() tapply(x, group, FUN = function(.x) .x/sum(.x)) ave(x, group, FUN = function(.x) .x/sum(.x)) Hope this helps, Rui Barradas Em 29-11-2012 18:55, Noah Silverman escreveu: Hi, I have a very

Re: [R] Fast Normalize by Group

2012-11-29 Thread jim holtman
try the 'data.table' package. Takes about 0.1 seconds to normalize the data. x - data.frame(id = sample(1, 10, TRUE), value = runif(10)) require(data.table) Loading required package: data.table data.table 1.8.2 For help type: help(data.table) system.time({ + x - data.table(x)

Re: [R] Fast Normalize by Group

2012-11-29 Thread Noah Silverman
Close, but not quite what I need. That very nicely gives me sums by group. I need to take each value of X and divide it by the sum of the group it belongs to. With your example, I have 100,000 X and only 10,000 group. The by command gives me 10,000 sums. I still have to loop over all

Re: [R] Fast Normalize by Group

2012-11-29 Thread Berend Hasselman
On 29-11-2012, at 19:55, Noah Silverman wrote: Hi, I have a very large data set (aprox. 100,000 rows.) The data comes from around 10,000 groups with about 10 entered per group. The values are in one column, the group ID is an integer in the second column. I want to normalize the

Re: [R] Can R be embedded in html?

2012-11-29 Thread Yihui Xie
I did not read every reply; perhaps someone has already mentioned Shiny. There are a few live examples of embedding R in HTML here: http://www.rstudio.com/shiny/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] knitr error with Lyx

2012-11-29 Thread Mark Lamias
Thanks, Yihui! Luckily I kept R-2.15.0 and left it untouched (so I can continue to use that for now).  If it helps any, I was able to go back into Lyx and change the path to point to R-2.15.0 and I also changed the windows path environment variable to point to the old version.  After doing

Re: [R] Can R be embedded in html?

2012-11-29 Thread Mark Lamias
I haven't used it yet, so I can't comment about the stability or appropriateness of it, but R.NET looks somewhat promising for this: http://rdotnet.codeplex.com/ Shiny is another potential way to go. You could also take a look at David Firth's CGIwithR: 

Re: [R] RGL plot : cex and zlim arguments do not work

2012-11-29 Thread Duncan Murdoch
On 29/11/2012 1:34 PM, Stephane Chantepie wrote: Hi Ducan and others, I am sorry for this such late reply but I did not see that I had a reply... I have not solved the problem text3d(1:3, 1:3, 1:3, LETTERS[1:3], cex=1:3) does not work for me It works for me. Perhaps if you explained what

Re: [R] knitr error with Lyx

2012-11-29 Thread Yihui Xie
That is very helpful! Just to continue debugging, can you save the two versions of the tex files produced from LyX with different versions of R and do a diff on them? It sounds like something has changed from R 2.15.0 to 2.15.2. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465

Re: [R] RGL plot : cex and zlim arguments do not work

2012-11-29 Thread Stephane Chantepie
yes sorry, When we use this function text3d(1:3, 1:3, 1:3, LETTERS[1:3], cex=1:3) we expect the letters to have different size (increase from 1 to 3). But when I try this code , all the letter have the same size. This problem (to not be able to resize character) occurs with diiferent the

Re: [R] Weight matrix in linear regression

2012-11-29 Thread Greg Snow
The gls function in the nlme package is one approach. If you know the covariance matrix exactly (it is just numerical with nothing that needs to be estimated) then you can also take the Cholesky decomposition of the inverse of the covariance matrix (or other square root method) and multiply the x

[R] Read in alphanumeric column without decimals

2012-11-29 Thread Steven Ranney
All - How can I read in a column of alphanumeric values without including .0 on the numeric values? Original column: TeamLeaderID 258 342 316 U8 331 279 D1 116 235 296 ... [truncated] leaders = read.xlsx2('FILE', sheetIndex = 1, header = T) Column after it's been read in:

Re: [R] [R-pkgs] New package: gRain - gRAphical Independence Networks

2012-11-29 Thread fkh
I am trying to use your package gRain using your book on graphical models in R to do predictions, I have 38 columns of vectors all factors and built a bayesian network using iamb() function, then I used the following command to make a grpahNEL (However, I have 38 nodes and 106 edges) using

[R] Help in Bissection algorithm

2012-11-29 Thread finehko
I'm trying to make a function witch recieves a function f, a and b, and the error e. When I run the algorithm without labeling it a function and typing the values it works, but when I just try to save it in a function It doesn't ' bug but don't do anything. Here's the code, anyone know whats

[R] Coerce rownames to factor for ordering

2012-11-29 Thread LCOG1
Hi all, I think this might be an easy one but I cannot think of a way to do this other than what I am currently attempting. I simply want to sort my data frame's rownames by a defined vector so that the plots I generate from that vector are in the desired order Consider the test data below:

[R] Help

2012-11-29 Thread Mohammad Ahmed
Help Please Hello, I want to find the whole hat matrix not only the hat values. Is there anyway that could be extracted from lm function ?. If not, please suggest something else. Direct computations using chol2inv or solve are not stable if t(X)%*%X has   high determinant. In this case lm is

Re: [R] bootstrapped cox regression (rms package)

2012-11-29 Thread Frank Harrell
Eric, the output you showed for anova(out) is not correct. anova.rms does not produce such output. Please give us the correct script that obtained those results and let us know if you are overriding the anova command somehow. To your point, make sure that SPSS does not use the bootstrap to

Re: [R] deleting data of a given date range.

2012-11-29 Thread arun
Hi, You haven't given any example dataset.  So,not sure about the format of the date column. set.seed(5) dat1-data.frame(Date1=c(10/25/2009,11/25/2009,12/25/2009,5/10/2010,8/10/2010,9/25/2011,11/28/2011,5/3/2012),col2=sample(1:15,8,replace=TRUE)) dat1$Date1-as.Date(dat1$Date1,format=%m/%d/%Y)

[R] googleVis plot and knitr/sweave

2012-11-29 Thread Filoche
Dear R users. I'm currently making a report with knitr (RStudio) where I would like to plot a googleVis map. However, the map generated is an HTML file which I don't know how to integrate it in my report. So my question is how to include a map generated with googleVis in a PDF created with

Re: [R] Help in Bissection algorithm

2012-11-29 Thread Berend Hasselman
On 29-11-2012, at 16:18, finehko wrote: I'm trying to make a function witch recieves a function f, a and b, and the error e. When I run the algorithm without labeling it a function and typing the values it works, but when I just try to save it in a function It doesn't ' bug but don't do

Re: [R] Help in Bissection algorithm

2012-11-29 Thread Rui Barradas
Hello, Actually, it would throw an error, you forgot to assign 'i'. And in the end your function didn't have a return value. I've edited and simplified it a bit. (And what to do if abs(a - b) == e ? The second condition was deleted.) raiz - function(f,a,b,e){ i - 0 repeat{

Re: [R] Help in Bissection algorithm

2012-11-29 Thread William Dunlap
And have the function return a value. All values set in the function will be destroyed when the function is done - you must return something and the caller must assign the return value to a variable if you want to keep it. E.g., raiz function (f, a, b, e) { i - 0 repeat { if (i

Re: [R] Help

2012-11-29 Thread Rui Barradas
Hello, The following document is _not_ about lm(), it's about creating packages but it includes an example that might answer to what you want, a simple lm() substitute. (It uses the QR decomposition, not Cholesky) http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf Hope this

[R] Data Cleaning -New user coming from SAS

2012-11-29 Thread arum
Hello, this is my first post. I have a large CSV file where I need to fill in the 1st and 2nd column with a Loan # and Account name that would be found in a line of text : like this: ,,Loan #:,ML-113-07,Account Name:, Quilting Boutique,,, I would like to place the Loan #: ML-113-07 in the

[R] Analysis of Variance

2012-11-29 Thread David Arnold
Hi, I am encountering a difficulty I don't understand. Be patient, I'm very new to analysis of variance. If I load this data: example12_7=read.table(http://msemac.redwoods.edu/~darnold/math15/data/chapter12/example12_7.dat,header=TRUE) The run the oneway.test:

Re: [R] googleVis plot and knitr/sweave

2012-11-29 Thread Yihui Xie
I'm not aware of the possibility of embedding google vis in PDF: https://developers.google.com/chart/interactive/docs/gallery I do not think everything has to live in PDF, otherwise what is the point of HTML/JS and web browsers? Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465

Re: [R] Weight matrix in linear regression

2012-11-29 Thread Mikołaj Hnatiuk
Hello, is there a way to compute multilevel (3-stage) regression using weights matrix (on different levels, just like in HLM) in R ? The nlme package doesn't seem to get the job done. Do you have any suggestions ? I _really_ don't want to use HLM to do this. Best, Mikołaj Hnatiuk 2012/11/29 Greg

Re: [R] libary survival

2012-11-29 Thread David Winsemius
On Nov 29, 2012, at 5:18 AM, Thiago Luiz Nogueira da Silva wrote: Hello,I would like to know if there is residue analysis after the Cox model and make the adjustment for my random cluster? Is this in 'coxme' or in 'survival'. If in 'survival' then there are residuals functions and when I

Re: [R] Conditional model in R

2012-11-29 Thread David Winsemius
On Nov 28, 2012, at 11:32 AM, Kirsten Martin wrote: Hello all, I have a data set where the response variable is the percent cover of a specific plant (represented in cover classes 0,1,2,3,4,5, or 6). This data set has a lot of zeros (plots where the plant was not present). I am trying

Re: [R] error, R commends cannot show the expected output

2012-11-29 Thread David Winsemius
On Nov 28, 2012, at 5:43 PM, Jack Bryan wrote: I run You are asked to state which OS and version of R you are using. cars - c(1, 3, 6, 4, 9) plot(cars) When this happens and you add: dev.new() ### Do you then see a plot with: plot(cars)# ??? -- David No graph pops up.

Re: [R] Help in Bissection algorithm

2012-11-29 Thread jim holtman
What is 'i'? I don't see it as a parameter? is it something in the global environment that you forgot to pass? On Thu, Nov 29, 2012 at 10:18 AM, finehko j9...@hotmail.com wrote: I'm trying to make a function witch recieves a function f, a and b, and the error e. When I run the algorithm

Re: [R] Analysis of Variance

2012-11-29 Thread Andrés Aragón Martínez
Hi D, R is taking drug as numeric, you ned indicate to R that drug is a factor: example12_7$drug -factor(example12_7$drug) ej2-aov(time~drug,data=example12_7) summary(ej2) Df Sum Sq Mean Sq F value Pr(F) drug 2 21.98 10.991 4.188 0.0345 * Residuals 16 41.99

Re: [R] Read in alphanumeric column without decimals

2012-11-29 Thread jim holtman
Your problem is the the data read in from the spreadsheet is probably a 'factor' since it has a non-numeric in the column. To change it to number you have to do the following as.numeric(as.character(yourdata$TeamLeaderID)) What you as seeing with just the call to as.numeric is the value of the

Re: [R] Read in alphanumeric column without decimals

2012-11-29 Thread Steven Ranney
Thanks for the replies. I hadn't considered changing the original spreadsheet to a table as there are several different analyses using the .xlsx spreadsheet that contains the alphanumeric data, thus requiring an alteration of all of our code. However, the first response did prompt me to try

[R] How to subtract the counter i in for loop?

2012-11-29 Thread C W
Hi list, I am writing a for loop that looks like this: samples-rep(NA,10) x - rep(c(111, 225), 5) for(i in 1:10){ If(x[i]200){ samples[i] - x[i] }else{ i=i-1 } } The problem is that the returning vector still contains NA, I think the i in else is not getting

Re: [R] Analysis of Variance

2012-11-29 Thread arun
HI, Try this:  res2-aov(time~factor(drug),data=example12_7)  summary(res2) # Df Sum Sq Mean Sq F value Pr(F)  #factor(drug)  2  21.98  10.991   4.188 0.0345 * #Residuals    16  41.99   2.624 #--- #Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 A.K.

Re: [R] knitr error with Lyx

2012-11-29 Thread Mark Lamias
Hi, Yihui, Attached is an HTML Diff report of the two files.  The left pane contains the R-2.15.0 file. Thanks. --Mark From: Yihui Xie x...@yihui.name To: Mark Lamias mlam...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Thursday,

Re: [R] bootstrapped cox regression (rms package)

2012-11-29 Thread Eric Claus
Hi Frank, Below is the actual output from the anova(out) command. I had copied in the p-values and from the previous output from anova(out) and the confidence intervals from print(quantile(out$boot.Coef[,i], c(.025, .975))) to illustrate that the confidence intervals were similar to SPSS while

[R] instrumental variables regression using ivreg (AER) or tsls (sem)

2012-11-29 Thread Ranjan Maitra
Dear friends, I am trying to understand and implement instrumental variables regression using R. I found a small (simple) example here which purportedly illustrates the mechanics (using 2-stage least-squares): http://www.r-bloggers.com/a-simple-instrumental-variables-problem/ Basically, here

Re: [R] How to subtract the counter i in for loop?

2012-11-29 Thread Jean V Adams
Mike, Based on this example, what do you want samples to look like? It's not clear to me what you're trying to do with i-1 Jean C W tmrs...@gmail.com wrote on 11/29/2012 03:55:12 PM: Hi list, I am writing a for loop that looks like this: samples-rep(NA,10) x -

Re: [R] How to subtract the counter i in for loop?

2012-11-29 Thread Jeff Newmiller
Use a while loop instead of a for loop. I don't think what you have coded makes any sense, but fighting the for loop over control of the indexing variable is a recipe for failure. --- Jeff Newmiller

Re: [R] How to subtract the counter i in for loop?

2012-11-29 Thread David Winsemius
On Nov 29, 2012, at 1:55 PM, C W wrote: Hi list, I am writing a for loop that looks like this: samples-rep(NA,10) x - rep(c(111, 225), 5) for(i in 1:10){ If(x[i]200){ samples[i] - x[i] }else{ i=i-1 If you expected the else clause to assign something to the samples

  1   2   >