Re: [R] How to write to sqlite files

2010-10-19 Thread Steven McKinney
You will need to install the RSQLite package, see e.g. http://cran.r-project.org/web/packages/RSQLite/index.html Review the installation instructions there for the setup appropriate for your situation. Review the pdf manual there for examples of command sequences involved with connecting to

[R] scatter.smooth() fitted by loess

2010-10-19 Thread phoebe kong
Hi there, I would like to draw a scatter plot and fit a smooth line by loess. Below is the data. However, the curve line started from 0, which my resid list doesn't consist of 0 value. It returned some warnings which I don't know if this is the reason affecting such problem. Here I also attached

[R] Gini Coefficient

2010-10-19 Thread Peter Francis
Dear List, I am unsure if this is specifically a R question or a stats question? I thought i would ask here and if i get no replies it will answer that! I am trying to calculate Gini coefficients in R, based on a slight modification of the typical equation that i have seen in a paper.

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread Ista Zahn
The fundamental problem is that you only have five distinct x values. lowess cannot work in this situation. Try side-by-side boxplots: boxplot(resid.value ~ YMRS_Sum) -Ista On Tue, Oct 19, 2010 at 5:43 PM, phoebe kong sityeek...@gmail.com wrote: Hi there, I would like to draw a scatter plot

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 5:43 PM, phoebe kong wrote: Hi there, I would like to draw a scatter plot and fit a smooth line by loess. Below is the data. However, the curve line started from 0, which my resid list doesn't consist of 0 value. It returned some warnings which I don't know if this is the

[R] comparing two data files

2010-10-19 Thread Nicole Brandt
I have 2 large data files that I need to compare and find the differences between data file x and data file y in order to correct data entry error. Theoretically both data files should be identical. I am trying to figure out a way to do this in R. Any help would be great!

Re: [R] comparing two data files

2010-10-19 Thread Henrique Dallazuanna
Here is some ways: all.equal(readLines(file1), readLines(file2)) You could try compare md5sum of the files: library(tools) identical(md5sum(file1), md5sum(file2)) On Tue, Oct 19, 2010 at 8:23 PM, Nicole Brandt nicol...@buffalo.edu wrote: I have 2 large data files that I need to compare and

Re: [R] Gini Coefficient

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 4:24 PM, Peter Francis wrote: Dear List, I am unsure if this is specifically a R question or a stats question? I thought i would ask here and if i get no replies it will answer that! I am trying to calculate Gini coefficients in R, based on a slight modification of

Re: [R] comparing two data files

2010-10-19 Thread Mike Marchywka
From: nicol...@buffalo.edu Date: Tue, 19 Oct 2010 18:23:27 -0400 To: r-help@r-project.org Subject: [R] comparing two data files I have 2 large data files that I need to compare and find the differences between data file x and data file y in order

[R] RWeka - Error in model.frame.default - evaluate_Weka_classifier

2010-10-19 Thread Andreas Jansson
Hi, First of all, I'm a complete rookie to R (~2 weeks). But anyway, I'm trying to use the RWeka interface for C4.5 (J48) classification. As a proof of concept I'm using the Iris data set to create a training set of 30 instances (10 per species) and use the remaining 120 instances as my test

[R] Fix for xlsReadWrite 1.5.2 running in R2.12.0 (32-bit) on a Win7 64-bit platform

2010-10-19 Thread Hans-Peter Suter
Argh, just now I saw a scrambled start-up message when running xlsReadWrite1.5.2 in R2.12.0 (32-bit) on a Win7 64-bit platform. If you have this situation and use xlsReadWrite 1.5.2 (probably all earlier versions also) you can download a quick fix, see below. I don't know if this also affects

[R] DLL not found

2010-10-19 Thread Remko Duursma
Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). Problem: require(sp) Loading required package: sp Error in library.dynam(lib, package, package.lib) : DLL 'lattice' not found: maybe not installed for this architecture? require(lattice)

Re: [R] DLL not found

2010-10-19 Thread Duncan Murdoch
On 19/10/2010 6:50 PM, Remko Duursma wrote: Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). I have seen a similar error reported when someone had a copy of lattice in a library that came ahead of the system one. What does .libPaths() show

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
Hi Duncan, this is it: .libPaths() [1] c:\\remko\\rstuff\\library C:/PROGRA~1/R/R-212~1.0/library and you are right, I do have lattice installed in the latter I deleted it from the second library, but it still gives me the same error message. Remko

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
Ok so it works when I delete it from the first library (and not the second). I misunderstood... thanks! Remko Hi Duncan, this is it: .libPaths() [1] c:\\remko\\rstuff\\library C:/PROGRA~1/R/R-212~1.0/library and you are right, I do have lattice installed in the latter I

[R] sampling from normal

2010-10-19 Thread solafah bh
Hello If i want to resample from the lower tail of normal distribution , are these commands equivelant??  lower tail :qnorm(runif(n,0,pnorm(a))) if a is a lower tail bound or  lower tail:qnorm(p*runif(n)) if p is the probability of each interval(the observations are divided to intervals)  

[R] plot CI and mortality rate

2010-10-19 Thread XINLI LI
Dear R Users: I have the individual mortality rate and 95% CI of 100 hospitals, how to do the plot with the individual hospital in the Yaxis, and the mortality rate and 95% CI in the Xais and a overall mean as a reference line? Thanks and regards, Xin [[alternative HTML

Re: [R] Clustering with ordinal data

2010-10-19 Thread Michael Bedward
Hello Steve, I've been asked to help evaluate a vegetation data set, specifically to examine it for community similarity. The initial problem I see is that the data is ordinal.   At best this only captures a relative ranking of abundance and ordinal ranks are assigned after data collection.

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread Dennis Murphy
Hi: This is how you could do the same in ggplot2; geom_ribbon() does the shading. For your example, it seemed reasonable to put in reference lines, especially since the upper limits of one confidence band abutted the lower limits of the other in group a, so I averaged the upper and lower limits

[R] remove unused variable and data

2010-10-19 Thread Jumlong Vongprasert
Dear All I have this ls() [1] IWJR.completeIWJR.missing IWJR.reg.temp [4] IWJR.reg.temp.x IWJR.reg.temp.y IWJR.temp [7] Power.record.100.3.5 col.delete correlation.100.3.5 [10] iindex.temp iterate [13] j

Re: [R] remove unused variable and data

2010-10-19 Thread Henrique Dallazuanna
Try this: rm(list = setdiff(ls(), 'poprho.3')) On Tue, Oct 19, 2010 at 11:29 PM, Jumlong Vongprasert jumlong.u...@gmail.com wrote: Dear All I have this ls() [1] IWJR.completeIWJR.missing IWJR.reg.temp [4] IWJR.reg.temp.x IWJR.reg.temp.y IWJR.temp [7]

[R] is there a way to update both packages if they occur in 2 libraries?

2010-10-19 Thread Chris Howden
Hi everyone, I’ve recently added a private library as a way to manage my R libraries. And I did this by simply copying my old library to a new folder and then linking this to R by setting my R_LIBS environmental variable in .Renviron. However I have run into a problem. When I update my

Re: [R] plot CI and mortality rate

2010-10-19 Thread Ben Bolker
XINLI LI lihawaii at gmail.com writes: Dear R Users: I have the individual mortality rate and 95% CI of 100 hospitals, how to do the plot with the individual hospital in the Yaxis, and the mortality rate and 95% CI in the Xais and a overall mean as a reference line? Something

Re: [R] sampling from normal

2010-10-19 Thread Wu Gong
Hi Solafah, You are right that two commands are equivalent when p= pnorm(a). You can check the results by following codes. n - 5 a - -1 set.seed(123456) qnorm(runif(n,0,pnorm(a))) p - pnorm(a) set.seed(123456) qnorm(p*runif(n)) Anyway, the elements of the lower tail are not chosen equally by

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread Dennis Murphy
Hi: I agree with Ista's point that you shouldn't be doing loess with these data (x and y both need to be continuous for loess, but your x is discrete), but you shouldn't be computing boxplots at each YMRS_Sum value either because you don't have enough resid observations at Sum = 3 and 4. A

[R] Accessing table elements and escape characters

2010-10-19 Thread sachinthaka . abeywardana
Hi All, Are there any escape characters that I should be aware of when using table.read? I don't have any '#' characters in this table. I get the error: A-read.table(P:/temp.csv,header=TRUE, sep=,); Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 11018 did

[R] glm with linear restrictions

2010-10-19 Thread mege
I'm looking for a function or package to estimate a glm with linear restrictions (e.g. the sum of some parameters needs to be zero). I found the function orlm in the package ic.infer which works for lm models, but I need it for glm. Thanks, Markus

Re: [R] plot CI and mortality rate

2010-10-19 Thread Dennis Murphy
Hi: Following up on Ben's suggestion re ggplot2, here's a manufactured example: # Fake data: mortrate - round(runif(100), 3) dd - data.frame(rate = mortrate, moe = 1.96 * sqrt(mortrate * (1 - mortrate))/10, hosp = factor(paste('H', 1:100, sep = ''))) dim(dd) [1] 100 3 # Set

[R] question on optim() fn.

2010-10-19 Thread sharkoil
i am trying to use optim() fn in R to estimate mle of my pdf. even though I am able to get the results, but there are always warning message, which says that NaN produced. I am not very sure if I should ignore these warning message since I have got solution without error message. I am wondering

Re: [R] glm with linear restrictions

2010-10-19 Thread Bill.Venables
If b1+b2+b3 = 0 can't you put b3 = -b1-b2 and re-write the model in terms of b1 and b2 alone? The model is stil (g)linear. If the parameters to which you refer corresponds to the levels of a factor, then you can use the contr.sum contrast matrices. It essentailly does the above.

[R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
# Let's say I have 5 objects, object_1, object_2, etc. for (i in 1:5) { assign(paste(object_,i, sep=), i+500) } # Now, for whatever reason, I don't know the names of the objects I've created, but I want to operate on them. list-ls(pattern=^obj) #Is get best? for (l in list) { cat(\n, l,

Re: [R] is get() really what I want here?

2010-10-19 Thread Joshua Wiley
Hi Daniel, get() will work for any object, but cat() may not. cat() should work for arrays, but it will be messy even for relatively small ones. For example, run: cat(Hello, array(1:100, dim = c(10, 10)), sep = ) What are you really trying to do? If you are just trying to figure out what

[R] Adding Legend about two quantile lines at ggplot

2010-10-19 Thread YN Kim
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1-rnorm(100,0,5) score2-rnorm(400,10,15) mydata-data.frame(score1,score2)

Re: [R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
Hi Josh, What I'm really trying to do is to refer to objects whose names I have stored in a vector. This example was arbitrary. I do a lot of looping through files in the working directory, or through objects in the namespace, and I'm confused about how best to call upon them from within a loop.

<    1   2