Re: [R] system vs shell wait command

2010-01-25 Thread robbert blonk
Hi, thanks a lot for your time! However, after testing the program on itself (out of the R env, I found out that something was wrong in the compilation of the linux version (segmentation problem, due to memory allocation?). Unfortunately the thrown error was not mentioned by R. Sorry for

[R] Odp: fatal error unable to restore saved data in .rdata

2010-01-25 Thread Petr PIKAL
Hi could it be that some package is not installed which was used during previous session? If it is true, you can add a package and try to open it again. Regards Petr r-help-boun...@r-project.org napsal dne 23.01.2010 16:56:56: Dear R help team, I am trying to open R to continue my

Re: [R] column selection in list

2010-01-25 Thread Ivan Calandra
Thanks, I didn't think about the help for such a character. Ivan Le 1/22/2010 18:50, baptiste auguie a écrit : ?[ should give you enough information. In short, [ is an operator to extract elements, you can think of it as a function with special semantics. For a simple vector, v = c(one, two)

Re: [R] RMySQL Append data.frame to table

2010-01-25 Thread Orvalho Augusto
May be because by default dbWriteTable has row.names = T. So try with row.names = F. Good Luck Caveman On Mon, Jan 25, 2010 at 8:57 AM, Nathan S. Watson-Haigh nathan.watson-ha...@csiro.au wrote: I have a data.frame obj with 5 columns whose colnames match the fields in my contact table. The

[R] RODBC compatibility with older ODBC versions

2010-01-25 Thread Richard.Kiefer
Dear list, this is my first question at this place, so I hope I do things right. I am working with R 2.9.2 on WinXP, trying to access a large non-relational database (PI by Osisoft) holding process data. PI comes with an ODBC driver which I try to use. The Problem is that SQL-Queries return the

Re: [R] column selection in list

2010-01-25 Thread Adaikalavan Ramasamy
If the columns of all elements of the list are in the same order, then you can collapse it first and then extract. out - do.call(rbind, SPECSHOR_tx_Asfc) out[ , Asfc.median] Regards, Adai Ivan Calandra wrote: Hi everybody! I have a (stupid) question but I cannot find a way to do it!

Re: [R] StructTS hang?

2010-01-25 Thread Richard.Kiefer
Hi! You have probably sorted out your problem a different way. However I have tried dealing with the same problem for a while and writing down the reason for this here may be of use to someone. In some other help-mail I read that time series objects behave unexpectedly in some situations if

Re: [R] Estimate Slope from Boltzmann Model (package: DRC)

2010-01-25 Thread Christian Ritz
Hi Bob, you fitted a log-logistic model specifying the model function LL.4(). If you want to fit a Boltzmann or logistic model then you can use the model function L.4() in place of LL.4(): drc.preTBS.2 - drm( Response ~ Dose, data = mydata, fct= L.4( names = c( Slope, Lower Limit, Upper

Re: [R] read multiple large files into one dataframe

2010-01-25 Thread Paul Hiemstra
Brad Patrick Schneid wrote: ### The following is very helpful # listOfFiles - list.files(pattern= .txt) d - do.call(rbind, lapply(listOfFiles, read.table)) ### but what if each file contains information corresponding to a different subject and I need to

[R] Graphics for Factor Analysis

2010-01-25 Thread Sunitap22
Hello Everyone I have results for Factor Analysis and I want to find the association among these factors and also I want to represent this in a graphical format. Can anyone suggest me what graphics can be used to represent the results of Factor Analysis in R? my data is as follows (this is

Re: [R] From signals to position vector without using loop

2010-01-25 Thread Dieter Menne
-- View this message in context: http://n4.nabble.com/From-signals-to-position-vector-without-using-loop-tp1288871p1289246.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] : Feature selection

2010-01-25 Thread Pedro Silva
Date: Sun, 24 Jan 2010 20:05:58 퍝 From: Carlos J. Gil Bellosta c...@datanalytics.com To: Amy Hessen amy_4_5...@hotmail.com Cc: r-help@r-project.org Subject: Re: [R] Feature selection Message-ID: 4b5c9a16.70...@datanalytics.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi, Take

Re: [R] How to define degree=1 in mgcv

2010-01-25 Thread Gavin Simpson
On Sun, 2010-01-24 at 16:28 -0500, hellen lee wrote: Hi, all I have a question on mgcv and ns. Now I want to compare the results from glm, gam and ns. Take a simple model y~x for example. glm1 = glm(y~x, data=data1) gam1 = gam(y~s(x), data=data1) ns1 = glm(y~ns(x),data=data1) In order

[R] Paste expression in graph title

2010-01-25 Thread Paul Chatfield
This was my initial attempt at creating a title on a graph of the R squared value: x-rnorm(10) y-rnorm(10) plot(x,y, main=paste(expression(R^2), = ,round(summary(lm(y~ x))$r.squared, digits=3), sep=)) I've read various other posts that say expression needs to be taken outside the paste, but I

[R] Quantile loess smother?

2010-01-25 Thread Tal Galili
Hello all, I wish to fit a loess smother to a plot of Y`X, but in predicting the 95% quantile. Something that will be a combination of what rq (package quantreg} does, with loess. Is there a function/method for doing this? Thanks, Tal Contact

Re: [R] Paste expression in graph title

2010-01-25 Thread Dimitris Rizopoulos
Have a look at the help page for ?plotmath, and try also this: x - rnorm(10) y - rnorm(10) R2 - round(summary(lm(y ~ x))$r.squared, 3) plot(x, y, main = bquote(R^2 == .(R2))) I hope it helps. Best, Dimitris Paul Chatfield wrote: This was my initial attempt at creating a title on a graph of

Re: [R] Paste expression in graph title

2010-01-25 Thread Gabor Grothendieck
Try bquote: set.seed(123) x-rnorm(10) y-rnorm(10) R2 - summary(lm(y ~ x))$r.squared R2round - round(R2, digits = 3) plot(x, y, main = bquote(R^2 == .(R2round))) On Mon, Jan 25, 2010 at 7:06 AM, Paul Chatfield p.s.chatfi...@reading.ac.uk wrote: This was my initial attempt at creating a title

Re: [R] Paste expression in graph title

2010-01-25 Thread Henrique Dallazuanna
Try this: plot(x, y, main = bquote(R^2 == .(round(summary(lm(y ~ x))$r.squared, 3 On Mon, Jan 25, 2010 at 10:06 AM, Paul Chatfield p.s.chatfi...@reading.ac.uk wrote: This was my initial attempt at creating a title on a graph of the R squared value: x-rnorm(10) y-rnorm(10) plot(x,y,

Re: [R] Paste expression in graph title

2010-01-25 Thread Paul Chatfield
Thanks – that’s the most helpful solution – it’s important for code to be neat too and that is fairly neat if unintuitive! I had tried bquote a bit, but hadn’t figured it out properly. Cheers! Paul From: Henrique Dallazuanna [via R]

Re: [R] Quantile loess smother?

2010-01-25 Thread Gavin Simpson
On Mon, 2010-01-25 at 14:08 +0200, Tal Galili wrote: Hello all, I wish to fit a loess smother to a plot of Y`X, but in predicting the 95% quantile. Something that will be a combination of what rq (package quantreg} does, with loess. Is there a function/method for doing this? ?rqss in

[R] sequence of equal-length numbers (for filenames)

2010-01-25 Thread Žroutík
Dear R-users, I'd like to create filenames in a mask file000.dat numbered from 1 to e.g. 123. The last problem I'm dealing with is creating the sequence of numbers with equal length, i.e. 001, 002, 023, 024, 122, 123. The closest I got is by a repetition: Sequence - c(1:123) for(i in

Re: [R] sequence of equal-length numbers (for filenames)

2010-01-25 Thread Henrique Dallazuanna
Try sprintf: sprintf(%03d, Sequence) sprintf(file%03d.dat, Sequence) On Mon, Jan 25, 2010 at 10:39 AM, Žroutík zrou...@gmail.com wrote: Dear R-users, I'd like to create filenames in a mask file000.dat numbered from 1 to e.g. 123. The last problem I'm dealing with is creating the sequence

Re: [R] R Memory Problem

2010-01-25 Thread jim holtman
How big is your data set (use object.size on the object and 'str'). Exactly what statements are you executing? Exactly what error message are you getting? On Mon, Jan 25, 2010 at 5:44 AM, prem_R mtechp...@gmail.com wrote: Is anyone could help me to resolve this problem?I'm presently an SAS

Re: [R] Quantile loess smother?

2010-01-25 Thread Dieter Menne
Tal Galili wrote: Something that will be a combination of what rq (package quantreg} does, with loess. qss in quantreg comes close. Dieter -- View this message in context: http://n4.nabble.com/Quantile-loess-smother-tp1289277p1289349.html Sent from the R help mailing list archive at

Re: [R] read multiple large files into one dataframe

2010-01-25 Thread hadley wickham
On Mon, Jan 25, 2010 at 4:43 AM, Paul Hiemstra p.hiems...@geo.uu.nl wrote: Brad Patrick Schneid wrote: ###  The following is very helpful # listOfFiles - list.files(pattern= .txt) d - do.call(rbind, lapply(listOfFiles, read.table)) ### but what if each

[R] Where can I get training for R-PLUS

2010-01-25 Thread jamy
Hi friends, Does any one know ,where can I get free training for R-PLUS.If any one know please let me know. Thanks, James. -- View this message in context: http://n4.nabble.com/Where-can-I-get-training-for-R-PLUS-tp1289371p1289371.html Sent from the R help mailing list archive at Nabble.com.

[R] frequency table help

2010-01-25 Thread Paola Pesci
Hi, I have a dataset like this: Specieslength (cm) A 12.4 B 45 A 34.6 C 73 C 24.5 D 4.5 .. I'm trying to obtain a barplot with the class length in x (fixed classes, 5 cm) and the number of

Re: [R] Where can I get training for R-PLUS

2010-01-25 Thread Romain Francois
On 01/25/2010 03:02 PM, jamy wrote: Hi friends, Does any one know ,where can I get free training for R-PLUS.If any one know please let me know. Thanks, James. http://lmgtfy.com/?q=R-plus+training -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30

Re: [R] R Memory Problem

2010-01-25 Thread Johann Hibschman
prem_R mtechp...@gmail.com writes: I'm running predictive analytics using R and to calibrate my model i used to adjust the variables used in the model and the problem happens here.R just runs out of memory .I tried garbage cleaning also. I'm analyzing a 8 GB data set using R, so it can

Re: [R] Rearranging long dataframe for printing in Sweave (andrecoding a factor)

2010-01-25 Thread Steve Sidney
JL The solution which was proposed by Joseph Wright on the Latex Community Forum was as follows 1) Use R to create the table and then save it in csv format 2) Use LaTex to print the table. 3) LaTex on it's own is not able to do this and you must install the 'datatool' package. 4) What

[R] binary

2010-01-25 Thread Val
Hi all Assume I have a data set xx; Group: 1=group1  , 2=group2 IQ:  1= High, 0 =low fit - glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results    Estimate Std. Error z value Pr(|z|) (Intercept) -2.55456    0.210 -12.273  5e-16 *** group  0.36180   

[R] Same y-axis on multiple plots?

2010-01-25 Thread Andreas Bergstrøm
Greetings, I am attempting to use R throug PL/R in PostgreSQL to make several graphs (they show usage over time for radiochannels). However, as some never go above 100 in a 24 hour period, and others go well over 500, they get different y-axis values (which normally would be a good thing).

Re: [R] Display of results

2010-01-25 Thread Robert Baer
I don't know this test, but as written, LM - Lo.Mac(y,kvec), will just make an assignment. To display the result you could write: (LM - Lo.Mac(y,kvec)) - Original Message - From: Hichem Ben Khedhiri bk.hic...@googlemail.com To: r-help@r-project.org Sent: Sunday, January 24, 2010

Re: [R] sequence of equal-length numbers (for filenames)

2010-01-25 Thread Don MacQueen
One can also use formatC() with the flag option. -Don At 10:47 AM -0200 1/25/10, Henrique Dallazuanna wrote: Try sprintf: sprintf(%03d, Sequence) sprintf(file%03d.dat, Sequence) On Mon, Jan 25, 2010 at 10:39 AM, Îroutík zrou...@gmail.com wrote: Dear R-users, I'd like to create

Re: [R] How to define degree=1 in mgcv

2010-01-25 Thread Simon Wood
On Monday 25 January 2010 02:40, hellen lee wrote: Hi, all I have a question on mgcv and ns. Now I want to compare the results from glm, gam and ns. Take a simple model y~x for example. glm1 = glm(y~x, data=data1) gam1 = gam(y~s(x), data=data1) ns1 = glm(y~ns(x),data=data1) In order to

[R] glmnet in caret packge

2010-01-25 Thread Alex Roy
Dear all, I want to train my model with LASSO using caret package (glmnet). So, in glmnet, there are two parameters, alpha and lambda. How can I fix my alpha=1 to get a lasso model? con-trainControl(method=cv,number=10) model - train(X, y, glmnet, metric=RMSE,tuneLength = 10,

[R] Rscript is not loading some of one of the standard R packages

2010-01-25 Thread petertait
Hi, I have a script I can run step by step through the R interpreter and it works fine. I then run as a shell script with Rscript and it fails. The error message comes when I am creating a model matrix with model.matrix.default(). Error in `contrasts-`(`*tmp*`, value = contr.Treatment) :

Re: [R] binary

2010-01-25 Thread Mohamed Lajnef
Hi val, Val a écrit : Hi all Assume I have a data set xx; Group: 1=group1 , 2=group2 IQ: 1= High, 0 =low fit - glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results Estimate Std. Error z value Pr(|z|) (Intercept) -2.554560.210 -12.273 5e-16 ***

[R] summing a large, partitioned data frame

2010-01-25 Thread james.foadi
Dear R community, I'm trying to develop a fast way of summing specific rows of a large data frame. Here is an example of the kind of data frames I'm dealing with: refls H K L M/ISYM BATCH I SIGI 43247 1 0 5 2179 61.44117 2.20553 1040 1 0 5257 6 15.16316

Re: [R] Help with subset

2010-01-25 Thread Jerry Floren
Hi Peter, Thanks again for showing me how to do this. This will save me hours of tedious work, and I can't believe how quickly R reads in and processes my data. It was taking about 40 minutes when I used Word's mail merge for this. When I first switched from Excel to R, R was so much faster than

[R] z value from wilcox.exact

2010-01-25 Thread netrunner
Hi, does anibody know if is possible to have as ouptut from the wilcox.exact function also a z value to link the U value at the normal distribution? thank you! netrunner -- View this message in context: http://n4.nabble.com/z-value-from-wilcox-exact-tp1289481p1289481.html Sent from the R

Re: [R] binary

2010-01-25 Thread Val
Thanks for your response. Do you mean that both the log-odds and odd ratio have the same meaning? My question is that the log-odd estimate 0.3618 is it for group1 or group2? normally 1vs2, glm takes 2 as reference, in the group1 the IQ increase by 0.3618compared to group 2 What

[R] PCA: Showing file datalabels on biplot

2010-01-25 Thread colin1
The script below successfully produces a biplot of the data but the 'site names' (rows) and the names of the 'response variables' (columns) are shown as simple numerals (rather than the column and row names). How might I 'enforce' the use of the row/column names used in the datafile (section of

[R] reshape package cast() function

2010-01-25 Thread Ista Zahn
Hi all, I think I'm cracking up. Please help me understand why I'm getting different results with m.test and m.test2 in the example below. library(reshape) Loading required package: plyr m.test - data.frame(id = factor(rep(1:10, 2)), variable=rep(c(var1,var2),10), value=rnorm(20))

Re: [R] PCA: Showing file datalabels on biplot

2010-01-25 Thread Kevin Wright
str(catopsis) shows no labels, so how can biplot know what to use? Try this before call prcomp: colnames(catopsis) - c('a','b','c','d') rownames(catopsis) - cat$sample Also, see the 'reshape' package for easier data manipulation. Kevin On Mon, Jan 25, 2010 at 10:39 AM, colin1

Re: [R] summing a large, partitioned data frame

2010-01-25 Thread Benilton Carvalho
check aggregate() (the examples are quite helpful) b On Mon, Jan 25, 2010 at 4:07 PM, james.fo...@diamond.ac.uk wrote: Dear R community, I'm trying to develop a fast way of summing specific rows of a large data frame. Here is an example of the kind of data frames I'm dealing with:

[R] Fwd: how to write a long string to many lines in a fasta text file

2010-01-25 Thread mary guo
Hi, I want to write a long string to many lines in R, but I do not know how to do it. Hope to get your help. Thanks. Mary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] reshape package cast() function

2010-01-25 Thread Ista Zahn
OK, I think I figured it out (each level of id corresponds to only one level of variable in m.test). Thanks, Ista On Mon, Jan 25, 2010 at 4:59 PM, Ista Zahn iz...@psych.rochester.edu wrote: Hi all, I think I'm cracking up. Please help me understand why I'm getting different results with m.test

Re: [R] problem with the precision of numbers

2010-01-25 Thread kayj
Hi All, thank you all for your help. I have tried Bill's script and it works! so I am trying to think what was the problem and it looks like it i sthe precision. so you defined a function of the precision and evaluates at precision=500. Bill, I was wondering how did you choose 500? is it

Re: [R] Fwd: how to write a long string to many lines in a fasta text file

2010-01-25 Thread jim holtman
?strwrap On Mon, Jan 25, 2010 at 11:02 AM, mary guo mary.guo1...@gmail.com wrote: Hi, I want to write a long string to many lines in R, but I do not know how to do it. Hope to get your help. Thanks. Mary        [[alternative HTML version deleted]]

Re: [R] Rearranging long dataframe for printing in Sweave (andrecoding a factor)

2010-01-25 Thread Ista Zahn
If I understand the OP's issue correctly, this is how I would do it: library(Hmisc) test - data.frame(conc=trunc(runif(1000, 1,1000)),nam=rep(c(A,B),500)) final - cbind(test[1:200,], test[201:400,], test[401:600,], test[601:800,], test[801:1000,]) latex(final, cgroup=c(paste(Obs. ,seq(1, 801,

Re: [R] locfit questions/problems

2010-01-25 Thread Liaw, Andy
Just replacing preplot() with predict() should be fine. BTW, it's always a good idea to specify the version of the package you're using as well. Best, Andy From: mh...@berkeley.edu Hi, I'm trying to work through the examples and code in Loader's LOCAL REGRESSION AND LIKELIHOOD, and have

[R] R Output and ArcGIS

2010-01-25 Thread Steve Murray
Dear all, I've been using R on a Mac to process some data for export to ArcMap GIS (which only runs on Windows). ArcMap seems to require tab-delimited data (my data are in 3 columns), so I've been using the sep=\t argument. However, this resulted in strange end-of-line characters when

Re: [R] R Output and ArcGIS

2010-01-25 Thread milton ruser
Hi Steve, As I have no problem with this because I run windows, I prefere to use .txt files. But may be on your case you install xlsReadWrite (or WriteRead), because .xls file works fine for ArcGis. Remember not use complex (like having dots) or large names because some times you get error on

Re: [R] binary

2010-01-25 Thread Peter Ehlers
Val wrote: Hi all Assume I have a data set xx; Group: 1=group1 , 2=group2 IQ: 1= High, 0 =low fit - glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results Estimate Std. Error z value Pr(|z|) (Intercept) -2.554560.210 -12.273 5e-16 *** group

Re: [R] Quartiles and Inter-Quartile Range

2010-01-25 Thread eeramalho
Thank you David. I got it now. Maybe you can help again. I am typing the following code to draw a QQ plot but the line does not look right? *** qqnorm(cbiomass) qqline(cbiomass) *** the graph looks very different from the graph generated by SAS. Thank

Re: [R] More than on loop??

2010-01-25 Thread che
can i ask your help again, please excuse my questions: It is working perfectly now, i still have the last part which i tried a lot with but still i can’t translate it properly for the computer through R. I need to draw rectangular based on the frequency of each residue, actually i found the

Re: [R] problem with the precision of numbers

2010-01-25 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of kayj Sent: Monday, January 25, 2010 8:04 AM To: r-help@r-project.org Subject: Re: [R] problem with the precision of numbers Hi All, thank you all for your help. I have

Re: [R] Quartiles and Inter-Quartile Range

2010-01-25 Thread Peter Ehlers
eeramalho wrote: Thank you David. I got it now. Maybe you can help again. I am typing the following code to draw a QQ plot but the line does not look right? *** qqnorm(cbiomass) qqline(cbiomass) *** the graph looks very different from the graph

Re: [R] Rearranging long dataframe for printing in Sweave (andrecoding a factor)

2010-01-25 Thread Jean-Louis Abitbol
Ista, Thanks, you got the question perfectly well. And the proposed solution gets me on my way. I just corrected the typo n.cbroup to n.cgroup. Thanks again, Best wishes, JL On Mon, 25 Jan 2010 17:42 +, Ista Zahn istaz...@gmail.com wrote: If I understand the OP's issue correctly, this

Re: [R] Quartiles and Inter-Quartile Range

2010-01-25 Thread David Freedman
please do some reading - I *think* the main difference is that the x and y axes are reversed, but I really don't know what SAS prints out there are a many 'defaults' that are rather arbitrary - sometimes SAS uses 1, while R uses another ??qqnorm brings up a list of functions, including

[R] (no subject)

2010-01-25 Thread Chuck White
Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig - c(rep('',10),rep('',20),rep('',30),rep('',40)) orig.unique - unique(orig) system.time(df -

Re: [R] R Output and ArcGIS

2010-01-25 Thread Michael Denslow
Hi Steve, On Mon, Jan 25, 2010 at 12:54 PM, Steve Murray smurray...@hotmail.com wrote: Dear all, I've been using R on a Mac to process some data for export to ArcMap GIS (which only runs on Windows). ArcMap seems to require tab-delimited data (my data are in 3 columns), so I've been using

[R] Issue using tapply

2010-01-25 Thread LCOG1
Hello all, I am trying to use the tapply function to sum some values and change the column names of the resulting vector. I input Emp Et 1 10565 ACC 2 7515 ADM 3625 AGF 4 6243 CNS 5 12721 EDU 6 3924 FIN 7 18140 HLH 8 3686 INF 9 15841 MFG 10 243 MIN 11 1864 MNG 12

Re: [R] z value from wilcox.exact

2010-01-25 Thread Peter Ehlers
netrunner wrote: Hi, does anibody know if is possible to have as ouptut from the wilcox.exact function also a z value to link the U value at the normal distribution? I don't think that wilcox.exact() provides this directly. I would use wilcox_test() in pkg 'coin'. If you do want to

[R] question on sqldf syntax

2010-01-25 Thread GL
trying to structure sql to merge two datasets. structure follows: dbs.possible.combos (all possible combinations of dates and places) Date Place 1/1/10 N-01 1/1/10 S-02 1/2/10 N-01 1/2/10 S-02 etc... dbs.aggregate (the raw data aggregated by date and location) Date Place Days 1/1/10 N-01 6

Re: [R] problem with the precision of numbers

2010-01-25 Thread Hans W Borchers
kayj kjaja27 at yahoo.com writes: Hi All, thank you all for your help. I have tried Bill's script and it works! so I am trying to think what was the problem and it looks like it i sthe precision. so you defined a function of the precision and evaluates at precision=500. Bill, I was

Re: [R] question on sqldf syntax

2010-01-25 Thread GL
Actually, better sql would likely be: dbs.final - sqldf(select * from dbs.possible.combos left join dbs.aggregate using (Date,Place)) but this still doesn't work -- View this message in context: http://n4.nabble.com/question-on-sqldf-syntax-tp1289707p1289718.html Sent from the R help mailing

[R] Delete components of a list

2010-01-25 Thread Lisa
Dear all, I have a question about deleting components of a list. For example, I have a list that looks like this: [[1]] var1 var2 var3 134 221 [[2]] var1 var2 var3 251 217 [[3]] var1 var2 var3 167 384

[R] R2WinBUGS/ trap

2010-01-25 Thread julien martin
I am generating 1000 replicate data sets in R, each data set is then analyzed with WinBUGS in batch mode using R2WinBUGS. Unfortunately, occasionally some data sets lead WinBUGS to open a trap window; and the simulations are interrupted as result of the message. Is there any ways to set R2WinBUGS

Re: [R] Delete components of a list

2010-01-25 Thread Henrique Dallazuanna
Try this: # Exclude the first column: lapply(l, '[', -1) # Remove the second row: lapply(l, '[', , i = -2) On Mon, Jan 25, 2010 at 5:37 PM, Lisa lisa...@gmail.com wrote: Dear all, I have a question about deleting components of a list. For example, I have a list that looks like this:

[R] R2WinBUGS trap

2010-01-25 Thread julien martin
I am generating 1000 replicate data sets in R, each data set is then analyzed with WinBUGS in batch mode using R2WinBUGS. Unfortunately, occasionally some data sets lead WinBUGS to open a trap window; and the simulations are interrupted as result of the message. Is there any ways to set R2WinBUGS

Re: [R] Delete components of a list

2010-01-25 Thread Lisa
It works well. Thank you very much. Lisa -- View this message in context: http://n4.nabble.com/Delete-components-of-a-list-tp1289732p1289745.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Issue using tapply

2010-01-25 Thread Ista Zahn
I think the problem is that there is no value for RST in Emp.Et.Em. -Ista On Mon, Jan 25, 2010 at 6:57 PM, LCOG1 jr...@lcog.org wrote: Hello all,   I am trying to use the tapply function to sum some values and change the column names of the resulting vector. I input     Emp  Et 1  10565

Re: [R] Issue using tapply

2010-01-25 Thread Henrique Dallazuanna
Try this: tapply(Emp.Et.Em[EtToEm..$Et], EtToEm..$Em, sum, na.rm = TRUE) On Mon, Jan 25, 2010 at 4:57 PM, LCOG1 jr...@lcog.org wrote: Hello all,   I am trying to use the tapply function to sum some values and change the column names of the resulting vector. I input     Emp  Et 1  10565

[R] Two == expressions in bquote

2010-01-25 Thread Larry Hotchkiss
Hi, I want to put text on a plot containing something like: a = b^2 = squared numeric value of b using bquote. Example: mu = 5 plot(1:10,1:10) text(2,8, bquote(delta == mu^2))# This works text(2.5,8, bquote(phantom(0) == .(mu^2))) # but is unpredictable text(2,8,

Re: [R] Error in plot.new()

2010-01-25 Thread jean luc picard
My distribution is Ubuntu. xwininfo: Window id: 0x441 R Graphics: Device 2 (ACTIVE) Absolute upper-left X: 558 Absolute upper-left Y: 27 Relative upper-left X: 558 Relative upper-left Y: 27 Width: 787 Height: 744 Depth: 24 Visual Class: TrueColor Border width: 1

Re: [R] Two == expressions in bquote

2010-01-25 Thread Henrique Dallazuanna
Try this: text(2,8, bquote(delta~'='~mu^2 == .(mu^2))) On Mon, Jan 25, 2010 at 6:00 PM, Larry Hotchkiss lar...@udel.edu wrote: Hi, I want to put text on a plot containing something like: a = b^2 = squared numeric value of b using bquote. Example:  mu = 5  plot(1:10,1:10)  text(2,8,

Re: [R] Issue using tapply

2010-01-25 Thread LCOG1
Ista you have suggested the correct solution, i didnt htink it would matter not having that value but it did. Things work as they should now, thankyou -- View this message in context: http://n4.nabble.com/Issue-using-tapply-tp1289681p1289764.html Sent from the R help mailing list archive at

[R] Matching a character in a string

2010-01-25 Thread Fabrice DELENTE
Hello. Sorry for this very basic question but I didn't find (of didn't understand) the answer either in the help or in the online guide. I have a string, let's say hello. I want to know if there is some character in it, let's say an 'o'. I tried charmatch(o, strstplit(hello,)) but it gives

Re: [R] Two == expressions in bquote

2010-01-25 Thread Peter Dalgaard
Larry Hotchkiss wrote: Hi, I want to put text on a plot containing something like: a = b^2 = squared numeric value of b using bquote. Example: mu = 5 plot(1:10,1:10) text(2,8, bquote(delta == mu^2))# This works text(2.5,8, bquote(phantom(0) == .(mu^2))) # but is

Re: [R] Matching a character in a string

2010-01-25 Thread Paul Hiemstra
Fabrice DELENTE wrote: Hello. Sorry for this very basic question but I didn't find (of didn't understand) the answer either in the help or in the online guide. I have a string, let's say hello. I want to know if there is some character in it, let's say an 'o'. I tried charmatch(o,

Re: [R] Two == expressions in bquote

2010-01-25 Thread Bert Gunter
I think that careful examination will show that Henrique's solution is not quite right: the text '=' character is slightly different than the symbol font character. This is admittedly nitpicking, but ... try instead: text(2,8,bquote(paste(delta==mu^2,phantom()==.(mu^2 Cheers, Bert Gunter

Re: [R] Two == expressions in bquote

2010-01-25 Thread Bert Gunter
Peter's way is better than mine. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Dalgaard Sent: Monday, January 25, 2010 12:57 PM To: Larry Hotchkiss Cc:

Re: [R] R Output and ArcGIS

2010-01-25 Thread Paul Hiemstra
Steve Murray wrote: Dear all, I've been using R on a Mac to process some data for export to ArcMap GIS (which only runs on Windows). ArcMap seems to require tab-delimited data (my data are in 3 columns), so I've been using the sep=\t argument. However, this resulted in strange end-of-line

Re: [R] question on sqldf syntax

2010-01-25 Thread lith
On 25 Jan., 20:26, GL pfl...@shands.ufl.edu wrote: Actually, better sql would likely be: dbs.final - sqldf(select * from dbs.possible.combos left join dbs.aggregate using (Date,Place)) but this still doesn't work I'd suspect name mangling to cause the problem:

Re: [R] question on sqldf syntax

2010-01-25 Thread Gabor Grothendieck
On Mon, Jan 25, 2010 at 2:17 PM, GL pfl...@shands.ufl.edu wrote: trying to structure sql to merge two datasets. structure follows: dbs.possible.combos (all possible combinations of dates and places) Date Place 1/1/10 N-01 1/1/10 S-02 1/2/10 N-01 1/2/10 S-02 etc... dbs.aggregate (the

Re: [R] PCA: Showing file datalabels on biplot

2010-01-25 Thread colin1
Many thanks Kevin, As a result of your advice, and that of other helpful experts, I ended up with the following script, which worked brilliantly: cat -read.table(R855868825matrix.csv, sep=,, header=T) head (cat, n=24) catopsis = cat[,-1] row.names(catopsis) = cat$sample pca - prcomp

[R] Postscript graphs

2010-01-25 Thread Lu Wang
Hi, I tried to use the following commands to create a postscript pie chart using R: postscript(file=H:/piechart.eps) # then I wrote my commands to generate the pie chart pie(filename,labels=,col=,radius=0.6) dev.off() After I ran those commands, instead of giving the pie chart, it showed

Re: [R] ff package: ff objects don't reload compl etely on NFS drives from a different machine

2010-01-25 Thread Jens Oehlschlägel
Try to close the file on the first nfs client before reopening it on the second nfs client. NFS has something called close-to-open cache consistency. This means that two clients which have the same nfs file open, cannot rely on seeing the updates from the respective other client. If one clients

[R] Data transformation

2010-01-25 Thread Lisa
Dear all, I have a dataset that looks like this: x - read.table(textConnection(col1 col2 3 1 2 2 4 7 8 6 5 10), header=TRUE) I want to rewrite it as below: var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 1 0 1 0 0 0 0 0 0 0 0 2

Re: [R] Data transformation

2010-01-25 Thread Sarah Goslee
Well, I have no idea how to get from one to the other. There's col1 and col2 but no var1 var2 var3, etc. I thought perhaps col1 was the row index and col2 was the column index, but that doesn't match up either, and not all the cell values are 1. So you will need to explain more clearly what you

Re: [R] Data transformation

2010-01-25 Thread Steve Lianoglou
Hi, On Mon, Jan 25, 2010 at 5:39 PM, Lisa lisa...@gmail.com wrote: Dear all, I  have a dataset that looks like this: x - read.table(textConnection(col1 col2 3 1 2 2 4 7 8 6 5 10), header=TRUE) I want to rewrite it as below: var1 var2 var3 var4 var5 var6 var7 var8 var9 var10    1  

[R] Microsoft SQL Server and R

2010-01-25 Thread David Scott
I have a client running Microsoft SQL Server. I am interested in ways of accessing data from this server using R. I would welcome any information about how this can be done. I have a reasonable grasp of SQL and have experience with MySQL and RODBC but don't know anything much about

Re: [R] Data transformation

2010-01-25 Thread Lisa
Thank you so much. Lisa -- View this message in context: http://n4.nabble.com/Data-transformation-tp1289899p1289915.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Data transformation

2010-01-25 Thread Seeliger . Curt
r-help-boun...@r-project.org wrote on 01/25/2010 02:39:32 PM: x - read.table(textConnection(col1 col2 3 1 2 2 4 7 8 6 5 10), header=TRUE) I want to rewrite it as below: var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 1 0 1 0 0 0 0 0 0

Re: [R] Data transformation

2010-01-25 Thread Gabor Grothendieck
Try this: t(apply(x, 1, function(r) table(factor(r, levels = seq_len(max(x)) 1 2 3 4 5 6 7 8 9 10 [1,] 1 0 1 0 0 0 0 0 0 0 [2,] 0 2 0 0 0 0 0 0 0 0 [3,] 0 0 0 1 0 0 1 0 0 0 [4,] 0 0 0 0 0 1 0 1 0 0 [5,] 0 0 0 0 1 0 0 0 0 1 If you use aaply in the plyr package instead of apply then

[R] Min hash

2010-01-25 Thread Nathan Stephens
Anyone know of a min hash algorithm written in R? --Nathan [[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] Microsoft SQL Server and R

2010-01-25 Thread Jim Porzak
David, You can certainly use RODBC to get to MS SQL, once you configure the ODBC connection in windows. These days I tend to use RJDBC http://www.rforge.net/RJDBC/ which is a bit less of a hassle. Hint use the jtds driver http://jtds.sourceforge.net/ HTH, Jim Porzak Ancestry.com San Francisco,

Re: [R] Min hash

2010-01-25 Thread Bert Gunter
Did you perchance try RSiteSearch(hash,restr=func) or check the hash package on CRAN (or BioConductor or ...) ?? No clue whether any of this is relevant, but it seems like a sensible first place to look. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From:

  1   2   >