Re: [R] c(a, b) for POSIXct objects with tzone attributes?

2012-07-09 Thread Bert Gunter
Spencer: Just for fun, may I hazard a guess: It would be messy to retain time zones if your were concatenating objects with more than one time zone among them. Normalizing everything to a single zone probably also makes subsequent operations on the results much easier. Not that it couldn't be

Re: [R] Data Simulation

2012-07-09 Thread peter dalgaard
On Jul 8, 2012, at 23:39 , ycyi121 wrote: Hi, I have great difficulty in simulation the a dataset based in a loading matrix [c(1,1,1,2,3,3,3,4,4,3,2,2,1,1), 7, 2) and an error covariance matrix is 2*I. I have to simulate a dataset with 7 variables and 50 rows. I search a lot and did find

[R] Fwd: Re: Problem with Apriori

2012-07-09 Thread Pascal Oettli
Good Morning, I forward your email to the R-help list. Regards. Message original Sujet: Re: [R] Problem with Apriori Date : Fri, 6 Jul 2012 12:45:47 +0200 De : Jolinda Bartlett joli...@eighty20.co.za Pour : Pascal Oettli kri...@ymail.com Good morning I am using Windows

[R] linearHypothesis and factors

2012-07-09 Thread Waikato_alex
Hi everyone, I'm sure this is pretty basic but I couldn't find a clear example of how to do this. I'm running a regression, say: reg - lm(Y ~ x1 + year) where x1 is a continuous variable and year is a factor with various year levels. Individually, each year factor variable is not significant,

[R] Using loops to create matrices where the variables is called with $

2012-07-09 Thread Drew Harris
Hi there, I am trying to make a VECM model which does a loop to pull of long run impact coefficients. The problem is that to calculate these for a,b,c I use the irf() function and they are stored in irf$a, irf$b, irf$c. What I would really like is to be able to call irf$[variablename(x)] where I

[R] Using the effects package

2012-07-09 Thread Abraham Mathew
I've been looking into the effects package and it seems to be a great tool for plotting the probabilities of the response variable by the predictors. However, I'm wonder if I can use the effects package to plot the probabilities on the y axis and one predictor on the x axis, with the curve having

[R] R to winbugs interface

2012-07-09 Thread PRAGYA SUR
Hello everyone, I need some help regarding calling WinBUGS from R. I have a model for WinBUGS and an R code which calls WinBUGS. On running the code I am being shown the error message : Error in file(con, wb) : cannot open the connection In addition: Warning messages: 1: In

Re: [R] Using loops to create matrices where the variables is called with $

2012-07-09 Thread Rui Barradas
Hello, I'm not completely sure I understand your problem, you should say what is the package you are using. If it's just a doubt on how to access the elements of what seems to be a list, here is an example: x - list(a=1:5, b=rnorm(4)) x$a x[[ a ]] x[[ 1 ]] If it's from package vars, the

[R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread Alexander Erbse
Dear All, when I try to call blpConnect() in order to open a connection to the Bloomberg on my machine, I receive following error message: R version 2.15.1 (2012-06-22) rJava Version 0.9-3 RBloomberg Version 0.4-150 Java environment initialized successfully. Looking for most

Re: [R] number of decimal places in a number?

2012-07-09 Thread S Ellison
-Original Message- From: Martin Ivanov I have the longitudes (lon) and latitudes (lat), and I have a resolution (r), for example r = 0.004. The bounding box must have the same number of digits as resolution. Surely the issue is not the particular numeric resolution of the

Re: [R] R to winbugs interface

2012-07-09 Thread S Ellison
-Original Message- Error in file(con, wb) : cannot open the connection In addition: Warning messages: 1: In file.create(to[okay]) : cannot create file 'c:/Program Files/WinBUGS14//System/Rsrc/Registry_Rsave.odc', reason 'Permission denied' This tells you that you do not have

Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread John Laing
Alexander, I agree, this feels like a java version issue. You could start by telling us what version of Java you're running: open a command prompt and type java -verision, and reply with the output. I think any version 1.5 and up should work, but let's see what you have. -John On Mon, Jul 9,

[R] Skipping lines and incomplete rows

2012-07-09 Thread vioravis
I have a text file that has semi-colon separated values. The table is nearly 10,000 by 585. The files looks as follows: *** First line: Skip this line Second line: skip this line Third line: skip this line variable1 Variable2 Variable3 Variable4

Re: [R] Grouped regression

2012-07-09 Thread SKrishna
Dear David, Thanks for the tip about naming the levels first with levels before assigning them. However, your answer does not solve the original question that I requested help on. I will post a simplified version as a separate query, partly because the subject line on the present one seems to

[R] Package DAAG

2012-07-09 Thread Chiruka, Raymond
Hie I am trying to install Package DAAG this is the error I get library(DAAG) Loading required package: randomForest Error: package 'randomForest' could not be loaded In addition: Warning message: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) : there is no

[R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jeremy Little
appears when I run the summary command. The data file is large (585000 rows) and has no NA, - or blank values. My script (in brief) is as follows, with results: library(MASS) ## ADD DATA Jdata- read.delim(/Analysis/20120709 JLittle data file.txt, header=T) attach(Jdata) names

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread vimmster
Dear Mr. Holtman, thank you for your reply. I think I did say which mean I needed: all of these reaction times per test subject. , which means that I need a file with the mean of reaction times of each file / of each test subject (because file XYZ_34.txt is identical with subject 34's data).

[R] How to cache files/objects in map-reduce using rmr?

2012-07-09 Thread rakeshrakshit
Hi all, I have a usecase defined as follows. I have a list of popular products in a file and a file specifying users and products used by them. Now using map-reduce for each user I want to sort out the popular products that the user is already using and recommend top 100 popular products for

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread Rui Barradas
Hello, Your data example has dots in the column of interess. If those values are ntegers, this might do it. fun - function(x){ dat - read.table(x, skip=14) H - as.numeric(gsub(\\., , dat[, 8])) mean(H) } sapply(list.files(pattern=XYZ.*\\.txt), fun) Now do what you

Re: [R] Package DAAG

2012-07-09 Thread Duncan Murdoch
On 12-07-09 6:42 AM, Chiruka, Raymond wrote: Hie I am trying to install Package DAAG this is the error I get library(DAAG) Loading required package: randomForest Error: package 'randomForest' could not be loaded In addition: Warning message: In library(pkg, character.only = TRUE,

Re: [R] axis.Date language

2012-07-09 Thread Prof Brian Ripley
On 09/07/12 01:43, Mikkel Grum wrote: Dear useRs I need to do graphs with dates in different languages on Ubuntu. In Windows the following will plot the date axis labels in Spanish: random.dates - as.Date(2001/1/1) + 70*sort(stats::runif(100)) language - Spanish Sys.setlocale(LC_TIME,

Re: [R] Skipping lines and incomplete rows

2012-07-09 Thread Rui Barradas
Hello, Try the following. head - readLines(test.txt, n=4)[4] dat - read.table(test.txt, skip=5) names(dat) - unlist(strsplit(head, )) dat hope this helps, Rui Barradas Em 09-07-2012 11:23, vioravis escreveu: I have a text file that has semi-colon separated values. The table is nearly

Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread Alexander Erbse
John, thanks for your quick response. Here is what you requested: java version 1.7.0_05 Java(TM) SE Runtime Environment (build 1.7.0_05-b05) Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing) Thanks, Alex -Ursprüngliche Nachricht- Von: John Laing

Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread John Laing
OK. Are you running 32 bit or 64 bit R? And 32 bit or 64 bit Java? This can help shed light on the settings for the JVM being accessed by R: require(rJava) .jinit() jvm - .jnew(java.lang.System) jvm.props - jvm$getProperties()$toString() jvm.props - strsplit(gsub(\\{(.*)}, \\1, jvm.props), ,

[R] anova.lm and F-test

2012-07-09 Thread Suresh Krishna
Hello, Why does anova.lm sometimes return a p-value and at other times not ? Is it because it recognizes nested models from non-nested ones ? x-seq(1,100,1) y-3*x+rnorm(100) anova(lm(y~x),lm(y~x+I(x^2)),test=F) Analysis of Variance Table Model 1: y ~ x Model 2: y ~ x + I(x^2) Res.Df

Re: [R] Plotting the probability curve from a logit model with 10 predictors

2012-07-09 Thread Frank Harrell
Also: require(rms); ?plot.Predict Frank Greg Snow wrote Try the following: library(TeachingDemos) ?TkPredict fit.glm1 - glm( Species=='virginica' ~ Sepal.Width+Sepal.Length, data=iris, family=binomial) TkPredict(fit.glm1) (you may need to install the

Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread Alexander Erbse
32-Bit both. -Ursprüngliche Nachricht- Von: John Laing [mailto:john.la...@gmail.com] Gesendet: Montag, 9. Juli 2012 14:39 An: Alexander Erbse Cc: r-help@r-project.org Betreff: Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect() OK. Are you

Re: [R] linearHypothesis and factors

2012-07-09 Thread John Fox
Dear Alex, As explained in ?linearHypothesis, you can use matchCoefs() in the second argument: linearHypothesis(reg, matchCoefs(reg, year) , vcov=vcovHC(reg, HC1)) In addition, you can set the argument white.adjust=hc1 as an alternative to using the vcov argument. Finally, in this case it

Re: [R] Plotting rpart trees with long list of class members

2012-07-09 Thread Jean V Adams
If you provide a simple example, with actual data and code so that we can reproduce your issue, it would make it easier for readers of this list to help. Jean MarkBeauchene markbeauch...@hotmail.com wrote on 07/06/2012 04:38:32 PM: I have a class with 732 members, so using rpart.plot is

Re: [R] c(a, b) for POSIXct objects with tzone attributes?

2012-07-09 Thread Prof Brian Ripley
On 09/07/2012 07:12, Bert Gunter wrote: Spencer: Just for fun, may I hazard a guess: It would be messy to retain time zones if your were concatenating objects with more than one time zone among them. Actually, impossible as the design allows for only one timezone for each object.

Re: [R] Using the effects package

2012-07-09 Thread John Fox
Dear Abraham, I must admit that I don't really follow what you want to do. Disregarding the fact that the example you provide doesn't converge to a proper solution, the plot that you've requested will range over all values of bid at the median home, which is 0. You may have intended home to be

Re: [R] a fortune?

2012-07-09 Thread John Kane
ooohhh! John Kane Kingston ON Canada -Original Message- From: ted.hard...@wlandres.net Sent: Sun, 08 Jul 2012 21:07:09 +0100 (BST) To: r-help@r-project.org Subject: Re: [R] a fortune? Should this not be attributed to DescaRtes? Ted. On 08-Jul-2012 18:41:17 Achim

Re: [R] Splitting a character vector.

2012-07-09 Thread John Kane
Right, I see it now. Thanks. Who knows in another 100 years I may understand regex. John Kane Kingston ON Canada -Original Message- From: smartpink...@yahoo.com Sent: Sat, 7 Jul 2012 16:19:54 -0700 (PDT) To: jrkrid...@inbox.com Subject: Re: [R] Splitting a character vector.

Re: [R] differences between survival models between STATA and R

2012-07-09 Thread Terry Therneau
Without more information, we can only guess what you did, or what you are seeing on the page that is different. I'll make a random guess though. There are about 5 ways to paramaterize the Weibull distribution. The standard packages that I know, however, tend to use the one found in the

Re: [R] a fortune?

2012-07-09 Thread Ted Harding
Indeed!! I made a spelling mistake! Correction: Should this not be attributed to DescRtes? Ted. On 09-Jul-2012 13:31:03 John Kane wrote: ooohhh! John Kane Kingston ON Canada -Original Message- From: ted.hard...@wlandres.net Sent: Sun, 08 Jul 2012 21:07:09 +0100 (BST)

Re: [R] differences between survival models between STATA and R

2012-07-09 Thread Javier Palacios Fenech
Please. find an example here. With exactly the same data set, I run two hazard models following the instructions for each function. aftreg(formula = Surv(sta, sto, S) ~ a + b + c + d + e + f + g , factor(F), data = data.frame(SURV), dist = weibull, id = ID) streg f1 f2 f3 f4 f5 a b c d g

Re: [R] anova.lm and F-test

2012-07-09 Thread peter dalgaard
On Jul 9, 2012, at 15:40 , Suresh Krishna wrote: Hello, Why does anova.lm sometimes return a p-value and at other times not ? Is it because it recognizes nested models from non-nested ones ? x-seq(1,100,1) y-3*x+rnorm(100) anova(lm(y~x),lm(y~x+I(x^2)),test=F) Analysis of Variance

[R] R code for Ljung-Box Test

2012-07-09 Thread Sajeeka Nanayakkara
 What is the R code for Ljung-Box Test in Statistics? Sajeeka Nanayakkara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread Alexander Erbse
Hi John, I did some further checks and noticed that the java version, which is indicated by the settings (I used the code you sent) is version 1.5.0_12, although I installed version 1.7.0_05 shortly. The paths as shown by parameter java.endorsed.dirs are wrong. They are pointing to an older

Re: [R] Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()

2012-07-09 Thread Alexander Erbse
John, the problem is now resolved. I changed the PATH environment variable. I replaced the path leading to the old java installation by the new one and now it works. Thanks for your help. Regards, Alex -Ursprüngliche Nachricht- Von: Alexander Erbse Gesendet: Montag, 9. Juli 2012

Re: [R] differences between survival models between STATA and R

2012-07-09 Thread Robert W. Baer
On 7/9/2012 9:17 AM, Javier Palacios Fenech wrote: Please. After, Terry's response I guess I was expecting to hear how your comparison between R and STATA went when you used the R function, survreg() for your analysis. We still don't know what your data look like. The posting guide asks

[R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Lee, Laura
Hi all- I fit a zero-inflated Poisson model to model bycatch rates using an offset term for effort. I need to apply the fitted model to a datasets of varying levels of effort to predict the associated levels of bycatch. I am seeking assistance as to the correct way to code this. Thanks in

Re: [R] classification using zero-inflated negative binomial mixture model

2012-07-09 Thread Ben Bolker
Kai Ying yingk at iastate.edu writes: Hi, I want using zero-inflated negative binomial regression model to classify data(a vector of data), that is I want know each observed value is more likely belong to the zero or count distribution(better with relative probability). My data is some

Re: [R] R to winbugs interface

2012-07-09 Thread PRAGYA SUR
I ran the same program in a different computer where it had run proper a week ago. This time around in the log file in WinBUGS the program stopped at a line which said : save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.odc) save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.txt) and did

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jessica Streicher
: library(MASS) ## ADD DATA Jdata- read.delim(/Analysis/20120709 JLittle data file.txt, header=T) attach(Jdata) names(Jdata) [1] POINTID Lat_Y_pos JVeg5 Subregion Rock_U_Nam Rock_Name Elevation Slope Aspect Hillshade Stream_dist Coast_dist Coast_SE [14

[R] unique vs duplicate problem

2012-07-09 Thread Nico902
Hi, Let say I have a numeric vector: x - c(1, 2, 3, 3). I want on one hand numbers which are not duplicated ie 1,2 and duplicated 3. so I did: duplicated(x) FALSE FALSE FALSE TRUE unique(x) 1 2 3 which is not what I want. Is there a function in R to have the following result:

Re: [R] unique vs duplicate problem

2012-07-09 Thread jim holtman
Here is one way of doing it -- you can create your own functions: x - c(1, 2, 3, 3) allDup - + function (value) + { + duplicated(value) | duplicated(value, fromLast = TRUE) + } duped - unique(x[allDup(x)]) duped [1] 3 setdiff(unique(x), duped) [1] 1 2 On Mon, Jul 9, 2012 at 12:42

Re: [R] unique vs duplicate problem

2012-07-09 Thread Rui Barradas
Hello, Maybe this function. fun - function(x) x %in% x[duplicated(x)] x - c(1, 2, 3, 3) fun(x) Hope this helps, Rui Barradas Em 09-07-2012 17:42, Nico902 escreveu: Hi, Let say I have a numeric vector: x - c(1, 2, 3, 3). I want on one hand numbers which are not duplicated ie 1,2 and

Re: [R] R code for Ljung-Box Test

2012-07-09 Thread Rui Barradas
Hello, The function is ?Box.test It has two types, Box-Pierce and Ljung-Box. Hope this helps, Rui Barradas Em 09-07-2012 15:59, Sajeeka Nanayakkara escreveu: What is the R code for Ljung-Box Test in Statistics? Sajeeka Nanayakkara [[alternative HTML version deleted]]

Re: [R] unique vs duplicate problem

2012-07-09 Thread Nico902
excellent!!! thanks a lot!! -- View this message in context: http://r.789695.n4.nabble.com/unique-vs-duplicate-problem-tp4635868p4635874.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] R to winbugs interface

2012-07-09 Thread Uwe Ligges
On 09.07.2012 18:19, PRAGYA SUR wrote: I ran the same program in a different computer where it had run proper a week ago. This time around in the log file in WinBUGS the program stopped at a line which said : save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.odc)

Re: [R] R to winbugs interface

2012-07-09 Thread PRAGYA SUR
Yes that was the problem. Thank you very much. Can anyone tell me the meaning of The following object(s) are masked _by_ '.GlobalEnv': beta i was shown this notification after the results were printed. On Mon, Jul 9, 2012 at 1:15 PM, Uwe Ligges lig...@statistik.tu-dortmund.dewrote: On

[R] returning multiple values

2012-07-09 Thread PRAGYA SUR
I am running a program which has an output containing four vectors named meanfevs, meanfevns, pfevs, pfevns. I wish to return all four and be able to access them later. I used the command return(list(a=meanfevs,b=meanfevns,c=pfevs,d=pfevns)) it did give me the ouput. However the values did not get

Re: [R] returning multiple values

2012-07-09 Thread R. Michael Weylandt
Hi, No, you won't be able to simply call a and have that work. R returns these in a single object with components (elements) named a,b,c,d Here's a concrete example: func - function(x, y) return(list(a = x+1, b = y + 2)) out - func(3, 5) out[[a]] # or out$a out[[b]] # or out$b give the

Re: [R] returning multiple values

2012-07-09 Thread Bert Gunter
Indeed. You do not understand lists. The behavior you expect is not how R works. Have you read An Introduction to R where this is explained (section 6.1). Also chapter 10 and 10.7 in particular for scoping in R. See also ?with ?within ?eval and e.g. ?lm or ?xyplot for the ubiquitous use of data

[R] R, maps, choropleth, data keys

2012-07-09 Thread Charles Carter
I have four files that map populations to appropriate keys: statepop.csv, countypop.csv, zip3.csv, and zip5.csv. I'm using the TIGER/Lines shape files: tl_2009_12_state, tl_2009_12_county tl_2009_12_zcta3, and  tl_2009_12_zcta5. I have carefully followed a number of tutorials and can reproduce

Re: [R] number of decimal places in a number?

2012-07-09 Thread Jim Plante
I don't know how significant this is, but WolframAlpha's value of pi disagrees with R's at about the 16th decimal: Wpi-3.141592653589793238462643383279502884197169399375105 ..^ Rpi-3.14159265358979311599796346854418516 Probably not of interest to anyone but astronomers,

[R] Lavaan Package - How to Extract Residuals in Data Values

2012-07-09 Thread Emily Zimmerman
Hello R Community, I am using the Lavaan package in R 2.15.0 to analyze data collected from 1200 lakes across North America. My dataset includes 3 continuous independent variables (LOG_NTL, LOG_PTL, and LOG_SR_A_D) and 1 continuous dependent variable (BIOVOL) . I have successfully constructed

[R] how to make plot lines thicker

2012-07-09 Thread peziza
I am trying to make the lines thicker in a graph (for a ppt presentation). Here is what I currently have: plot(x,y,type=l, ylab=Number of OTUs, xlab=Number of Samples Collected, col=Black, pch=1, ylim=c(0,6000)) points(x, Sobs$Chao_1_Mean, type=l, col=Gray, pch=1) (this is one of the added

[R] additive interaction for a dichotomous dependent variable (i.e. risk difference)

2012-07-09 Thread wouterjohannes
Dear all, For my research I want to test additive interaction for a dichotomous dependent variable. Can anyone help me to estimate this in R? Wacholder describes this procedure in the American Journal of Epidemiology in 1986 (Binomial regression in GLIM: estimating risk ratios and risk

Re: [R] Re : Matrix package loading problem Error : object ‘kronecker’ is not exported by 'namespace:methods'

2012-07-09 Thread Niels2
Hallo Rob, have you figured out a solution to the error? I've got the same problem. regards N. -- View this message in context: http://r.789695.n4.nabble.com/Matrix-package-loading-problem-Error-object-kronecker-is-not-exported-by-namespace-methods-tp4632861p4635878.html Sent from the R help

Re: [R] add constraints to nls or use another function

2012-07-09 Thread PtitBleu
bbolker wrote PtitBleu ptit_bleu at yahoo.fr writes: Hello, I'm trying to fit experimental data with a model and nls. For some experiments, I have data with x from 0 to 1.2 and the fit is quite good. But it can happen that I have data only the [0,0.8] range (see the example

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread vimmster
Dear Mr. Barradas, your solution comes very close to what I want. But I have two questions left: First question: If R computes the mean for the reaction times of test subject 34 (the example I provided above), it says 310112.0, but if I use the mean-function in Excel it says 345.210. Apart

[R] number of shared species between sites (VEGAN or RICH?)

2012-07-09 Thread elpape
Dear all I'm trying to calculate the number of shared species between sites. I have a dataframe with in the first column the names of the sites; the names of the other columns are the species names. To use the shared function from the package RICH one needs to input different matrices. So

Re: [R] differences between survival models between STATA and R

2012-07-09 Thread jthetzel
UCLA's Advanced Technical Services' Statistical Computing website often has very good resources for comparing analyses between R, Stata, and SAS ( http://www.ats.ucla.edu/stat ). For accelerated failure time models, I believe that it has some examples for Stata (

Re: [R] Skipping lines and incomplete rows

2012-07-09 Thread arun
Hi, I guess you should have fill=TRUE in the read.table. dat1-read.table(text= First line: Skip this line Second line: skip this line Third line: skip this line variable1 Variable2 Variable3 Variable4   Unit1    Unit2    Unit3 10  0.1  0.01   

Re: [R] anova.lm and F-test

2012-07-09 Thread SKrishna
Dear Peter, Thank you very much for that excellent answer to a rather stupid question :) I did not notice that the RSS actually increased for the model with more parameters and so in this case the F-statistic is negative and therefore a p-value from the F-distribution is meaningless. But I guess

Re: [R] How to import SAS data in R?

2012-07-09 Thread kenkl
In addition to the helpful guidance suggested already, you might investigate the sas7bdat package, by Matt Shotwell. I described it here: http://sas-and-r.blogspot.com/2011/07/really-useful-r-package-sas7bdat.html Ken -- View this message in context:

Re: [R] Issue with installing RExcel

2012-07-09 Thread Charlie Friedemann
If you look at the help for install.packages: help(install.packages) You will see that the first argument to install.packages takes a vector of the package names. In your case, you are passing three arguments to the function, so R is trying to install RExcelInstaller package into a library

Re: [R] Skipping lines and incomplete rows

2012-07-09 Thread arun
Hello, Just now I checked reading directly from .txt file instead of the one showed in my earlier reply, #Use skip=3 instead of 4. dat1-read.table(dat1.txt,sep=,skip=3,fill=TRUE,header=TRUE) dat1-dat1[-1,]  row.names(dat1)-1:nrow(dat1)  dat1   variable1 Variable2 Variable3 Variable4 1   

[R] Issue with installing RExcel

2012-07-09 Thread bjbreitling
Hi community. I'm fairly new to R and have a basic question. When I try to install RExcel with the code: install.packages(RExcelInstaller, rcom, rsproxy) I get the message below: Warning in install.packages(RExcelInstaller, rcom, rsproxy) : 'lib = rcom' is not writable Error in

Re: [R] how to make plot lines thicker

2012-07-09 Thread Sarah Goslee
I'd suggest using lines() rather than points() to add lines to a plot. The parameter to change line width is lwd rather than cex. e.g. lines(x, Sobs$Chao_1_Mean, col=Gray, lwd=2) Reading ?par can be both an enlightening and confusing experience. Sarah On Mon, Jul 9, 2012 at 1:11 PM, peziza

Re: [R] unique vs duplicate problem

2012-07-09 Thread arun
Hi, Try this: #Duplicated: x-c(1:3,3) x==x[duplicated(x)] #[1] FALSE FALSE  TRUE  TRUE #Unique:  x[!x==x[duplicated(x)]] #[1] 1 2 A.K. - Original Message - From: Nico902 descos...@ciml.univ-mrs.fr To: r-help@r-project.org Cc: Sent: Monday, July 9, 2012 12:42 PM Subject: [R]

Re: [R] Re : Matrix package loading problem Error : object ‘kronecker’ is not exported by 'namespace:methods'

2012-07-09 Thread Bert Gunter
?::: -- Bert On Mon, Jul 9, 2012 at 10:45 AM, Niels2 nielssch...@gmx.net wrote: Hallo Rob, have you figured out a solution to the error? I've got the same problem. regards N. -- View this message in context:

[R] Correcting for overdispersion

2012-07-09 Thread Lawrence, Adaku
Hello, I am trying to determine LD50 and LD95 using dose.p in MASS however some of the Residual variance is larger than the degrees of freedom. Please can anyone help with any advice as to how i can correct for this? Here is the model as inputted into R y-cbind(dead,n-dead)

Re: [R] how to make plot lines thicker

2012-07-09 Thread John Kane
?par and have a look at lwd John Kane Kingston ON Canada -Original Message- From: jenkere...@gmail.com Sent: Mon, 9 Jul 2012 10:11:32 -0700 (PDT) To: r-help@r-project.org Subject: [R] how to make plot lines thicker I am trying to make the lines thicker in a graph (for a ppt

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread Rui Barradas
Hello, There must be a difference in the file you are processing and in the one excel and I are: fun - function(x){ + dat - read.table(x, skip=14) + dat[ , 8] - as.numeric(gsub(\\., , dat[, 8])) + mean(dat[, 8]) + } sapply(list.files(pattern=XYZ.*\\.txt), fun) XYZ_34.txt 345210.4 This

[R] install.packages

2012-07-09 Thread Hui Du
Hi All, I have two questions regarding install.packages(). Q1: may I run it in non-interactive mode, which means just install the packages I want rather than letting me to choose which mirror etc? Q2: I ran a R code in batch mode, for example, R CMD BATCH a.r In a.r, I have some statements

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread jim holtman
I think the real problem is the first data line: 2 1 1 3 27 0 6 1.200.995 Notice the two periods in the value. The previous solution was getting rid of all the periods. If you leave out this value, you get 339.5. if you change it to 1200.995, you get

Re: [R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Alain Zuur
Lee, Laura wrote Hi all- I fit a zero-inflated Poisson model to model bycatch rates using an offset term for effort. I need to apply the fitted model to a datasets of varying levels of effort to predict the associated levels of bycatch. I am seeking assistance as to the correct way to

Re: [R] how to make plot lines thicker

2012-07-09 Thread R. Michael Weylandt
These sorts of parameters are all documented under ?par, but it's a bit of a beast to read. The one you are looking for is lwd= To wit layout(1:2) plot(1:5, type = l) plot(1:5, type = l, lwd = 3) Best, Michael On Mon, Jul 9, 2012 at 12:11 PM, peziza jenkere...@gmail.com wrote: I am trying to

Re: [R] Correcting for overdispersion

2012-07-09 Thread peter dalgaard
On Jul 9, 2012, at 20:23 , Lawrence, Adaku wrote: Hello, I am trying to determine LD50 and LD95 using dose.p in MASS however some of the Residual variance is larger than the degrees of freedom. Please can anyone help with any advice as to how i can correct for this? Er, in what sense is

Re: [R] install.packages

2012-07-09 Thread Sarah Goslee
Hi, On Mon, Jul 9, 2012 at 2:30 PM, Hui Du hui...@dataventures.com wrote: Hi All, I have two questions regarding install.packages(). Q1: may I run it in non-interactive mode, which means just install the packages I want rather than letting me to choose which mirror etc? Sure. If you read

Re: [R] install.packages

2012-07-09 Thread Hui Du
Thanks Sarah. I realized it as well and tried to run install.packages(plyr, lib = .Library) as root. It works now. Thanks again. HXD -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Monday, July 09, 2012 12:06 PM To: Hui Du Cc: r-help@r-project.org Subject:

Re: [R] number of shared species between sites (VEGAN or RICH?)

2012-07-09 Thread Rui Barradas
Hello, So you want to split data.frame 'dat' by the values of the first column, named 'site', and return the other columns. lapply(split(dat, dat[[ 1 ]]), function(x) x[-1]) Hope this helps, Rui Barradas Em 09-07-2012 13:27, elpape escreveu: Dear all I'm trying to calculate the number

[R] heatmaps and layouts

2012-07-09 Thread Tanu Soni
I'm using R to create a heatmap from a matrix using heatmap.2 - and i want to group these images into one big image - What i usually use to achieve this is layout() - but this doesn't work, as heatmap.2 uses layout, and apparently layout does not work recursively. Does anyone have any suggestions

Re: [R] axis.Date language

2012-07-09 Thread Mikkel Grum
Thanks Prof, I needed one more step on my system: sudo locale-gen es_ES.UTF-8 Mikkel From: Prof Brian Ripley rip...@stats.ox.ac.uk Cc: R Help r-help@r-project.org Sent: Monday, July 9, 2012 7:01 AM Subject: Re: [R] axis.Date language On 09/07/12 01:43,

[R] boxplot with cut

2012-07-09 Thread Vining, Kelly
Dear UseRs, I'm making box plots from a data set that looks like this: Chr Start End GeneDensity ReadCount_Explant ReadCount_Callus ReadCount_Regen 1 1 1 1 107.82 1.2431.047 1.496 2 1 10001 2 202.50 0.835

Re: [R] heatmaps and layouts

2012-07-09 Thread Joseph Clark
With base graphics, you could use par(mfrow) or par(mfcol) to define a simple layout. I don't know anything about heatmap.2, but I have used image() to make heatmaps and have laid them out with par(mfrow). Two ways to get a 2 row by 3 column layout, for example: par(mfrow = c(3,2)) # 3

Re: [R] unique vs duplicate problem

2012-07-09 Thread Peter Ehlers
On 2012-07-09 11:07, arun wrote: Hi, Try this: #Duplicated: x-c(1:3,3) x==x[duplicated(x)] #[1] FALSE FALSE TRUE TRUE #Unique: x[!x==x[duplicated(x)]] #[1] 1 2 A.K. Try the above approach with x - c(1,2,3,3,3,4,4,5) I think Rui's solution is preferable. Peter Ehlers -

Re: [R] number of decimal places in a number?

2012-07-09 Thread Petr Savicky
On Mon, Jul 09, 2012 at 07:52:18AM -0500, Jim Plante wrote: I don't know how significant this is, but WolframAlpha's value of pi disagrees with R's at about the 16th decimal: Wpi-3.141592653589793238462643383279502884197169399375105 ..^

Re: [R] Correcting for overdispersion

2012-07-09 Thread peter dalgaard
On Jul 9, 2012, at 21:08 , Lawrence, Adaku wrote: Hello, Thanks for getting back to me. I was of the impression that once the res. var. is larger than the df then the data was overdispersed and as such the model was not a best fit. Is this true? Not without qualification. There are

Re: [R] number of shared species between sites (VEGAN or RICH?)

2012-07-09 Thread peter dalgaard
On Jul 9, 2012, at 21:26 , Rui Barradas wrote: Hello, So you want to split data.frame 'dat' by the values of the first column, named 'site', and return the other columns. lapply(split(dat, dat[[ 1 ]]), function(x) x[-1]) Got to be easier to split(dat[-1], dat[[1]]), no? -pd

Re: [R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Laura Lee
Thanks for your reply. I do have a copy of Zero Inflated Models and Generalized Linear Mixed Models with R and have been using that as a guide. I applied the predict function (type=count) to the dataset for which I built the model to compare the predicted bycatch numbers to the observed to ensure

Re: [R] number of shared species between sites (VEGAN or RICH?)

2012-07-09 Thread Rui Barradas
Ouch! Rui Barradas Em 09-07-2012 21:39, peter dalgaard escreveu: On Jul 9, 2012, at 21:26 , Rui Barradas wrote: Hello, So you want to split data.frame 'dat' by the values of the first column, named 'site', and return the other columns. lapply(split(dat, dat[[ 1 ]]), function(x) x[-1])

[R] how do I shut down Hit Return to see next plot: when plotting to pdf file?

2012-07-09 Thread Michael
Hi all, I am using avPlots... and it has the following: Hit Return to see next plot: But I just wanted to everything to be saved into a pdf file... How to skip these Returns? Thanks a lot! [[alternative HTML version deleted]] __

Re: [R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Highland Statistics Ltd
Laura Lee laura.lee at ncdenr.gov Mon Jul 9 22:51:40 CEST 2012 Previous message: [R] Predicted values for zero-inflated Poisson Next message: [R] Lavaan Package - How to Extract Residuals in Data Values Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Thanks for your

Re: [R] how do I shut down Hit Return to see next plot: when plotting to pdf file?

2012-07-09 Thread Sarah Goslee
Maybe read the help for avPlots, especially the part about the ask argument: ask If TRUE, ask the user before drawing the next plot; if FALSE don't ask. Sarah On Mon, Jul 9, 2012 at 5:16 PM, Michael comtech@gmail.com wrote: Hi all, I am using avPlots... and it has the following:

[R] exact logistic regression with correlated data?

2012-07-09 Thread Yue
hi all, does anyone know if R can do exact logistic regression with correlated binary data? Thanks!! Yue -- View this message in context: http://r.789695.n4.nabble.com/exact-logistic-regression-with-correlated-data-tp4635900.html Sent from the R help mailing list archive at Nabble.com.

[R] firth's penalized likelihood bias reduction approach

2012-07-09 Thread Yue
hi all, I have a binary data set and am now confronted with a separation issue. I have two predictors, mood (neutral and sad) and game type (fair and non-fair). By separation, I mean that in the non-fair game, whereas 20% (4/20) of sad-mood participants presented a positive response (coded as 1)

  1   2   >