Re: [R] Manage huge database

2008-09-22 Thread José E. Lozano
Hello: I've been reading all the replies, and I think I have some good ideas to work on. Right now the code I programmed is running, It has been running in a batch process 20h now, and It has imported 1750 rows out of 2000. I will read docs for the bioconductor package, and I will check the gawk

Re: [R] R-2.7.2 infected?

2008-09-22 Thread Peter Dalgaard
Dave DeBarr wrote: Did you check the md5 checksum on it? Yes; it matched: 540090dd892657804d1099c54d6f770d And it is binary identical to the Austria CRAN one. You're the first to report it, and 2.7.2 has been out for almost a month, so I think it's likely that the CRAN copy is un

Re: [R] R-2.7.2 infected?

2008-09-22 Thread Dave DeBarr
> Did you check the md5 checksum on it? Yes; it matched: 540090dd892657804d1099c54d6f770d > You're the first to report it, and 2.7.2 has been out for almost a month, so > I think it's likely that the CRAN copy is uninfected. Sounds promising. Perhaps it's a false positive from eTrust. > If

Re: [R] Create groups from data to compute lm?

2008-09-22 Thread Michael Just
Hello again, After getting some help from a reader of this board my issue has been resolved. To group I will now use something like this: sub.all <- subset(all, ex_bin==250, select= c(pfor, ED, PD)) before I perform any further analysis, such as lm. Thanks, M Just Hello, B

Re: [R] Newbie: Formatting numbers with commas

2008-09-22 Thread Henrik Bengtsson
x <- c(123023,143494035); > format(x, big.mark=","); [1] "123,023" "143,494,035" > format(x, big.mark=",", trim=TRUE); [1] "123,023" "143,494,035" See also ?prettyNum (and formatC). /Henrik On Mon, Sep 22, 2008 at 9:23 PM, Matthew Pettis <[EMAIL PROTECTED]> wrote: > Hi, > > Search throug

[R] Newbie: Formatting numbers with commas

2008-09-22 Thread Matthew Pettis
Hi, Search through the R archives, and couldn't find my answer... how do you format numbers with commas (standard American, one every three digits)? Thanks, Matt -- It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas _

Re: [R] R-2.7.2 infected?

2008-09-22 Thread Ajay ohri
could this be an intentional attack to compromise a very popular download, and infect thousands of people.what could be the motivations...i hope its not some corporate thug here What exactly does the Win32/Adclicker.JO trojan do ??? Ajay www.decisionstats.com www.iwannacrib.com On Tue, Sep 2

[R] Create groups from data to compute lm?

2008-09-22 Thread Michael Just
Hello, Below are the first two rows from my dataset and the header. This dataset has 5749 rows and I want to select only certain rows to be used based on existing grouping values. I am trying to group the data based on the values under 'ex_bin'. (e.g a group for 250, 251, 252, 500, 501, 502) I woul

Re: [R] R-2.7.2 infected?

2008-09-22 Thread Duncan Murdoch
Dave DeBarr wrote: I tried downloading R-2.7.2 (http://cran.cnr.berkeley.edu/bin/windows/base/R-2.7.2-win32.exe, both from Berkeley and cran) and both times I got a warning from Computer Associates eTrust Antivirus (version 7.1.710) that the Win32/Adclicker.JO trojan was detected: The Win32/A

[R] Error: subscript out of bounds.

2008-09-22 Thread Rolf Turner
Consider: > x <- array(1:12,dim=12) > x[13] [1] NA] > m <- array(1:12,dim=c(3,4)) > m[3,5] Error: subscript out of bounds Can anyone tell me it there is a Good Reason for the difference in behaviour between 1 dimensional and higher dimensional a

Re: [R] sort a data matrix by all the values and keep the names

2008-09-22 Thread hadley wickham
Hmm, maybe it only works in my development version (to be released v. v. soon) Hadley On Mon, Sep 22, 2008 at 8:02 PM, Steven McKinney <[EMAIL PROTECTED]> wrote: > Is something missing in the melt()? > >> x<-data.frame(x1=c(1,7),x2=c(4,6),x3=c(8,2)) >> require("reshape") > Loading required packag

Re: [R] perl expression question

2008-09-22 Thread jim holtman
If this is a path name, then 'basename' will work for you: > stock<-"/opt/limsrv/mark/research/equity/projects/testDL/stock_data/fhdb/US/BLC.NYSE" > basename(stock) [1] "BLC.NYSE" > On Mon, Sep 22, 2008 at 8:29 PM, <[EMAIL PROTECTED]> wrote: > If I have the string below. does someone know a reg

Re: [R] perl expression question

2008-09-22 Thread Gabor Grothendieck
By the way, although a regular expression solutions was asked for if one expands that to any solution then R does have a function specifically for this case: > basename(stock) [1] "BLC.NYSE" On Mon, Sep 22, 2008 at 9:23 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try this: > >> sub(".*/",

Re: [R] perl expression question

2008-09-22 Thread Gabor Grothendieck
Try this: > sub(".*/", "", stock) [1] "BLC.NYSE" On Mon, Sep 22, 2008 at 8:29 PM, <[EMAIL PROTECTED]> wrote: > If I have the string below. does someone know a regular expression to just > get the "BLC.NYSE". I bought the O'Reilley > book and read it when I can and I study the solutions on the l

Re: [R] perl expression question

2008-09-22 Thread Andrew Robinson
Hi Mark, do you mean the regex to get the portion of the address after the final slash? Something like gsub(".*/([^/]*$)", "\\1", stock, fixed=FALSE) Cheers Andrew On Mon, Sep 22, 2008 at 07:29:25PM -0500, [EMAIL PROTECTED] wrote: > If I have the string below. does someone know a regular expr

[R] plot implicit function

2008-09-22 Thread Ying-Ying Lee
Hi, I would like to know how to plot the implicit function. For example, f(x,y)=0. I'd like to plot x-y figure. Thanks, Ying __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] sort a data matrix by all the values and keep the names

2008-09-22 Thread Steven McKinney
Is something missing in the melt()? > x<-data.frame(x1=c(1,7),x2=c(4,6),x3=c(8,2)) > require("reshape") Loading required package: reshape > dfm <- melt(x, id = c()) Error in if (!missing(id.var) && !(id.var %in% varnames)) { : missing value where TRUE/FALSE needed > dfm[order(dfm$value), ] Erro

[R] How to view or export values of 'names' in a lm

2008-09-22 Thread Jhunk Emale
Hello, I have been using: model <- lm(y~x+I(x^2)) I am namely interested in the values of the residuals. If I use the 'names' command I get the following: names(model) [1] "coefficients" "residuals" "effects" "rank" [5] "fitted.values" "assign""qr""df.residual"

Re: [R] perl expression question

2008-09-22 Thread Moshe Olshansky
Hi Mark, stock<-"/opt/limsrv/mark/research/equity/projects/testDL/stock_data/fhdb/US/BLC.NYSE" > gsub(".*/([^/]+)$", "\\1",stock) [1] "BLC.NYSE" --- On Tue, 23/9/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject: [R] perl expression questi

Re: [R] suppress legend in ggplot(data, aes(y=Y, x=X,fill=Z))?

2008-09-22 Thread hadley wickham
On Sun, Sep 21, 2008 at 5:25 PM, Tom Bonen <[EMAIL PROTECTED]> wrote: > hi, > > is there any way to suppress the legend in ggplot(data, aes(y=Y, > x=X,fill=Z)) ? i'd like the values to be displayed in different colors > as specified by fill= and this works just fine. but i do not want to > have the

Re: [R] sort a data matrix by all the values and keep the names

2008-09-22 Thread zhihuali
This is exactly what I wanted! Thank you so much! Z > Date: Mon, 22 Sep 2008 19:21:43 -0500 > From: [EMAIL PROTECTED] > Subject: RE: [R] sort a data matrix by all the values and keep the names > To: [EMAIL PROTECTED] > > Hi: there might be a quicker way but you can use stack and order. stack

Re: [R] sort a data matrix by all the values and keep the names

2008-09-22 Thread hadley wickham
On Mon, Sep 22, 2008 at 6:54 PM, zhihuali <[EMAIL PROTECTED]> wrote: > > Dear all, > > If I have a data frame x<-data.frame(x1=c(1,7),x2=c(4,6),x3=c(8,2)): > x1 x2 x3 > 1 4 8 > 7 6 2 > > I want to sort the whole data and get this: > x1 1 > x3 2 > x2 4 > x2 6 > x1 7 > x3 8

[R] R-2.7.2 infected?

2008-09-22 Thread Dave DeBarr
I tried downloading R-2.7.2 (http://cran.cnr.berkeley.edu/bin/windows/base/R-2.7.2-win32.exe, both from Berkeley and cran) and both times I got a warning from Computer Associates eTrust Antivirus (version 7.1.710) that the Win32/Adclicker.JO trojan was detected: The Win32/Adclicker.JO was detec

Re: [R] sort a data matrix by all the values and keep the names

2008-09-22 Thread Moshe Olshansky
One possibility is: > x <- data.frame(x1=c(1,7),x2=c(4,6),x3=c(8,2)) > names <- t(matrix(rep(names(x),times=nrow(x)),nrow=ncol(x))) > m <- as.matrix(x) > ind <- order(m) > df <- data.frame(name=names[ind],value=m[ind]) > df name value 1 x1 1 2 x3 2 3 x2 4 4 x2 6 5 x1

[R] perl expression question

2008-09-22 Thread markleeds
If I have the string below. does someone know a regular expression to just get the "BLC.NYSE". I bought the O'Reilley book and read it when I can and I study the solutions on the list but I'm still not self sufficient with these things. Thanks. stock<-"/opt/limsrv/mark/research/equity/project

[R] sort a data matrix by all the values and keep the names

2008-09-22 Thread zhihuali
Dear all, If I have a data frame x<-data.frame(x1=c(1,7),x2=c(4,6),x3=c(8,2)): x1 x2 x3 1 4 8 7 6 2 I want to sort the whole data and get this: x1 1 x3 2 x2 4 x2 6 x1 7 x3 8 If I do sort(X), R reports: Error in order(list(x1 = c(1, 7), x2 = c(4, 6), x3 = c(8, 2)),

[R] Prediction errors from forecast()?

2008-09-22 Thread Laura Pyle
Sorry, I am resending in plain text. Hello, I am using forecast() in the forecast package to predict future values of an ARIMA model fit to a time series. I have read most of the documentation for the forecast package, but I can't figure out how to obtain the forecast variance for the predicted

Re: [R] Warranty on Accuracy, Precision, Legality, ... of R in Research

2008-09-22 Thread hadley wickham
On Mon, Sep 22, 2008 at 4:07 PM, Marc Schwartz <[EMAIL PROTECTED]> wrote: > on 09/22/2008 11:26 AM Bert Chan wrote: >> Warranty on Accuracy, Precision, Legality, ... of R in Research >> >> (These questions may well have been raised.) >> >> What is the implied warranty of using R for research & publ

Re: [R] Weights for polr

2008-09-22 Thread Thomas Lumley
On Mon, 22 Sep 2008, Gregory Wawro wrote: Hello, I'm estimating an ordered logit model on a probability weighted survey sample. You could use svyolr() in the survey package. polr permits case weights with the "weights" option, but I cannot figure out from existing documentation what it act

[R] Prediction errors from forecast()?

2008-09-22 Thread Laura Pyle
Hello, I am using forecast() in the forecast package to predict future values of an ARIMA model fit to a time series. I have read most of the documentation for the forecast package, but I can't figure out how to obtain the forecast variance for the predicted values. I tried using the argument "s

[R] Help for SUR model

2008-09-22 Thread Xianchun Liao
I am an R beginner and trying to run a SUR model in R framework. subset(esasp500, Obs <=449 & Obs>=197, select = -Date) ->ev13sub c(Obs>=397) & c(Obs<=399) ->d13 c(Obs>=400) & c(Obs<=449) ->f13 SP500*f13 ->SP500f13 BBC~SP500+d13+SP500f13 ->sur132 BOW~SP500+d13+SP500f13 ->sur133 CSK~S

[R] Weights for polr

2008-09-22 Thread Gregory Wawro
Hello, I'm estimating an ordered logit model on a probability weighted survey sample. polr permits case weights with the "weights" option, but I cannot figure out from existing documentation what it actually does with these weights. I'm concerned about this because I get somewhat different

Re: [R] Deleting multiple variables

2008-09-22 Thread Andrew Robinson
Mike, how about M_UC <- M_UC[,-(myvars[1]:myvars[2])] ? Andrew On Mon, Sep 22, 2008 at 11:04:34PM +0100, Michael Pearmain wrote: > Hi All, > i have searched the web for a simple solution but have been unable to find > one. Can anyone recommend a neat way of deleting multiple variable? > I see

[R] Deleting multiple variables

2008-09-22 Thread Michael Pearmain
Hi All, i have searched the web for a simple solution but have been unable to find one. Can anyone recommend a neat way of deleting multiple variable? I see, i need to use dataframe$VAR<-NULL to get rid of one variable, In my situation i need to delete all vars between two points. I've used the '

Re: [R] Coefficients, OR and 95% CL

2008-09-22 Thread Jorge Ivan Velez
Dear Luciano, See ?logistic.display in the epicalc package. If glm1 is your model, something like logistic.display(glm1) should do the job. HTH, Jorge On Mon, Sep 22, 2008 at 5:28 PM, Luciano La Sala <[EMAIL PROTECTED]>wrote: > Dear R-users, > > After running a logistic regression, I need

[R] Coefficients, OR and 95% CL

2008-09-22 Thread Luciano La Sala
Dear R-users, After running a logistic regression, I need to calculate OR by exponentiating the coefficient, and then I need the 95% CL for the OR as well. For the following example (taken from P. Dalaagard's book), what would be the most straightforward method of getting what I need? Could any

Re: [R] Warranty on Accuracy, Precision, Legality, ... of R in Research

2008-09-22 Thread Marc Schwartz
on 09/22/2008 11:26 AM Bert Chan wrote: > Warranty on Accuracy, Precision, Legality, ... of R in Research > > (These questions may well have been raised.) > > What is the implied warranty of using R for research & publications, > consulting, etc.? > > Alternately, how does one obtain such a war

[R] lme problems

2008-09-22 Thread Tommaso Pizzari
Hi, I'm analysing a dataset in which the same 5 subjects (male.pair) were subjected to two treatments (treatment) and were measured for 12 successive days within each treatment (layingday). Overall 5*2*12=120 observations. I want to test the effect of treatment, time (layingday) and their inte

Re: [R] findInterval(), binary search, log(N) complexity

2008-09-22 Thread Duncan Murdoch
On 9/22/2008 1:51 PM, Markus Loecher wrote: Dear R users, the help for findInterval(x,vec) suggests a logarithmic dependence on N (=length(vec)), which would imply a binary search type algorithm. However, when I "test" this hypothesis, in the following manner: R is open source. Why test things

Re: [R] Manage huge database

2008-09-22 Thread Thomas Lumley
On Mon, 22 Sep 2008, Martin Morgan wrote: "José E. Lozano" <[EMAIL PROTECTED]> writes: Maybe you've not lurked on R-help for long enough :) Apologies! Probably. So, how much "design" is in this data? If none, and what you've basically got is a 2000x50 grid of numbers, then maybe a more

Re: [R] Hmisc and Ubuntu (aptitude install)

2008-09-22 Thread Matthew Pettis
Hi All, After rebuilding my Ubuntu image, I followed the instruction in this thread, and everything worked out fine -- thank you again. So, I'll just add: if you use R and perl, and don't have to download perl5.10, then don't do it, at least not yet. Or, if you do, then you will have a lot of sh

[R] Profiling on Multicore and Parallel Systems

2008-09-22 Thread Imanpreet
Hello All, In general when we use Rprof for performance evaluation on Multicore systems the output provides the time on the basis of the "user" time and the sampling time is equal to the the user time as reported by system.time. This does not seem right behavior when R is linked to BLA

Re: [R] graphing netCDF files

2008-09-22 Thread Paul Hiemstra
Hi Steve, If you read your netCDF files into R you end up with sp-classes which can be displayed using spplot. But you do not seem to use rgdal. If you can make a data.frame with the x, y and z coordinates this can quite easily be transformed into an sp-class: library(sp) dat = data.frame(x

Re: [R] How to find a shift between two curves or data sets

2008-09-22 Thread Sébastien Durand
Dear Hans, Thanks for your reply. I will read that book. Cheers! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, m

[R] the package of R which is related Hosmer?Lemeshow test?

2008-09-22 Thread leo_wa
the package of R which is related Hosmer?Lemeshow test? -- View this message in context: http://www.nabble.com/the-package-of-R-which-is-related-Hosmer-Lemeshow-test--tp19613179p19613179.html Sent from the R help mailing list archive at Nabble.com. __

[R] findInterval(), binary search, log(N) complexity

2008-09-22 Thread Markus Loecher
Dear R users, the help for findInterval(x,vec) suggests a logarithmic dependence on N (=length(vec)), which would imply a binary search type algorithm. However, when I "test" this hypothesis, in the following manner: set.seed(-3645); l <- vector(); N.seq <- c(5000, 50, 100, 1000, 5

Re: [R] change the panel name in xyplot

2008-09-22 Thread Henrique Dallazuanna
Try this: xyplot(Murder ~ Population | state.region, data = states, strip = strip.custom(factor.levels = c(expression(italic(A)), "B", "C", "D"))) On Mon, Sep 22, 2008 at 4:33 PM, Ronaldo Reis Junior <[EMAIL PROTECTED]> wrote: > Hi, > > I try to change the panel name in a xyplot w

[R] change the panel name in xyplot

2008-09-22 Thread Ronaldo Reis Junior
Hi, I try to change the panel name in a xyplot without success. Look this example from xyplot manual: xyplot(Murder ~ Population | state.region,data=states) The panel title are: Northeast, South, North Central, West, that are factor from state.region. I need do change some names and, for exam

[R] gbm error

2008-09-22 Thread Darin Brooks
Good afternoon Has anyone tried using Dr. Elith's BRT script? I cannot seem to run gbm.step from the installed gbm package. Is it something external to gbm? When I run the script itself <- gbm.step(data=model.data, gbm.x = colx:coly, gbm.y = colz, family = "bernoulli",

[R] Building binary package fails because of missing dependent package

2008-09-22 Thread Hans-Peter Suter
On an (Intel Leopard) Mac I try to build a package (mxFinance) which depends on another package (mxGraphics). The dependendy is 1) a 'Depends:' in DESCRIPTION and 2) an import in NAMESPACE. - The build fails if the dependent package (mxGraphics) is not installed in the R.framework Do I need to ha

Re: [R] How to execute external programs with R?

2008-09-22 Thread Duncan Murdoch
On 9/22/2008 2:50 PM, Arthur Roberts wrote: Hi, all, Could anyone give me advise on who the execute external programs with R? It would be greatly appreciated. The system() or shell() functions can do this; Windows also has shell.exec(). Duncan Murdoch ___

[R] How to execute external programs with R?

2008-09-22 Thread Arthur Roberts
Hi, all, Could anyone give me advise on who the execute external programs with R? It would be greatly appreciated. Art Roberts University of Washington. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] changing the text offset for axis labels

2008-09-22 Thread Greg Snow
Look at ?par and scroll down to the section on 'mgp'. Or you can suppress the axis when you make the plot, then use the axis function to include it with more control (see ?axis). Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED]

Re: [R] Hmisc and Ubuntu (aptitude install)

2008-09-22 Thread Matthew Pettis
Thank You All, I think all of this may have been due to shared library conflict headaches. At one point, I inadvertently upgraded my Perl install to 5.10, and I think that messed up a lot of my libraries. I have now started with a clean Ubuntu install, and am going to see if I can work my way ba

Re: [R] Statistical question re assessing fit of distribution functions.

2008-09-22 Thread Timur Shtatland
If one of the goals is the normality test, then there may be better alternatives to the Kolmogorov-Smirnov test. See an explanation on: http://graphpad.com/FAQ/viewfaq.cfm?faq=959 The R implementation: ?shapiro.test A casual search also turned this up: http://tolstoy.newcastle.edu.au/R/help/04/09

Re: [R] reading in results from system(). There must be an easier way...

2008-09-22 Thread Michael A. Gilchrist
Sorry, I misunderstood what I was doing and misspoke. I don't think there's a bug. I had called COMMAND w/in read.delim. Thanks for all of your help and sorry for the misinformation. Sincerely, Mike - Department of Ecology & Evolutionary B

Re: [R] as.day() Function (zoo question)

2008-09-22 Thread stephen sefick
perfect thanks On Mon, Sep 22, 2008 at 1:07 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > chron values are represented as day + fraction of a day so: > try this: > > aggregate(z, floor, mean) > > On Mon, Sep 22, 2008 at 12:56 PM, stephen sefick <[EMAIL PROTECTED]> wrote: >> I am was going to

Re: [R] as.day() Function (zoo question)

2008-09-22 Thread Gabor Grothendieck
chron values are represented as day + fraction of a day so: try this: aggregate(z, floor, mean) On Mon, Sep 22, 2008 at 12:56 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > I am was going to look at the as.yearmon function in the zoo package > and write a as.day function to aggregate a time seri

[R] as.day() Function (zoo question)

2008-09-22 Thread stephen sefick
I am was going to look at the as.yearmon function in the zoo package and write a as.day function to aggregate a time series of 96 observations per day into the mean for each day, but I don't know how to look at the code so that I can convert it into something I can use. On top of that I believe th

[R] changing the text offset for axis labels

2008-09-22 Thread Arthur Roberts
Hi, all, I was wondering if there is a way to change the offset of axis labels from the axis. In other words, I need the axis labels closer to the acis than the default. Thanks for the help. Best wishes, Art Roberts University of Washington Seattle, WA ___

Re: [R] Manage huge database

2008-09-22 Thread Gabor Grothendieck
Try this: read.table(pipe("/Rtools/bin/gawk -f cut.awk bigdata.dat")) where cut.awk contains the single line (assuming you want fields 101 through 110 and none other): { for(i = 101; i <= 110; i++) printf("%s ", $i); printf "\n" } or just use cut. I tried the gawk command above on Windows Vist

[R] Statistical question re assessing fit of distribution functions.

2008-09-22 Thread Ted Byers
I am in a situation where I have to fit a distrution, such as cauchy or normal, to an empirical dataset. Well and good, that is easy. But I wanted to assess just how good the fit is, using ks.test. I am concerned about the following note in the docs (about the example provided): "Note that the

Re: [R] SmoothScatter plot range issue

2008-09-22 Thread Henrik Bengtsson
Hi, Bioconductor.org is the home of the geneplotter package. You get a quicker response if you ask there. /Henrik On Mon, Sep 22, 2008 at 7:06 AM, Jason Pare <[EMAIL PROTECTED]> wrote: > Hello, > > I am attempting to use smoothScatter to plot a heatmap of locations of > events in an x-y axis. W

Re: [R] Need help creating spatial correlation for MC simulation

2008-09-22 Thread jjh21
Thank you for the input. Which command in the spatstat package am I looking for? The documentation is unclear to me. milton ruser wrote: > > Dear J.J.Harden > > I think that on spatial stat you will find several ways of simulate > spatial > pattern that (point or line) that may be what you ar

Re: [R] how to set rownames / colnames for matrices in a list

2008-09-22 Thread Alain Guillet
Hi, If all your matrices have the same size, you should work with an array and not with a list. Then you can use dimnames to set the names of the rows, columns, and so on.. Alain Antje wrote: Hello, I have another stupid question. I hope you can give me a hint how to solve this: I have

[R] Using wildcards in subsets

2008-09-22 Thread Daniel Münch
Hi there, I am looking for a way to use wildcards in a subset, this is not working: subset(data, colname-1=="value"&colname2=="value*", select=colx:coly) is there a way to use wildcards here? Thanks for your help, Daniel [[alternative HTML version deleted]] _

[R] how to set rownames / colnames for matrices in a list

2008-09-22 Thread Antje
Hello, I have another stupid question. I hope you can give me a hint how to solve this: I have a list and one element is again a list containing matrices, all of the same dimensions. Now, I'd like to set the dimnames for all matrices: example code: m1 <- matrix(1:25, nrow=5) m2 <- matrix(26:

Re: [R] Manage huge database

2008-09-22 Thread Ted Harding
On 22-Sep-08 11:00:30, José E. Lozano wrote: >> So is each line just ACCGTATAT etc etc? > > Exacty, A_G, A_A, G_G and the such. > >> If you have fixed width fields in a file, so that every line is the >> same length, then you can use random access methods to get to a >> particular value - just mu

[R] Re lative novice: Working with fitdistr(MASS): 3 questions

2008-09-22 Thread Ted Byers
OK, I am now at the point where I can use fitdistr to obtain a fit of one of the standard distributions to mydata. It is quite remarkable how different the parameters are for different samples through from the same system. Clearly the system itself is not stationary. Anyway, question 1: I requ

Re: [R] Manage huge database

2008-09-22 Thread Barry Rowlingson
2008/9/22 jim holtman <[EMAIL PROTECTED]>: > Why don't you make one pass through your data and encode you > characters as integers (it would appear that you only have 16 > combinations). You might also want to consider using the 'raw' object > since these only take up one byte of storage -- will r

Re: [R] Manage huge database

2008-09-22 Thread jim holtman
Why don't you make one pass through your data and encode you characters as integers (it would appear that you only have 16 combinations). You might also want to consider using the 'raw' object since these only take up one byte of storage -- will reduce your storage requirements by 4. Then store e

Re: [R] Combine data frames using column names as "key"

2008-09-22 Thread Henrique Dallazuanna
Try: data.frame(merge(df1, df2, by = "row.names"), row.names = 1) On Mon, Sep 22, 2008 at 12:34 PM, jimineep <[EMAIL PROTECTED]> wrote: > > Hi guys, > > Suppose I have 2 data frames ie: > values > one0.32 > two0.25 > three 0.11 > > and > values > two0.66 > one0.74

[R] Combine data frames using column names as "key"

2008-09-22 Thread jimineep
Hi guys, Suppose I have 2 data frames ie: values one0.32 two0.25 three 0.11 and values two0.66 one0.74 three 0.19 nb the first column is the row names in both cases How can I combine them on the row names column? Ie to make something like values.

Re: [R] Manage huge database

2008-09-22 Thread José E. Lozano
> So is each line just ACCGTATAT etc etc? Exacty, A_G, A_A, G_G and the such. > If you have fixed width fields in a file, so that every line is the > same length, then you can use random access methods to get to a > particular value - just multiply the line length by the row number you Nice hint

Re: [R] Manage huge database

2008-09-22 Thread José E. Lozano
> What are you going to do with the data once you have read it in? Are > all the data items numeric? If they are numeric, you would need at > least 8GB to hold one copy and probably a machine with 32GB if you > wanted to do any manipulation on the data. Well, I will use only sets of variables to

Re: [R] Time series (ts) questions.

2008-09-22 Thread Gabor Grothendieck
Try this to append 100 to the end of the series, say: tt <- ts(1:12, frequency=5) # sample data ts(c(tt, 100), start = start(tt), frequency = frequency(tt)) On Mon, Sep 22, 2008 at 2:17 AM, <[EMAIL PROTECTED]> wrote: > I have been working with the base time series object (ts) and I had a couple

Re: [R] zoo: hourly values (local time) not unique

2008-09-22 Thread Gabor Grothendieck
See question #1 in the zoo faq: library(zoo) vignette("zoo-faq") Also in the upcoming zoo 1.6-0, not yet on CRAN but in the development version at R-Forge found here: http://r-forge.r-project.org/projects/zoo/ there are a set of make.unique functions and a make.unique= argument in read.zoo whic

Re: [R] paste with list

2008-09-22 Thread Antje
Great! That's exactly what I was looking for. (I see, I still have to learn a lot...) Thank you! Antje Dimitris Rizopoulos schrieb: try this: t1 <- c(1, 2, 3) t2 <- c(3.4, 5.5, 1.1) tl <- list(t1, t2) do.call("paste", c(tl, sep = "\t")) I hope it helps. Best, Dimitris Antje wrote: He

Re: [R] paste with list

2008-09-22 Thread Henrique Dallazuanna
Try this: paste(tl[[1]], tl[[2]], sep="\t") On Mon, Sep 22, 2008 at 11:08 AM, Antje <[EMAIL PROTECTED]> wrote: > Hello, > > I guess the solution is rather simple but whatever I tried, I don't manage > to get the result as I want to have it: > > I have several vectors of equal length in a list and

Re: [R] paste with list

2008-09-22 Thread Dimitris Rizopoulos
try this: t1 <- c(1, 2, 3) t2 <- c(3.4, 5.5, 1.1) tl <- list(t1, t2) do.call("paste", c(tl, sep = "\t")) I hope it helps. Best, Dimitris Antje wrote: Hello, I guess the solution is rather simple but whatever I tried, I don't manage to get the result as I want to have it: I have several

[R] zoo: hourly values (local time) not unique

2008-09-22 Thread vwl-mailingliste
Hi! I've got a time series as a zoo object which contains hourly values. My problem is that these values occur in every "real" hour with regard to daylight savings time. I.e. the last sunday in march, i'll have 23values whereas the last sunday in october contains 25 values instead of 24. Thus

[R] paste with list

2008-09-22 Thread Antje
Hello, I guess the solution is rather simple but whatever I tried, I don't manage to get the result as I want to have it: I have several vectors of equal length in a list and I'd like to combine all first elements to a single string, all second elements to a single string, ..., all n-th elem

[R] SmoothScatter plot range issue

2008-09-22 Thread Jason Pare
Hello, I am attempting to use smoothScatter to plot a heatmap of locations of events in an x-y axis. When I plot the heatmap without passing xlim and ylim parameters, it fills the plot area but the perspective is a bit skewed. I would like to standardize these plots to a uniform window size that d

Re: [R] adding layers in ggplot2 (data and code included)

2008-09-22 Thread hadley wickham
Hi Juliet, On Sun, Sep 21, 2008 at 11:47 PM, Juliet Hannah <[EMAIL PROTECTED]> wrote: > Here is some sample data: > > mydata <- read.table(textConnection("Est GroupTri > 00 4.639644 > 10 4.579189 > 20 4.590714 > 01 4.443696 > 1

Re: [R] Likelihood between observed and predicted response

2008-09-22 Thread Ben Bolker
Christophe LOOTS ifremer.fr> writes: > > Thank you so much for your help. > > The function "dbinom" seems to work very well. > > However, I'm a bit lost with the "dnorm" function. > > Apparently, I have to compute the mean "mu" and the standard deviation > "sd" but what does it mean exactly?

[R] use of system() under Linux

2008-09-22 Thread Rainer M Krug
H I want to use the system() command to execute a command and have to return the result in a r-variable, so I an using intern=TRUE. On the other hand, I want to evaluate the return value of the command, to determine if the command was successful. According to the help, these to objectives are ex

Re: [R] Manage huge database

2008-09-22 Thread Martin Morgan
"José E. Lozano" <[EMAIL PROTECTED]> writes: >> Maybe you've not lurked on R-help for long enough :) Apologies! > > Probably. > >> So, how much "design" is in this data? If none, and what you've >> basically got is a 2000x50 grid of numbers, then maybe a more raw > > Exactly, raw data, but a l

Re: [R] Hmisc and Ubuntu (aptitude install)

2008-09-22 Thread Dirk Eddelbuettel
On Mon, Sep 22, 2008 at 08:48:12AM -0400, Vincent Goulet wrote: > Matthew, > > As per the CRAN Ubuntu README > > http://cran.r-project.org/bin/linux/ubuntu/ > > install the Ubuntu r-base-dev package to compile R packages from > sources. Well there should be a working r-cran-hmisc package.

Re: [R] Hmisc and Ubuntu (aptitude install)

2008-09-22 Thread Vincent Goulet
Matthew, As per the CRAN Ubuntu README http://cran.r-project.org/bin/linux/ubuntu/ install the Ubuntu r-base-dev package to compile R packages from sources. Vincent Le lun. 22 sept. à 00:08, Matthew Pettis a écrit : Hi, I'm trying to get the Hmisc module on my Ubuntu Hardy Heron

[R] Likelihood between observed and predicted response

2008-09-22 Thread Christophe LOOTS
Thank you so much for your help. The function "dbinom" seems to work very well. However, I'm a bit lost with the "dnorm" function. Apparently, I have to compute the mean "mu" and the standard deviation "sd" but what does it mean exactly? I only have a vector of predicted response and a vector

[R] Joint maximum likelihood estimation for ordinal data

2008-09-22 Thread denn
Dear R users >From what I understand, the joint maximum likelihood procedure for Rasch (availabe in the package MiscPsycho) in R can only be used on binary data. I was wondering if the code is currently being adapted for application to ordinal data? I'm trying to replicate results obtained from

Re: [R] Help for R

2008-09-22 Thread Uwe Ligges
Please read the posting guide an tell us: - Which version of R - Which OS? - Which version of the "matlab" package (I guess you are using that one?) - If Windows and a binary version of the matlab package: Does the binary it fit to your version of R? Uwe Ligges Mac wrote: Dear R users£¬

[R] auto.arima help.

2008-09-22 Thread rkevinburton
Hello, I am calling the auto.arima method in the forecast package at it returns what seems to be valid Arima output. But when I feed this output to 'predict' I get: Error in predict.Arima(catall.fit[[.index]], n.ahead = 12) : 'xreg' and 'newxreg' have different numbers of columns Is there a

Re: [R] rgl: How to position a window during open3d call

2008-09-22 Thread Koen Stegen
Duncan Murdoch wrote: > This is fixed now on R-forge; eventually it will make it into the next > rgl release on CRAN. You should be able to download a binary of the > development version from R-forge sooner. Make sure you get version > 0.81.706 or newer. The R-forge version 0.81.706 works as adv

Re: [R] Manage huge database

2008-09-22 Thread Barry Rowlingson
2008/9/22 José E. Lozano <[EMAIL PROTECTED]>: > Exactly, raw data, but a little more complex since all the 50 variables > are in text format, so the width is around 2,500,000. > Thanks, I will check. Right now I am reading line by line the file. It's > time consuming, but since I will do it

Re: [R] Manage huge database

2008-09-22 Thread jim holtman
What are you going to do with the data once you have read it in? Are all the data items numeric? If they are numeric, you would need at least 8GB to hold one copy and probably a machine with 32GB if you wanted to do any manipulation on the data. You can use a 'connection' and 'scan' to read the

Re: [R] Manage huge database

2008-09-22 Thread José E. Lozano
> Maybe you've not lurked on R-help for long enough :) Apologies! Probably. > So, how much "design" is in this data? If none, and what you've > basically got is a 2000x50 grid of numbers, then maybe a more raw Exactly, raw data, but a little more complex since all the 50 variables are i

[R] matrix balancing on margins

2008-09-22 Thread PALMIER Patrick - CETE NP/INFRA/TRF
Hello, Is there any package in R for balancing matrix I want to estimate a matrix with * a initial matrix (1 everywhere for example) * Row margin * Col margin * distance class vector (each cell of the matrix belong to a distance class) and I want that the distance class rep

Re: [R] Manage huge database

2008-09-22 Thread Barry Rowlingson
2008/9/22 José E. Lozano <[EMAIL PROTECTED]>: >> I wouldn't call a 4GB csv text file a 'database'. > It didn't help, sorry. I perfectly knew what a relational database is (and I > humbly consider myself an advanced user on working with MSAccess+VBA, only > that I've never face this problem with v

Re: [R] Why isn't R recognising integers as numbers?

2008-09-22 Thread Ted Harding
Hi Ted (from Ted), Just to clarify Marc's comments about dataframes in more basic terms. If you read in data with read.csv() the result returned by the function is a dataframe. This is a specialised kind of list, which you can think of as a list of "columns" all of the same length. You can think o

  1   2   >