Re: [R] Bootstrapping issues

2012-11-14 Thread PIKAL Petr
Hi Just a copy :-) Answers please! Anyway, did my answer resolve your issue? Petr From: Clive Nicholas [mailto:cliveli...@googlemail.com] Sent: Wednesday, November 14, 2012 4:07 AM To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] Bootstrapping issues Thank you for your answer - I will

[R] aggregate combination data

2012-11-14 Thread catalin roibu
Dear R users, I want to aggregate all *d *data from all combination of n *plots* taken by k. Thank very much! My data is like that: plot d 1 14 1 13 1 12 1 14 1 18 1 20 1 21 1 43 1 108 1 43 2 41 2 61 2 83 2 61 2 84 2 45 2 21 2 12 2 11 ... 100 10

Re: [R] aggregate combination data

2012-11-14 Thread Rui Barradas
Hello, Please use ?dput to post your data. dput(MyData) # paste the output of this in a post. And you must be more clear, what does aggregate mean? To sum? In the mean time see ?combn Hope this helps, Rui Barradas Em 14-11-2012 11:11, catalin roibu escreveu: Dear R users, I want to

Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-14 Thread Anthony Damico
Hi Andrew, great to hear from you :) You really ought to review the (100% R-specific) US Government Survey Datasets already available at http://usgsd.blogspot.com/ and contact me directly if you hit a problem -- I am furiously working on a few right now (ACS, SIPP, BSAPUFs, BRFSS, MEPS) , and am

Re: [R] Macro Variable in R

2012-11-14 Thread John Kane
Not a specific answer to your question but have you seen www.et.bs.ehu.es/~etptupaf/pub/R/RforSASSPSSusers.pdf. If you are just starting to use R it is a very handy reference on the differences and similarities among the packages. John Kane Kingston ON Canada -Original Message-

[R] [R-pkgs] Rcpp 0.10.0

2012-11-14 Thread Dirk Eddelbuettel
A new release 0.10.0 of Rcpp is now on CRAN, bringing a number of new features to R --- please see the announcement text below. The most direct change may be what we call 'Rcpp attributes' and which is described in a new vignette bringing the total to nine vignettes in the package. Dirk, on

Re: [R] aggregate combination data

2012-11-14 Thread Rui Barradas
Hello, You forgot to Cc the list. As for your question, you want all possible combinations of rows? For all possible values of k in 1:19? sum(sapply(1:19, function(k) choose(19, k))) [1] 524287 Or you want to split the data.frame by plot and the have all possible combinations?

[R] devtools - document() weiredness

2012-11-14 Thread Johannes Graumann
Hello, Please try this: library(devtools) create(mdaa) setwd(mdaa) dev_mode() d install() Produces ...* DONE (mdaa) Reloading installed mdaa But when I then try to build documentation d document() devtools/roxygen just hangs with a ? like so: Updating mdaa documentation Loading mdaa ? I

Re: [R] How to filter xml value in R?

2012-11-14 Thread Ben Tupper
Hi, On Nov 13, 2012, at 11:55 PM, Manish Gupta wrote: Hi, I have one xml file. Class Node1 code =1 First node /Node1 Node2 code =1 Second node /Node2 Node3 code =1 Third node /Node3 Node1 code =2 Fourth node /Node1 /Class for (i in 1:xmlSize()) {

Re: [R] aggregate combination data

2012-11-14 Thread Rui Barradas
Hello, This will give you a list of 19 elements, each element k is a matrix of all combinations of 19 taken k at a time. cmb - lapply(seq_len(nrow(dat)), function(k) combn(nrow(dat), k)) d - dat[[d]] lapply(cmb, function(cc) apply(cc, 2, function(j) d[j])) Hope this helps, Rui Barradas Em

Re: [R] aggregate combination data

2012-11-14 Thread Rui Barradas
Hello, Try the following. fun - function(x, k){ n - length(x) cmb - combn(n, k) apply(cmb, 2, function(j) x[j]) } uplot - unique(dat$plot) fun(uplot, 2) Hope this helps, Rui Barradas Em 14-11-2012 13:42, catalin roibu escreveu: Hello again, I want the individual plots

[R] reversing distance matrix for original values

2012-11-14 Thread eliza botto
dear useRs, i created a distance matrix, of certain voltage values. unfortunately, i lost the original values. i am only left with the distance matrix that i created from those values. i wanted to ask that is there a way in R to reverse distance matrix for the original values? thanks in

Re: [R] reversing distance matrix for original values

2012-11-14 Thread Sarah Goslee
Hi Eliza, On Wed, Nov 14, 2012 at 9:33 AM, eliza botto eliza_bo...@hotmail.com wrote: dear useRs, i created a distance matrix, of certain voltage values. unfortunately, i lost the original values. i am only left with the distance matrix that i created from those values. i wanted to ask

Re: [R] reversing distance matrix for original values

2012-11-14 Thread eliza botto
thnx sarah!!!thnx for saving my time regardseliza Date: Wed, 14 Nov 2012 09:44:58 -0500 Subject: Re: [R] reversing distance matrix for original values From: sarah.gos...@gmail.com To: eliza_bo...@hotmail.com CC: r-help@r-project.org Hi Eliza, On Wed, Nov 14, 2012 at 9:33 AM, eliza

Re: [R] Can't format x axis on a stacked plot of a zoo object

2012-11-14 Thread Jose Iparraguirre
Hi, Have a look at this example in plot.zoo: ## Custom x axis labelling using a custom panel. # 1. test data z - zoo(c(21, 34, 33, 41, 39, 38, 37, 28, 33, 40), as.Date(c(1992-01-10, 1992-01-17, 1992-01-24, 1992-01-31, 1992-02-07, 1992-02-14, 1992-02-21, 1992-02-28, 1992-03-06,

Re: [R] reversing distance matrix for original values

2012-11-14 Thread Prof Brian Ripley
On 14/11/2012 14:33, eliza botto wrote: dear useRs, i created a distance matrix, of certain voltage values. unfortunately, i lost the original values. i am only left with the distance matrix that i created from those values. i wanted to ask that is there a way in R to reverse distance matrix

Re: [R] reversing distance matrix for original values

2012-11-14 Thread David L Carlson
You might reconstruct the values if you have some of the original data. Metric multidimensional scaling (cmdscale) will give you a set of values that produces your distance matrix. If it is based on a single voltage, you only have one dimension to reconstruct. There are an infinite number of sets

Re: [R] devtools - document() weiredness

2012-11-14 Thread Hadley Wickham
I know this scenario is strange as there's no roxygenizable stuff in the package, but I am trying to track down an identical error in one of my nascent packages and am wondering 1) where this behavior originates and 2) why document() does not provide more informative feedback. See

[R] aggrete data from combination

2012-11-14 Thread catalin roibu
Dear R users, A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I want all diameters values for different combination of plots. For example I want all d values for all posible combination, 100C2 (all d values for plot 1 with all d values in the plot 2...with all d values

Re: [R] aggrete data from combination

2012-11-14 Thread ONKELINX, Thierry
You can use combn(100, 2) to generate the combinations of the plots. It is not clear to me what you want to do with the diameters. You have 4 diameter for plot 1 and 2 for plot 2. What should the output look like? ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute

[R] Jackknife in Logistic Regression

2012-11-14 Thread Lucas Chaparro
Dear R friends I´m interested into apply a Jackknife analysis to in order to quantify the uncertainty of my coefficients estimated by the logistic regression. I´m using a glm(family=’binomial’) because my independent variable is in 0 - 1 format. My dataset has 76000 obs, and I´m using 7

Re: [R] R exponential regression

2012-11-14 Thread muzammil786
I am having a similar problem on this data (given below). I have tried several starting values for a and b, but it is consistently giving me: fm - nls(y~f(x,a,b), data.frame(x,y), start=c(a=1,b=1)) Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced

Re: [R] problem in fitting model in NLS function

2012-11-14 Thread muzammil786
Dear David, I am having a similar problem on this data (given below). I have tried several starting values for a and b, but it is consistently giving me: *fm - nls(y~f(x,a,b), data.frame(x,y), start=c(a=1,b=1)) Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity

[R] heatmap with symbols

2012-11-14 Thread furor
Hi all, I've made a heatmap using '-', '=' and '+' as possible values. However, the heatmap itself shows more than three colors. How to avoid this? Thanks in advance. regards -- View this message in context: http://r.789695.n4.nabble.com/heatmap-with-symbols-tp4649472.html Sent from the R

[R] R wildcards, sapply and as.factor

2012-11-14 Thread Fg Nu
I want to change the type to factor of all variables in a data frame whose names match a certain pattern. So here I am trying to change the type to factor of all variables whose name begins with namestub in the dataframe df. attach(df)sapply(grep(glob2rx(namestub*),names(df)),as.factor) But this

[R] ctree

2012-11-14 Thread mia88
Hello, I plotted a nice tree with ctree . It shows 3 nodes with the prediction of my 2 groups. (see picture) Unfortunately I need a larger scale to read the exact prediction of my groups to get the specificity and sensitivity. I tried to change the scale with axis but it didn't work, my guess

Re: [R] numbering observations: help please!

2012-11-14 Thread arun
HI, Try this: my.data$item_Num- ave(my.data[,1],my.data[,1],FUN=seq_along) head(my.data) #  person item_Num #1      1        1 #2      1        2 #3      1        3 #4      1        4 #5      2        1 #6      2        2 #or,

[R] Generating autogressive model in R

2012-11-14 Thread john james
Dear R users, Please help me with the following problem. I have a data set of the form ´dat´   dat - data.frame(id = seq(1:5), trt=c(0,0,1,1,1),tid=c(0,0,0,0,0),   ntid=c(0,0,0,0,0))   The function auto is used to generate the autoregressive model:   auto -

[R] SIAR: problem session aborted

2012-11-14 Thread Jeltje
I'm absolutely not brilliant with R yet and working with package SIAR. 1) SIAR reads the first column of a table.txt as int instead of num. Who can help? 2) I therefore made tables with a data.frame() that seems to work. But at the end of the loading proces of the SIARmodel, I get a warning

[R] Switch Groups in ehplot (x-axis)

2012-11-14 Thread DusanP
Hello everyone, I would like to switch the place of the Groups in the ehplot function. When I put my data (one vector) in a certain order for the data vector of ehplot function, the plot doesn't show me data in the order which I indicated. How to change that? I have one vector for data and one

[R] error data frame

2012-11-14 Thread Sonja69
Hallo everybody! I am trying to perform a TiTAN (Baker King 2010) analysis with R 2.14.1. I have come that far: h89Abund - read.csv(Fish89Abund.csv) names (Fish89Abund) [1] StationCodeAbramisbrama Alburnoidesbipunctatus Alburnusalburnus [5]

Re: [R] save/load and package namespaces

2012-11-14 Thread Jamie Olson
Thanks, I'd started to look through serialize.c but got a bit lost. Thanks again! Jamie Olson On Tue, Nov 13, 2012 at 2:12 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 13/11/2012 1:45 PM, Jamie Olson wrote: Correct me if I'm wrong, but it also seems that more generally, everything

Re: [R] how to import data from excel to R

2012-11-14 Thread shwetank
The simplest way, in my opinion is: save .xls file as .csv in ms excel save as option. csv means comma delimited. now type following command on R console; mydata-read.csv(file.choose()) this will open a dialog box will open and select your .csv file. now the data will

Re: [R] How to filter xml value in R?

2012-11-14 Thread Manish Gupta
Thanks! It works -- View this message in context: http://r.789695.n4.nabble.com/How-to-filter-xml-value-in-R-tp4649465p4649488.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] vectorized plotmath expressions via substitute()

2012-11-14 Thread Murat Tasan
hi all - i've seen versions of this question before, but none seem to get directly at my solving my (probably very simple) issue: i simply want to annotate the tick marks on an axis with (superscripted) 10^x notation, and tried this: axis(1, at = axTicks(1), as.expression(substitute(10^foo,

[R] indexing for Wilcoxon test

2012-11-14 Thread Jeffrey Stratford
Hi everyone, I've been asked to run a number of Wilcoxon tests on some behavioral data (below is a sample). They want me to compare each trial to the first trial, considered the control trial. I know I can use brackets to index and select, for example, trial 1 vs. trial 4 (not exactly sure how

[R] R in batch mode: cannot mkdir R_TempDir

2012-11-14 Thread capy_bara
Dear all, I am trying to run a simple R script in batch mode on a cluster. Running a simple test script with R CMD BATCH test.R test.Rout works fine, but as soon as I submit the very same command to the queue and the job gets sent to a node, the following error is written to test.Rout:

Re: [R] R wildcards, sapply and as.factor

2012-11-14 Thread arun
HI, Try this: df1-read.table(text= namestub1 namestub2 name1 name2 A1 B1 A11 B11 A1 B2 A11 B22 A2 B1 A22 B11 A2 B2 A22 B22 A3 B1 A33 B11 A3 B2 A33 B22 ,sep=,header=TRUE,stringsAsFactors=FALSE)  str(df1) #'data.frame':    6 obs. of  4 variables: # $ namestub1: chr  A1 A1 A2 A2 ... # $ namestub2:

Re: [R] how to import data from excel to R

2012-11-14 Thread jim holtman
Also checkout the XLConnect package since it can read/write EXCEL files directly so that you do not have to go through the step of creating a CSV file. Really nice when you want to create an Excel file with multiple worksheets containing different phases of your analysis. On Wed, Nov 14, 2012 at

Re: [R] vectorized plotmath expressions via substitute()

2012-11-14 Thread William Dunlap
I recommend using bquote(), with its .() substitution operator, instead of substitute any time you use plotmath.To make a vector of plotmath expressions use the following sort of as.expression(lapply(... bquote ...)) idiom: plot(1:10, axes=FALSE) at - axTicks(1) lab -

Re: [R] indexing for Wilcoxon test

2012-11-14 Thread Rui Barradas
Hello, Use ?dput to post data, like this it's unreadable. For instance, dput(Mydata) # paste the output of this in a post. Hope this helps, Rui Barradas Em 14-11-2012 15:58, Jeffrey Stratford escreveu: Hi everyone, I've been asked to run a number of Wilcoxon tests on some behavioral data

[R] install own package ?

2012-11-14 Thread Christian Hoffmann
what happens here: install.packages(/Users/hoffmann/R/cwhmisc_4.0.tar.gz,repos = NULL) Error: file '/Users/hoffmann/R/cwhmisc_4.0.tar.gz' is not an OS X binary package sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C attached

Re: [R] vectorized plotmath expressions via substitute()

2012-11-14 Thread Murat Tasan
awesome, works perfectly. LISP-iness to the rescue. thanks much! -m On Wed, Nov 14, 2012 at 12:26 PM, William Dunlap wdun...@tibco.com wrote: I recommend using bquote(), with its .() substitution operator, instead of substitute any time you use plotmath.To make a vector of plotmath

Re: [R] install own package ?

2012-11-14 Thread Marc Schwartz
On Nov 14, 2012, at 11:43 AM, Christian Hoffmann c-w.hoffm...@sunrise.ch wrote: what happens here: install.packages(/Users/hoffmann/R/cwhmisc_4.0.tar.gz,repos = NULL) Error: file '/Users/hoffmann/R/cwhmisc_4.0.tar.gz' is not an OS X binary package sessionInfo() R version 2.15.1

Re: [R] help formatting data for clustering

2012-11-14 Thread David Winsemius
On Nov 13, 2012, at 5:41 PM, arun wrote: Hi, You could also try: dta - read.table(text= 1 , 45 , 32, 45, 23 2 , 34 4, 11, 43, 45 ,sep=,,fill=TRUE) library(reshape) dtanew-reshape(dta,varying=2:5,v.name=brand,idvar=V1,direction=long)[,c(1,3)] It's a bit puzzling to see package

Re: [R] ctree

2012-11-14 Thread Achim Zeileis
On Wed, 14 Nov 2012, mia88 wrote: Hello, I plotted a nice tree with ctree . It shows 3 nodes with the prediction of my 2 groups. (see picture) Unfortunately I need a larger scale to read the exact prediction of my groups to get the specificity and sensitivity. I tried to change the scale with

Re: [R] Macro Variable in R

2012-11-14 Thread David Winsemius
On Nov 13, 2012, at 6:06 PM, SASandRlearn wrote: I have over 300 variables in my table. I want to choose only a handful of those variables to run through many procedures. Lm(), glm() etc..i have over 10 procedures that i need to run those variables everytime. Those handful of variables can

Re: [R] Switch Groups in ehplot (x-axis)

2012-11-14 Thread Peter Ehlers
On 2012-11-14 05:40, DusanP wrote: Hello everyone, I would like to switch the place of the Groups in the ehplot function. When I put my data (one vector) in a certain order for the data vector of ehplot function, the plot doesn't show me data in the order which I indicated. How to change

Re: [R] indexing for Wilcoxon test (take 2)

2012-11-14 Thread Rui Barradas
Hello, Thanks for the data example. Try the following. sp - split(dat, dat$trial) control - sp[[1]] lapply(sp[-1], function(x) wilcox.test(control[[removed]], x[[removed]])) Hope this helps, Rui Barradas Em 14-11-2012 18:01, Jeffrey Stratford escreveu: Hi everyone, I've been asked to run

Re: [R] RMySQL install on windows

2012-11-14 Thread sbarandiaran
Uwe, now I've tried these steps, following RMySQL installation instructions (http://cran.r-project.org/web/packages/RMySQL/INSTALL): 1. Download the RMySQL_0.9.tar.gz file to the folder C:\Program Files\R\R-2.15.1\bin\x64 2. Open a Windows command line, and change directory to that folder 3.

[R] ARIMA\GARCH forcasting

2012-11-14 Thread vinaybabug
Hi, I am new to using R and time series analysis in general. I have written code to combine ARIMA + GARCH in forcasting. I am finding it hard to actually get predicted values once I have model built and fit it to data series. i.e. how can I use predict function to give me n.ahead = k number of

[R] Write to MS SQL Database

2012-11-14 Thread George
I want to update a column of a database table (in MS SQL) using sqlUpdate( ) or sqlSave( ) function in RODBC package. E.g. SQLchannel is the database connection; SQLtable is the destination table in the database, including at least two columns, ID and Value; Xdata is a data frame in R environment,

[R] Time Series with External Regressors in R Problems with XReg

2012-11-14 Thread PaulJr
Hello everyone, Hope you all are doing great! I have been fitting arima models and performing forecasts pretty straightforwardly in R. However, I wanted to add a couple of regressors to the arima model to see if it could improve the accuracy of the forecasts but have had a hard time trying to do

Re: [R] Multiple groups barplot

2012-11-14 Thread michele caseposta
Hi Jim, sizetree was what I was looking for. I am going to play with the options a bit. Thanks a lot, Michele On Nov 14, 2012, at 2:55 AM, Jim Lemon wrote: On 11/14/2012 11:04 AM, michele caseposta wrote: Hi everyone, I have a certain number of samples and I want to visualize the groups

Re: [R] indexing for Wilcoxon test (take 2)

2012-11-14 Thread Jeffrey Stratford
Hi everyone, I've been asked to run a number of Wilcoxon tests on some behavioral data (below is a sample). They want me to compare each trial to the first trial, considered the control trial. I know I can use brackets to index and select, for example, trial 1 vs. trial 4 (not exactly sure how

Re: [R] Multiple groups barplot

2012-11-14 Thread michele caseposta
Back again. Is there a quick way to add the sample names in the plot? I was not able to find anything other than creating a new category with the name in it (and the same color all over). Thanks, Michele On Nov 14, 2012, at 2:45 PM, michele caseposta wrote: Hi Jim, sizetree was what I was

Re: [R] aggrete data from combination

2012-11-14 Thread ONKELINX, Thierry
Please be more specific about what you want. Give an example of the required output. And keep the mailing list in cc when replying. Van: catalin roibu [catalinro...@gmail.com] Verzonden: woensdag 14 november 2012 17:54 Aan: ONKELINX, Thierry Onderwerp: Re: [R]

[R] Winsorisation function

2012-11-14 Thread dms
Dear all, someone can find what I doing wrong with the following function. It is for winsorisation mean. At my eyes it is ok, but for reason I sometimes it is changing the results when I change the k value. wmean - function (x, na.rm = FALSE, k = 1) { if (any(i.na - is.na(x))) {

[R] fda prediction problem

2012-11-14 Thread Catarina Maia
Hello R help list, I am using the mda package and in particular the fda routine to classify in terms of gear a set of 20 trips. I preformed a flexible discriminant analysis (FDA) using a set of 151 trips. FDAT1 - fda(as.factor(gear) ~ . , data =matrizR) A total of 22 predictors were

Re: [R] how to import data from excel to R

2012-11-14 Thread Flavio Barros
Simple: install.packages('xlsx') setwd('C://) (Define directory with your file) data - read.xlsx('file.xlsx', 1) (Read the first spreed sheet) On Wed, Nov 14, 2012 at 3:25 PM, jim holtman jholt...@gmail.com wrote: Also checkout the XLConnect package since it can read/write EXCEL files

Re: [R] indexing for Wilcoxon test (take 2)

2012-11-14 Thread arun
HI, You could also try: #dat1 is the data dat2-dat1[dat1[,2]==1,] dat3-dat1[dat1[,2]!=1,] tapply(dat3$removed,dat3$trial, function(x) wilcox.test(x,dat2[,4])$p.value) #    2  3  4  5  6  7  8 #0.74726203 0.39555263 1. 0.45724442

Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-14 Thread andrewH
Dear Anthony – On closer examination, what I am talking about is not factor levels, but something different (but analogous). The data that is categorical all has integer codes, so the file is entirely numeric. The SAS proc format then gives text strings for each code for each categorical

Re: [R] Winsorisation function

2012-11-14 Thread David L Carlson
Why do you think the mean should not change when you change more of the data values? At any rate, your function agrees with winsor.mean() in package psych: library(psych) winsor.mean(a, trim=.05) [1] 95.8525 winsor.mean(a, trim=.06) [1] 95.9064 winsor.mean(a, trim=.07) [1] 95.91

Re: [R] RMySQL install on windows

2012-11-14 Thread Gabor Grothendieck
On Wed, Nov 14, 2012 at 12:11 PM, sbarandiaran sbaran...@gmail.com wrote: Uwe, now I've tried these steps, following RMySQL installation instructions (http://cran.r-project.org/web/packages/RMySQL/INSTALL): 1. Download the RMySQL_0.9.tar.gz file to the folder C:\Program

[R] Replacing string in matrix with zero

2012-11-14 Thread Nick Duncan
Dear All, I have a matrix in which the diagonal has the string Inf in it. In order to be able to do cluster analysis this needs to be replaced with a Zero. I can do this by putting it into Excel, replacing and putting it back into R but it's tedious, and I am sure there is a simple way to do it

[R] R.dll Reference Guide?

2012-11-14 Thread BayesForever
Is there a reference guide to the complete set of functions and their arguments that are available in the R.dll library for Windows, i.e. the set of functions that includes Rf_initEmbeddedR and Rf_endEmbeddedR listed in section 8.2.2 of the Writing R Extensions manual? This may be more of an

Re: [R] ctree

2012-11-14 Thread mia88
Hey thanks for your help. Im afraid its a little bit too complicated for me.. Before I do al lot of research in the next days to finally understand it I would like to make sure that it does help me with my problem. Maybe I explain it once again : For example in the first node I can read that

[R] R.dll Reference Guide?

2012-11-14 Thread BayesForever
I am looking for a reference guide to the complete set of functions available, and their arguments, in the R.dll library for Windows, i.e. the set of functions that includes Rf_initEmbeddedR and Rf_endEmbeddedR listed in section 8.2.2 of the Writing R Extensions manual. This may be more of an

Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-14 Thread David Winsemius
On Nov 14, 2012, at 2:33 PM, andrewH wrote: Dear Anthony – On closer examination, what I am talking about is not factor levels, but something different (but analogous). The data that is categorical all has integer codes, so the file is entirely numeric. The SAS proc format then gives

Re: [R] Matrix to data frame conversion

2012-11-14 Thread MacQueen, Don
So, if you have duplicate row.names, get rid of them. Try rownames(comb_model0) - NULL as.data.frame(comb_model0) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 11/12/12 7:45 AM, PavloEs nici...@gmail.com wrote:

Re: [R] Replacing string in matrix with zero

2012-11-14 Thread Jeremy Miles
You can use ifelse() #Create data for example x - matrix(data=c(Inf, 2, 3, 4, Inf, 6, 7, 8, Inf), nrow=3) #Turn Inf into zero. x - ifelse(x == Inf, 0, x) Jeremy On 14 November 2012 14:13, Nick Duncan nickd...@gmail.com wrote: Dear All, I have a matrix in which the diagonal has the

Re: [R] Replacing string in matrix with zero

2012-11-14 Thread Rui Barradas
Hello, I doubt your Inf is a string, R does have the numeric value Inf (and -Inf), just try 1/0. As for the question, x - matrix(1:9, ncol = 3) diag(x) - 1/0 x x[x == Inf] - 0 x Note that it could also be diag(x) - 0 Hope this helps, Rui Barradas Em 14-11-2012 22:13, Nick Duncan escreveu:

[R] Optimizing

2012-11-14 Thread Sam Asin
Hello, I am fairly new with R and am having trouble finding an optimal group. I checked the help functions for the various optimize commands and it was a little over my head. I have a dataset with 4 columns, name, type, value, and cost. The set consists of a list of people, which have 3 types.

Re: [R] Jackknife in Logistic Regression

2012-11-14 Thread Frank Harrell
The standard errors and covariance matrix that automatically arise from fitting the model already captures the uncertainties you seek, if I understand. Frank Lucas wrote Dear R friends I´m interested into apply a Jackknife analysis to in order to quantify the uncertainty of my coefficients

Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-14 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of andrewH Sent: Wednesday, November 14, 2012 2:34 PM To: r-help@r-project.org Subject: Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R. Dear

Re: [R] error data frame

2012-11-14 Thread Pascal Oettli
Hello, You don't provide a reproducible example. And, also, the package the titan function comes from. The function I found doesn't use the options you used in yours. Regards, Pascal Le 14/11/2012 23:10, Sonja69 a écrit : Hallo everybody! I am trying to perform a TiTAN (Baker King 2010)

Re: [R] Replacing string in matrix with zero

2012-11-14 Thread arun
HI, If it is value Inf, you could also use ?is.infinite()   x-matrix(c(Inf,1,2,3,Inf,5,6,7,Inf),nrow=3) x[is.infinite(x)]-0  x # [,1] [,2] [,3] #[1,]    0    3    6 #[2,]    1    0    7 #[3,]    2    5    0 A.K. - Original Message - From: Rui Barradas ruipbarra...@sapo.pt To: Nick

Re: [R] Optimizing

2012-11-14 Thread Bert Gunter
Sam: 1. Homework? R has a no homework policy. 2. But in any case, check out the Optimization task view on CRAN. You should be able to find something there that meets your needs. Of course, if something is a little over your head, that's not an excuse, but rather an admission that you have to do

Re: [R] Replacing string in matrix with zero

2012-11-14 Thread Rolf Turner
On 15/11/12 11:13, Nick Duncan wrote: Dear All, I have a matrix in which the diagonal has the string Inf in it. In order to be able to do cluster analysis this needs to be replaced with a Zero. I am very sceptical about this assertion. Inf means infinity which is of course *NOT* the

[R] depmixS4 prediction

2012-11-14 Thread Epic John
I am getting started with using the depmixS4 package. First, I would like to see I am very impressed with its speed and flexibility. The question I have is regarding predicting on new data. I want to fit the model on some sequences with observed responses, and then make predictions on the right

Re: [R] Multiple groups barplot

2012-11-14 Thread Jim Lemon
On 11/15/2012 07:21 AM, michele caseposta wrote: Back again. Is there a quick way to add the sample names in the plot? I was not able to find anything other than creating a new category with the name in it (and the same color all over). Hi Michele, If by sample names you mean the variable

Re: [R] ctree

2012-11-14 Thread Achim Zeileis
Did you try the example that I sent you? I think it does what you ask for... (sent from mobile phone)mia88 sonjakleinh...@googlemail.com wrote:Hey thanks for your help. Im afraid its a little bit too complicated for me.. Before I do al lot of research in the next days to finally understand it I

[R] GUI Development reg

2012-11-14 Thread Vijayan Padmanabhan
Dear R Group I have a character vector from which I want to select a few elements and create a new character vector. I need a GUI to do this in R Script. Can someone help? a-c(A,B,C,D,E) ## I want to have a GUI in R that will display elements in object a as a drop down list.. from there I

[R] Importing Data for a two sample t-test

2012-11-14 Thread nilsonern
I am trying to do a two sample t-test with data that i received in a text document. one list has the slab weights and the second has the company it is associated with. here is an example. weights company 1 A 2 A 2 B 3 B I

Re: [R] Jackknife in Logistic Regression

2012-11-14 Thread chuck.01
untested, but something like this should get you what you want: no.it - 5 out - vector(list, length=no.it) for(i in 1:no.it){ mydata2 - mydata[ sample(1:nrow(mydata), 76000/no.it) ,] out[[i]] - coef( glm(f_ocur~altitud+UTM_X+UTM_Y+j_sin+j_cos+temp_res+pp+offset(log(1/off)),

Re: [R] error data frame

2012-11-14 Thread Pascal Oettli
Hello, Your function is a supplementary material. I tried to apply this function using the example provided and it failed. I use R version 2.15.2 (2012-10-26). Regards, Pascal Le 15/11/2012 15:36, Stendera, Sonja, Dr. a écrit : Thanks, but sorry, that's all I have. I ran the script with

[R] benchmark package

2012-11-14 Thread sheenmaria
i used a package like 'benchamrk' is it helpful to find out the benchmak value ? and also colud u please provide some examples for the benchmak package , i cant get the proper answer with that. And also it shows the bs.sampling value also needed. but the r-help pages provide without examples .

Re: [R] Bootstrapping issues

2012-11-14 Thread Clive Nicholas
Petr, Silly stupid me (as usual) - problem resolved! The issue was the one you correctly identified in your original response, namely the lack of a -formula=- statement in the call to boot-: test-data.frame(A=rnorm(500, mean=2.72, sd=5.36),