Re: [R] text command - how to get a white background to cover grid lines

2012-02-06 Thread Jim Lemon
On 02/06/2012 08:23 AM, Henry wrote: New to R - rookie question. I'm a mechanical engineer and enjoying using R to make high quality graphs. I've searched. I want to put text notation on graph plot areas and have the text background box white to cover over the grid lines. my command so

Re: [R] R-RApache to develop Knowledge Base

2012-02-06 Thread Daróczi Gergely
Hi, I am not sure about your data structure, but if you do not alter those often from third-party programs, then storing the information in R's native file formats (like RData) might give you some performance boost against always querying MySQL. Of course this depends on data structure and

Re: [R] Problem with Snowball RWeka

2012-02-06 Thread Milan Bouchet-Valat
Le jeudi 12 janvier 2012 à 15:18 -0800, plecto a écrit : Thanks! I read your shoer term solution and thanks to it was able to make stemming working in R for Mac OS X. I actually used Sys.setenv(NOAWT=TRUE) instead of Sys.setenv(NOAWT, true), as the latter produces the following error

Re: [R] Makefile to compile .so in src

2012-02-06 Thread Uwe Ligges
On 05.02.2012 23:17, Matyas Sustik wrote: Hi Uwe, 1. I don't believe you really need all the flags from above. If so, within a package, use a Makevars file. 2. R CMD SHLIB QUIC.cpp shoudl do the trick already, perhaps some linker flags are required for blas that can be specified in the same

Re: [R] Simple lm/regression question

2012-02-06 Thread Achim Zeileis
On Mon, 6 Feb 2012, James Annan wrote: I am trying to use lm for a simple linear fit with weights. The results I get from IDL (which I am more familiar with) seem correct and intuitive, but the lm function in R gives outputs that seem strange to me. Unweighted case: x-1:4 y-(1:4)^2

[R] R's memory capabilities

2012-02-06 Thread Alaios
Dear all, I have tried to create a diagonal matrix of size diag(65536) I am getting the message that the array function can not create so big array as the value I ask is larger than the environment: namespace:base .Machine$integer [1] 2147483647 as you will see my .Machine$integer is the

Re: [R] Simple lm/regression question

2012-02-06 Thread peter dalgaard
On Feb 6, 2012, at 10:57 , Achim Zeileis wrote: On Mon, 6 Feb 2012, James Annan wrote: The summary() shows under Residuals the contributions to the objective function, i.e. sqrt(1/w) (y - x'b) in the notation above. However, by using the residuals extractor function you can get the

Re: [R] R's memory capabilities

2012-02-06 Thread peter dalgaard
On Feb 6, 2012, at 11:15 , Alaios wrote: Dear all, I have tried to create a diagonal matrix of size diag(65536) I am getting the message that the array function can not create so big array as the value I ask is larger than the environment: namespace:base .Machine$integer [1]

[R] creating more vectors out of one

2012-02-06 Thread Marion Wenty
Dear R-helpers, I have got a vector which looks like the following: apkz - c(1,2,3,4,5,6,1,1,2,1,2,3,4) now I am trying to find a way to automatically create several vectors, each starting with the number 1, namely: First vector 1 2 3 4 5 6 Second vector 1 Thrid vector 1 2 Fourth

Re: [R] creating more vectors out of one

2012-02-06 Thread Paul Hiemstra
Hi, This piece of R code does the trick: do.call(c, sapply(c(6,1,2,4), seq, from = 1)) regards, Paul On 02/06/2012 11:15 AM, Marion Wenty wrote: Dear R-helpers, I have got a vector which looks like the following: apkz - c(1,2,3,4,5,6,1,1,2,1,2,3,4) now I am trying to find a way to

Re: [R] creating more vectors out of one

2012-02-06 Thread Petr PIKAL
Hi Dear R-helpers, I have got a vector which looks like the following: apkz - c(1,2,3,4,5,6,1,1,2,1,2,3,4) now I am trying to find a way to automatically create several vectors, each starting with the number 1, namely: First vector 1 2 3 4 5 6 Second vector 1

Re: [R] fractional cointegration

2012-02-06 Thread mamush bukana
Some typo in my question below: I am *attempting* to...not stempting... Regards Mamush -- Forwarded message -- From: mamush bukana mamushbuk...@gmail.com Date: Sun, Feb 5, 2012 at 12:13 AM Subject: fractional cointegration To: r-help@r-project.org Dear folk, I am

[R] R-Censoring

2012-02-06 Thread Grace Kambey
Hi there, can somebody give me a guide as to how to generate data from weibull distribution with censoring for example, the code below generates only failure data, what do i add to get the censored data, either right or interval censoring q-rweibull(100,2,10). Thank you Grace Kam student,

[R] R enterprise for linux

2012-02-06 Thread Alaios
Dear all, I would like to ask you if it would be possible  to install R enterprise in opensuse. Actually it seems that there are only Red Hat packages and I was wondering if their source code is available so one to try and compile it. I would like to thank you in advance for your reply Regards

Re: [R] glht (multicomparisons) with a binomial response variable

2012-02-06 Thread Frank Harrell
Making sure you have the most recent version of rms, try require(rms) dd - datadist(catroj, month); options(datadist='dd') f - lrm(catroj ~ month) contrast(f, list(month=2:12), list(month=1), conf.type='simultaneous') The actual coding will depend on how month is defined. The contrast above

Re: [R] coxme with frailty--variance of random effect?

2012-02-06 Thread Terry Therneau
In answer to the several questions: 1. Variance of the random effect: Your example is not reproducable since you didn't give the random number seed. Instead I'll use one of the data sets that comes with the survival package. library(coxme) fit - coxme(Surv(tstart, tstop, status) ~ treat +

Re: [R] 'deparse(substitute'))' then 'assign' in a S4 methods

2012-02-06 Thread cgenolin
Thanks Bill, In France, there is a famous joke about politician: Tell me what you need, I will explain you how to do without... But in my specific case, I can not use the classical - and [, it is why I ask my question. More precisely, my fonction fooBis can be very long to end. So I want to

Re: [R] R enterprise for linux

2012-02-06 Thread Paul Hiemstra
Dear Alex, By Enterprise R, do you mean Revolution R? I can also only find red hat packages. You could send them an e-mail to ask for sources. They probably want to help you, especially when you pay. But why do you need RevoR and not standard R. Paul On 02/06/2012 12:55 PM, Alaios wrote: Dear

Re: [R] R's memory capabilities

2012-02-06 Thread Ben Bolker
peter dalgaard pdalgd at gmail.com writes: On Feb 6, 2012, at 11:15 , Alaios wrote: Dear all, I have tried to create a diagonal matrix of size diag(65536) [snip ...] Well, it means what it says. Indexing is limited by the size of a 32-bit integer and (2^16)^2 is too big for

Re: [R] GAM (mgcv) warning: matrix not positive definite

2012-02-06 Thread Arnaud Mosnier
Thanks for the explanation ! Happy to know there is no problem with my models. Have a good day, Arnaud 2012/2/3 Simon Wood s.w...@bath.ac.uk It is completely safe to ignore this. Here is what is going on... mgcv routine 'mroot' is calling R routine 'chol' to find the *pivoted* Choleski

Re: [R] Covariate model in nlme

2012-02-06 Thread Ben Bolker
SHAILLY MEHROTRA shaillymehrotra at gmail.com writes: I am using nlme to fit a pharmacokinetic model. The base model is parameterized in terms of CL, V1, V2 and Q. basemodel-nlme(Conc ~TwoCompModel(CL,Q,V1,V2,Time,ID), data = data2, fixed=list(CL+Q+V1+V2~1), random = pdDiag(CL+V1+V2~1),

Re: [R] R enterprise for linux

2012-02-06 Thread Alaios
Actually, I would like to speed up matrix multiplication which is really too slow. MatrixA %*% MatrixB (each one is a [128,128] table) is running four hours now... and just imagine that I want to calculate many of those. Which other alternative do I have? Regards Alex

Re: [R] R enterprise for linux

2012-02-06 Thread R. Michael Weylandt
Are you sure? I just ran N - 128 system.time(matrix(rnorm(N^2),N) %*% matrix(rnorm(N^2),N)) and it took less than 0.044s on my (old-ish) laptop while doing other things (and that includes the expensive rng calls). There might be some other issues in play here. Even N - 1280 takes 5 seconds

Re: [R] R enterprise for linux

2012-02-06 Thread Rich Shepard
On Mon, 6 Feb 2012, Alaios wrote: Actually, I would like to speed up matrix multiplication which is really too slow. I believe that R supports openmp during configuration. This is the multi-processor library that allows threads to run on different cores or processors. In addition to Red

[R] Logistic Regression

2012-02-06 Thread Ana
I am looking for R packages that can make a Logistic Regression model with parameter estimation by Maximum Likelihood Estimation. Many thanks for helping out. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] R enterprise for linux

2012-02-06 Thread Ernest Adrogué
6-02-2012, 06:29 (-0800); Alaios escriu: Actually, I would like to speed up matrix multiplication which is really too slow. MatrixA %*% MatrixB (each one is a [128,128] table) is running four hours now... and just imagine that I want to calculate many of those. It doesn't seem normal to

Re: [R] R enterprise for linux

2012-02-06 Thread Alaios
My bad.. these are the real matrices G-DiagonalGaussian( NumberOfImagePixels,sd=Gsd) str(G)  num [1:16384, 1:16384] 1400 0 0 0 0 ... S-PointSamplingMatrix(EffectiveSensors,NumberOfImagePixels) str(S)  num [1:10650, 1:16384] 0 0 0 0 0 0 0 0 0 0 ... A-S %*% G

Re: [R] Logistic Regression

2012-02-06 Thread Sarah Goslee
Hi, On Mon, Feb 6, 2012 at 10:08 AM, Ana rrast...@gmail.com wrote: I am looking for R packages that can make a Logistic Regression model with parameter estimation by Maximum Likelihood Estimation. How are you looking? Did you perhaps try Google

Re: [R] Writing to a file

2012-02-06 Thread Felicity
Dear All!! I am also new in R and trying to write my results into a file I post here..hopefully is the proper place To be more secific I have this loop counter = 0 for (i in 1:nrow(y)) { for (j in 1:ncol(y)) { if (y[i,j]==Func_0005634) { counter = counter + 1 }

[R] glht (multicomparisons) with a binomial response variable

2012-02-06 Thread gaiarrido
Hi, I,ve a run a model like this mcrm-glm(catroj~month,binomial) being catroj a binary response variable with two levels (infected and non infected) anova(mcrm3,test=Chisq) Df Deviance Resid. Df Resid. Dev P(|Chi|) NULL 520 149.81 mes 3

[R] AIC for piecewise and cuadratic comparison

2012-02-06 Thread Angel Marley
Hi everybody, I would like to compare using the Akaike Information Criteria (AIC) a quadratic model and a piecewise fitted model. Is it correct to use AIC to compare this models with such a different structure? Thanks in advance Angel # A simple example a-1 b-2 xx-seq(-15,15,length=50) #

[R] appending variable's values in table like fashion

2012-02-06 Thread sagarnikam123
i have two variable pyar [1] M 12 34 13 gita [1] U 22 33 44 want to append gita object below pyar object as want to take in anther variable M 12 34 13 U 22 33 44 write it in table fashion inside file -- View this message in context:

[R] how to access values from functions

2012-02-06 Thread Aparna Sampath
Hi All I would like to know how to access the values of the variable lambda.mu and and see what abs(lambdas[1]) does since lambdas is not a keyword. Snippet of the code: scoreFunction - function(lambdas) { lambda.mu - abs(lambdas[1]) sme.em(yi,tmei,Xi,Ni,G,lambda.mu,lambda.v)$AICc

[R] using file in hdfs for data mining algorithms in r

2012-02-06 Thread Karthi KN
hi all, i am new to r , i am trying to run data mining algorithms using map reduce framework.. * *i have few basic doubts* *1. can i give file in hdfs to kmeans( ) ? ?I tried as file1 = hdfs.file(testdata/synthetic_control.data) isf = hdfs.read(lsf,5242880,0) l = kmeans(isf,2,10) its not

[R] multiple comparisons in nested design

2012-02-06 Thread José Trujillo Carmona
Dear professors and collegues I need to perform a analysis of dates from a nested experimental design. From Bioestatical Analysis of Zar Bimetry of Sokal Rohlf Design and Analysis of Experiments of Montgomery I have: Sum (mean(x)_i - mean(x)_T)2 / (a-1) - var(epsilon) + n sigma2_B + n b

[R] Orthogonal contrasts in mixed-effect models

2012-02-06 Thread xavi sole
Hello all, I am wiriting here to look for help!!! I am running a mixed-model effect lmer() relating the total species richnees observed in one place with some landscape indicators depending on three positions at field scale (Boundary, edge, centre) nested to the location where the survey was

Re: [R] multiple comparisons in nested design (error correction)

2012-02-06 Thread José Trujillo Carmona
The last model is: AnovaModel.4 - lmer(VR ~ trat+(1|patient:trat), data=Mesures) Sorry. El 06/02/12 13:43, José Trujillo Carmona escribió: Dear professors and collegues I need to perform a analysis of dates from a nested experimental design. From Bioestatical Analysis of Zar Bimetry

[R] MLEs using optim

2012-02-06 Thread djbanana
I am trying to use the optim command to get the MLEs for a number of parameters based on some data. Is it possible to write a program that maximizes the likelihood and stores the parameters (many times)? I need to do this a lot of times, each time the data will be updated with more entries (rows).

[R] Multi-page PDF using dev.copy2pdf(filename, onefile=TRUE)?

2012-02-06 Thread Doug Hill
Hi all. I want to generate a sequence of n plots and save them into a single PDF file, one plot per page. From the R docs and other sources I gather the basic way to do this is save plot 1 into a file then append the 2:n plots to the same file.  This code shows my basic approach, but for some

[R] Colors vector based on group

2012-02-06 Thread Filoche
Hi everyone. I have a vector like this: x = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2) I would like to associate a colour to each of these entry. For example, I could use /topo.colors(3)/ (since I have 3 groups). I know it is easy to do this with

[R] lmer with spatial and temporal random factors, not nested

2012-02-06 Thread Marte Lilleeng
Hi, I am new to this list. I have a question regarding including both spatial and temporal random factors in lmer. These two are not nested, and an example of model I try to fit is model1-lmer(Richness~Y+Canopy+Veg_cm+Treatment+(1|Site/Block/Plot)+(1|Year), family=poisson, REML=FALSE), where

Re: [R] R enterprise for linux

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 10:17 AM, Alaios wrote: My bad.. these are the real matrices G-DiagonalGaussian( NumberOfImagePixels,sd=Gsd) str(G) num [1:16384, 1:16384] 1400 0 0 0 0 ... S-PointSamplingMatrix(EffectiveSensors,NumberOfImagePixels) str(S) num [1:10650, 1:16384] 0 0 0 0 0 0 0 0 0 0

Re: [R] R enterprise for linux

2012-02-06 Thread Alaios
That was my bad. (doing two things at same time) I am not out of memory by no means it is just that it only runs at one core. IF somehow R was able to see the many cores in my system. Regards Alex From: David Winsemius dwinsem...@comcast.net Cc: R.

Re: [R] Colors vector based on group

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 9:40 AM, Filoche wrote: Hi everyone. I have a vector like this: x = c (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2 ) I would like to associate a colour to each of these entry. For example, I could use /topo.colors(3)/ (since I have 3

Re: [R] appending variable's values in table like fashion

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 6:29 AM, sagarnikam123 wrote: i have two variable pyar [1] M 12 34 13 gita [1] U 22 33 44 want to append gita object below pyar object as want to take in anther variable You could make a character matrix: cmat - matrix(c(pyar,gita), nrow=2, byrow=T) M 12 34 13

Re: [R] Colors vector based on group

2012-02-06 Thread Achim Zeileis
On Mon, 6 Feb 2012, Filoche wrote: Hi everyone. I have a vector like this: x = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2) I would like to associate a colour to each of these entry. For example, I could use /topo.colors(3)/ (since I have 3 groups). I

Re: [R] R's memory capabilities

2012-02-06 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alaios Sent: Monday, February 06, 2012 3:11 AM To: peter dalgaard Cc: R-help@r-project.org Subject: Re: [R] R's memory capabilities Thanks a lot for your answer :) actually I

Re: [R] R-RApache to develop Knowledge Base

2012-02-06 Thread Spencer Graves
Have you tried Bioconductor (www.bioconductor.org http://www.bioconductor.org/)? Spencer On 2/5/2012 10:36 PM, MLSC wrote: Hi all, I need your opinion about using R-Rapache to build a knowlegde base to bioinformatics field. I have copious amount of genotype information (some few million

Re: [R] 'deparse(substitute'))' then 'assign' in a S4 methods

2012-02-06 Thread William Dunlap
The interrupt issue is somewhat orthogonal to the SV4/scoping issue you asked about. Trying to put things in the callers frame is very tricky. E.g., SV4 methods can insert new frames between your code and the caller. Perhaps you could try the following sort of construct, in which your desired

Re: [R] an unusual use for R

2012-02-06 Thread Richard M. Heiberger
I love it. I hope you are planning a talk at the UseR!2012 in Nashville. Do remember the history that one of the origins of punchcards is the Jaquard loom. Rich On Thu, Feb 2, 2012 at 5:54 PM, Sarah Goslee sarah.gos...@gmail.com wrote: I thought some of you might be amused by this. In my

Re: [R] histogram

2012-02-06 Thread Francis Keyes
Thanks. How do you suggest I use the reference population? Sorry, I'm new to R and just don't see it. If i can get a plot that is counts or density relative to my reference data it would be ideal. On Mon, Feb 6, 2012 at 1:12 AM, David Winsemius dwinsem...@comcast.netwrote: On Feb 5, 2012,

Re: [R] Multi-page PDF using dev.copy2pdf(filename, onefile=TRUE)?

2012-02-06 Thread ilai
Doug, dev.copy2pdf closes the connection after it's done, so onefile is meaningless. To look at each plot before copy to a single pdf, you could open a pdf(...) but revert between it and your graphic device: graphics.off() plot(1:7, 1:7) x11c- dev.cur() # your current graphics device

Re: [R] Logistic Regression

2012-02-06 Thread tw
On 02/06/2012 03:08 PM, Ana wrote: I am looking for R packages that can make a Logistic Regression model with parameter estimation by Maximum Likelihood Estimation. Many thanks for helping out. __ R-help@r-project.org mailing list

Re: [R] histogram

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 12:23 PM, Francis Keyes wrote: Thanks. How do you suggest I use the reference population? Sorry, I'm new to R and just don't see it. If i can get a plot that is counts or density relative to my reference data it would be ideal. It is difficult to specify how when we

Re: [R] how to access values from functions

2012-02-06 Thread R. Michael Weylandt
You can modify the function and add either a print() statement or a browser() call as make sense for your purposes. Type the name of the function to get the source: copy and edit it as desired, and then run something like funcName - newSource Now when you run funcName it will run your new

Re: [R] R's memory capabilities

2012-02-06 Thread R. Michael Weylandt
Use the Matrix package which provides easy access to sparse matrices. I think (unchecked) there's even easy provision for a diagonal sparse matrix. That said, if you are always working with diagonal matrices, couldn't you just keep the diagonals as vectors since the formulas for matrix

[R] na.action in stats::factanal() must be using formula interface and dataframe input to specify na.action?

2012-02-06 Thread Timothy Bates
hi, Does factanal() force the user to use the formula interface if they wish to specify an na.action? v1 - c(1,1,1,1,1,1,1,1,NA,1,3,3,3,3,3,4,5,6) v2 - c(1,2,1,1,1,1,2,1,2,1,3,NA,3,3,3,4,6,5) v3 - c(3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,5,4,6) v4 - c(3,3,4,NA,3,1,1,2,1,1,1,1,2,NA,1,5,6,4) v5 -

Re: [R] R enterprise for linux

2012-02-06 Thread R. Michael Weylandt
I think there is some support for multi-processor matrix multiplication (google around for it) but in your case, it might suffice to use an optimized BLAS and R's builtin parallel facilities. As I said in your other thread -- if you are working with diagonal/sparse matrices, it's also possible to

Re: [R] Writing to a file

2012-02-06 Thread R. Michael Weylandt
You don't say how you are writing to a file, but some methods have an append = TRUE option that might be helpful. Your code looks really inefficient as well: I don't have time to look at it fully now, but it seems to me that you can vectorize the inner loops quite directly: for(j in ncol(y)){

Re: [R] [newbie] storage/use of user's own functions?

2012-02-06 Thread Michael Dewey
At 04:06 06/02/2012, Joshua Wiley wrote: Hi Tom, I don't believe there is a standard location. You can set variables or have functions run (say to source other functions in) in your .Rprofile file. That way, you always have them. Once you get more than a handful of functions, it is

[R] ggplot2 geom_polygon fill

2012-02-06 Thread raimund
Hi everyone, i've been trying to make a special plot with ggplot2, but I can't get it to fill the polygon I'd like to see filled so very very much. I want to display the difference or change in the distribution of the modified Rankin Scale between two groups. mRS is a scale for disability or

Re: [R] Colors vector based on group

2012-02-06 Thread Rui Barradas
Hello, I have a vector like this: x = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2) I would like to associate a colour to each of these entry. For example, I could use topo.colors(3) (since I have 3 groups). I know it is easy to do this with if/else

Re: [R] UTF8

2012-02-06 Thread Norma
trying to change the locale like this * Sys.setlocale(Macintosh HD)* failed with the following error: *Error in Sys.setlocale(Macintosh HD) : invalid 'category' argument* -- View this message in context: http://r.789695.n4.nabble.com/UTF8-tp873280p4361803.html Sent from the R help mailing

Re: [R] Colors vector based on group

2012-02-06 Thread Filoche
Hi there. I should have thought about that myself (/shame). Thank you very much for your time. Phil -- View this message in context: http://r.789695.n4.nabble.com/Colors-vector-based-on-group-tp4361425p4361686.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] UTF8

2012-02-06 Thread Norma
As far as I can see it, those are two problems. The default locale and the language problem. I have exactly the same, I am using Mac OSX 10.6.8. I have also tried installation of packages. When installing a package I get a related error message: *tar: Failed to set default locale* if I enter

[R] Heckman selection Model with HLM structure

2012-02-06 Thread Nita Umashankar
Hello, I am trying to estimate a 2-stage selection Model where the first probit stage is whether the customer bought (0/1) and the second stage is given that the customer bought, how much did they spend (revenue). However, in my data, customers are nested within customer service agents and

Re: [R] an unusual use for R

2012-02-06 Thread Barry Rowlingson
On Mon, Feb 6, 2012 at 5:14 PM, Richard M. Heiberger r...@temple.edu wrote: I love it.  I hope you are planning a talk at the UseR!2012 in Nashville. Maybe we'll have hand-woven R-logo lanyards for our conference badges? Get weaving Sarah! Barry __

[R] Disable contrasts in lme

2012-02-06 Thread Saskia Freytag
Dear all, I am trying to disable the contrast statement in the lme function of the package nlme. Is there a way to do this? This is needed as I have only one group. Thank you so much in advance, Saskia Freytag -- Saskia Freytag Department of Genetic Epidemiology Georg-August University

Re: [R] UTF8

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 11:26 AM, Norma wrote: trying to change the locale like this * Sys.setlocale(Macintosh HD)* failed with the following error: *Error in Sys.setlocale(Macintosh HD) : invalid 'category' argument* You are confused about what the locale setting is used for. They are for

[R] Suggestion for drop the loser design and analysis in R?

2012-02-06 Thread Tal Galili
Hello all, I would like to plan and analyse a study with k treatments (one of which is a control), with some binary outcome, in order to find the best treatment (e.g: the one with a high number of successes). If this was done with a fixed sample size, the analysis is well known. However, I would

Re: [R] UTF8

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 11:18 AM, Norma wrote: As far as I can see it, those are two problems. The default locale and the language problem. I have exactly the same, I am using Mac OSX 10.6.8. I have also tried installation of packages. When installing a package I get a related error message:

[R] Genetic based classification tree induction

2012-02-06 Thread Nissim Matatov
Hi , everybody Does R has some package is able genetic based search for optimal decision tree model Thanks, Nissim [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] I bet apply has a solution

2012-02-06 Thread LCOG1
Hi all For the data below, I would like to return a logical value indicating differences in the data. #Create data Data..-data.frame(a=rep(1,10),b=c(rep(1,9),2),c=c(rep(1,8),2,2)) a b c 1 1 1 1 2 1 1 1 3 1 1 1 4 1 1 1 5 1 1 1 6 1 1 1 7 1 1 1 8 1 1 1 9 1 1 2 10 1 2 2 So what I want

Re: [R] Writing to a file

2012-02-06 Thread Felicity
maybe I could keep each line (having the strings) in a file or somewhere and then call a print function that prints them all together from where I saved them? Please let me know as soon as Possible!! thank you! -- View this message in context:

[R] Reordering levels of a factor when the factor is part of a data frame

2012-02-06 Thread Judith Flores
Hello R-users,    I have a data frame whose names of columns I don't know a priori, but the user of my code will know them. The user is supposed to save the name of the column that will need some reordering of the levels of the factor later on. The name of the column will be saved in an object

Re: [R] I bet apply has a solution

2012-02-06 Thread Justin Haynes
How bout: apply(Data..,1, function(vec) !all(vec==vec[1])) [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE On Mon, Feb 6, 2012 at 10:34 AM, LCOG1 jr...@lcog.org wrote: Hi all For the data below, I would like to return a logical value indicating differences in the data.

Re: [R] I bet apply has a solution

2012-02-06 Thread Ista Zahn
Hi Josh, How about apply(Data, 1, function(row) sd(row) == 0) ? Best, Ista On Mon, Feb 6, 2012 at 1:34 PM, LCOG1 jr...@lcog.org wrote: Hi all For the data below, I would like to return a logical value indicating differences in the data. #Create data

Re: [R] Reordering levels of a factor when the factor is part of a data frame

2012-02-06 Thread Ista Zahn
Hi Judith, You should use double brackets, like this: df[[variab]]-factor(df[[variab]], levels=c(A2B,B31,C33)) see ?[ for details, noting that the help page assumes that you know data.frames are list-like objects. Best, Ista On Mon, Feb 6, 2012 at 2:03 PM, Judith Flores jur...@yahoo.com

[R] dividing values of each column in a dataframe

2012-02-06 Thread Abhishek Pratap
Hey Guys I want to divide(numerically) all the columns of a data frame by different numbers. Here is what I am doing but getting a weird error. The values in each column are not getting divided by the corresponding value in the denominator vector instead by the alternative values. I am sure I am

Re: [R] I bet apply has a solution

2012-02-06 Thread ilai
duplicated(Data..) On Mon, Feb 6, 2012 at 11:34 AM, LCOG1 jr...@lcog.org wrote: Hi all For the data below, I would like to return a logical value indicating differences in the data. #Create data Data..-data.frame(a=rep(1,10),b=c(rep(1,9),2),c=c(rep(1,8),2,2))   a b c 1  1 1 1 2  1 1 1

Re: [R] dividing values of each column in a dataframe

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 2:22 PM, Abhishek Pratap wrote: Hey Guys I want to divide(numerically) all the columns of a data frame by different numbers. Here is what I am doing but getting a weird error. The values in each column are not getting divided by the corresponding value in the denominator

Re: [R] Multi-page PDF using dev.copy2pdf(filename, onefile=TRUE)?

2012-02-06 Thread Doug Hill
Thanks Elai, that did it! I never considered using any X11 options, as I'm on Windows, and in the docs I read it sounded like X11 options only pertained to the OSX/Linux/.. world. Thanks for your help, Doug --- On Mon, 2/6/12, ilai ke...@math.montana.edu wrote: From: ilai

Re: [R] dividing values of each column in a dataframe

2012-02-06 Thread Berend Hasselman
On 06-02-2012, at 20:22, Abhishek Pratap wrote: Hey Guys I want to divide(numerically) all the columns of a data frame by different numbers. Here is what I am doing but getting a weird error. I don't think you are getting an error. You are getting an unexpected result (you think). The

[R] Any R course in New York or Washington DC in March?

2012-02-06 Thread eugene dalt
Hey Folks,   I am looking for a R course in New York or Washington DC,  please email me any course announcement you know of for these dates.   Best - Eugene [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] I bet apply has a solution

2012-02-06 Thread ROLL Josh F
Ah. That's the one. Thank you. -Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Monday, February 06, 2012 11:12 AM To: ROLL Josh F Cc: r-help@r-project.org Subject: Re: [R] I bet apply has a solution Hi Josh, How about apply(Data, 1, function(row) sd(row) ==

[R] sqsSave() test using Test.R script returning error suggesting no values upon insert

2012-02-06 Thread Mark LoPresti
Hi. I attempted to use RODBC and decided to execute all the tests provided in Test.r under the unpacked package RODBC folder. Beginning with the following: library(RODBC) library(MASS) USArrests[1,2] - NA hills - hills[1:15,] row.names(hills)[12] - Dollar ('$') set.seed(1) # MySQL ## testdb3

[R] Random draws from an ANOVA-like design with given population effect sizes

2012-02-06 Thread Patrick S Forscher
Hi all, Let's say that you have a 3-group categorical predictor x that has the orthogonal contrasts c1 and c2. I am trying to create a function that, given x, c1, and c2, creates a normally-distributed y such that c1 and c2 have effect sizes r1 and r2 specified by the user. For example, let's

[R] Getting the list of lines evaluated in a function call

2012-02-06 Thread Francois Rousseu
Hello useRs I am looking for a function that can give the list of lines that were evaluated or used to generatethe last output from any function, whether an error message was generated or not. For example, let's say I have a function like this: foo - function( x ){ if(

Re: [R] Reordering levels of a factor when the factor is part of a data frame

2012-02-06 Thread Ernest Adrogué
6-02-2012, 11:03 (-0800); Judith Flores escriu: The name of the column will be saved in an object called: variab the data frame is called df. If I try to the do following: df[variab]-factor(df[variab], levels=c(A2B,B31,C33)) it won't work because df[variab] is a data frame. I

[R] Duplicate rows when I combine two data.frames with merge!

2012-02-06 Thread RKinzer
Hello all, First I have done extensive searches on this forum and others and nothing seems to work. So I decided to post thinking someone could point me to the write post or give me some help. I have drawn a 100 samples from a fictitious population (N=1000), and then randomly selected 25% of

Re: [R] Multi-page PDF using dev.copy2pdf(filename, onefile=TRUE)?

2012-02-06 Thread David Winsemius
On Feb 6, 2012, at 2:51 PM, Doug Hill wrote: Thanks Elai, that did it! I never considered using any X11 options, as I'm on Windows, and in the docs I read it sounded like X11 options only pertained to the OSX/Linux/.. world. Thanks for your help, Doug You are confused about the

Re: [R] nice report generator?

2012-02-06 Thread Hadley Wickham
2. It's more flexible to construct the language object as a language object, rather than pasting something together and parsing it.  For one thing, that allows non-syntactic variable names; I think it's also easier to read.  So your code txt- paste(tabular(value*v*, LEFT , ~ ,RIGHT ,, data =

[R] How do I get the CEM (coarsened exact matching) package to run?

2012-02-06 Thread Daniel Malter
Hi, I am running a MacBook Pro with OS X 10.6.8. When I try to load library(cem) and run any function, R crashes. Any suggestions as to why this is? Thanks in advance. I think the problem is that I don't have all the infrastructure I need to run CEM, but I have no clue what to do either...

Re: [R] Duplicate rows when I combine two data.frames with merge!

2012-02-06 Thread Petr Savicky
On Mon, Feb 06, 2012 at 12:29:53PM -0800, RKinzer wrote: Hello all, First I have done extensive searches on this forum and others and nothing seems to work. So I decided to post thinking someone could point me to the write post or give me some help. I have drawn a 100 samples from a

Re: [R] Colors vector based on group

2012-02-06 Thread Filoche
Thank for your answer. Problem solved. Regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Colors-vector-based-on-group-tp4361425p4362746.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Duplicate rows when I combine two data.frames with merge!

2012-02-06 Thread Sarah Goslee
Hi, Why do you need to merge them? c.one contains what I think you want, and then you want to randomly select 25 rows from that without replacement: c.one - cbind(c.one, a.qtr = sample(c(rep(TRUE, 25), rep(FALSE, 75 head(c.one) unique length age a.qtr 649649 71 4 TRUE 200

[R] Creating time series (ts) object

2012-02-06 Thread Filoche
Hi everyone. I have have a dataset with daily measurement from January 1st of 1966 up to December 31th of 2011. Here's the first part of the data: DateSLEV 1/1/19661.086 1/2/19661.079 1/3/19661.133 1/4/19661.261 1/5/19661.391 1/6/19661.571

Re: [R] Creating time series (ts) object

2012-02-06 Thread R. Michael Weylandt
The documentation doesn't say what you think it says: The value of argument ‘frequency’ is used when the series is sampled an integral number of times in each unit time interval. For example, one could use a value of ‘7’ for ‘frequency’ when the data are sampled daily, and the

Re: [R] histogram

2012-02-06 Thread Francis Keyes
Hi David, I have 2 tables, each with several columns and rows of data. I am only interested in the data from column 6, which contains values in the range -PI to PI. I want to plot the data from tableD with the y axis denoting percentage with respect to tableR. So if data points in the break 2

Re: [R] Disable contrasts in lme

2012-02-06 Thread Ben Bolker
Saskia Freytag saskia.freytag at med.uni-goettingen.de writes: I am trying to disable the contrast statement in the lme function of the package nlme. Is there a way to do this? This is needed as I have only one group. Can you be more specific please? My first interpretation of this

  1   2   >