[R] is there colNA for a image? (i.e. How to set the color of NAs or background in an image)

2012-08-04 Thread Camilo Mora
Hi everyone, I am using a layout of two images, one of which is an image of a raster. In this one image I am using a color palette to show the gradient of temperature in the world.By default the color of the continents (which I set to NA in the raster) appears as white. I would like the

Re: [R] How to concatenate a several rows according with a column ?

2012-08-04 Thread arun
HI, Try this: #Reformatted the ddply results to match your desired output. dat1-read.table(text=    a    b c d   E001234  TSA    IP234   like_domain   E001234  TSB    IP234   like_domain      E001234  TSC    IP234   like_domain  

Re: [R] How to concatenate a several rows according with a column ?

2012-08-04 Thread David Winsemius
On Aug 3, 2012, at 10:00 AM, tgodoy wrote: Hi, I'm a new user or R and I try to concatenate a several rows according with the value in a column. this is my data.frame and I want to concatenate my data.frame according with the column b and make a new data.frame with the information in the

Re: [R] How to concatenate a several rows according with a column ?

2012-08-04 Thread Rui Barradas
Hello, Inline. Em 04-08-2012 09:34, David Winsemius escreveu: On Aug 3, 2012, at 10:00 AM, tgodoy wrote: Hi, I'm a new user or R and I try to concatenate a several rows according with the value in a column. this is my data.frame and I want to concatenate my data.frame according with the

Re: [R] Writing Faroes lettsers in text and plot ?

2012-08-04 Thread John Kane
Depends on your OS probably. I would just add a Faroese keyboard to my Ubuntu setup and switch between my normal keyboard and Faoese as required. John Kane Kingston ON Canada -Original Message- From: klausflemlo...@mail.tele.dk Sent: Fri, 3 Aug 2012 10:08:48 -0700 (PDT) To:

Re: [R] metafor- interpretation of moderators test for raw proportions

2012-08-04 Thread Michael Dewey
At 17:03 03/08/2012, cpanderson wrote: Wolfgang, Thanks for your quick response. You are correct- indeed I had inadvertently left out that i had set intercept = FALSE in rma. Dear Christopher, It does help if you paste in the exact code you used, see also below Following your suggestions,

[R] Partial Likelihood

2012-08-04 Thread doctoratza
Hello everyone, i would like to ask if everyone knows how to perfom a glm partial likelihood estimation in a time series whrere dependence exists. lets say that i want to perform a logistic regression for binary data (0, 1) with binary responses which a re the previous days. for example:

[R] Error message 'x' must be numeric

2012-08-04 Thread Ivette
http://r.789695.n4.nabble.com/file/n4639158/elgas2.csv elgas2.csv http://r.789695.n4.nabble.com/file/n4639158/histogramselgas.R histogramselgas.R Hello, I want to plot 9 histograms, and I prepare the data for this operation with the usual command, sapply(x, is.numeric), then I get a

[R] Questionnaire Analysis virtually without continuous Variables

2012-08-04 Thread Sacha Viquerat
Hello! I am doing an analysis on a questionnaire of hunters taken in 4 different districts of some mysterious foreign country. The aim of the study was to gather info on the factors that determine the hunting success of a peculiarly beautiful bird in that area. All variables are factors, i.e.

[R] how to assing unique ID in a table and do regression

2012-08-04 Thread Kristi Glover
Hi R- User I have very big data set (5000 rows). I wanted to make classes based on a column of that table (that column has the data which is continuous .) After converting into different class, this class would be Unique ID. I want to run regression for each ID. For example I have a data set

Re: [R] Writing Faroes lettsers in text and plot ?

2012-08-04 Thread Ted Harding
Klaus: John Kane is right to point out that the procedure will depend on your OS. It will also depend on what interface you use for entering text into R. All the letters you need for Faroese are present in the basic iso-8859-1 Western European character set (also known as ISO-Latin1) which should

Re: [R] Error message 'x' must be numeric

2012-08-04 Thread Uwe Ligges
On 04.08.2012 12:18, Ivette wrote: http://r.789695.n4.nabble.com/file/n4639158/elgas2.csv elgas2.csv http://r.789695.n4.nabble.com/file/n4639158/histogramselgas.R histogramselgas.R Hello, I want to plot 9 histograms, and I prepare the data for this operation with the usual command, sapply(x,

Re: [R] how to assing unique ID in a table and do regression

2012-08-04 Thread Rui Barradas
Hello, Try the following. id.groups - with(dat, cut(ID, breaks=0:ceiling(max(ID sp - split(dat, id.groups) regressors - grep(en, names(dat)) models - lapply(sp, function(.df) lapply(regressors, function(x) lm(.df[[S]] ~ .df[[x]]))) mod.summ - lapply(models, function(x) lapply(x,

Re: [R] Questionnaire Analysis virtually without continuous Variables

2012-08-04 Thread R. Michael Weylandt
On Sat, Aug 4, 2012 at 9:12 AM, Sacha Viquerat dawa.ya.m...@googlemail.com wrote: Hello! I am doing an analysis on a questionnaire of hunters taken in 4 different districts of some mysterious foreign country. The aim of the study was to gather info on the factors that determine the hunting

Re: [R] metafor- interpretation of moderators test for raw proportions

2012-08-04 Thread Viechtbauer Wolfgang (STAT)
Just to follow up on what Michael wrote: I cannot reproduce that error. For example, this all works as intended: data(dat.bcg) dat - escalc(measure=RR, ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, append=TRUE) rma(yi, vi, mods = ~ alloc, data=dat) ### 'alloc' automatically converted to a

Re: [R] Partial Likelihood

2012-08-04 Thread Bert Gunter
Sounds like generalized linear mixed modeling (glmm) to me. Try posting to the r-sig-mixed-models list rather than here to increase the likelihood of a useful response. -- Bert On Sat, Aug 4, 2012 at 3:55 AM, doctoratza mamma...@live.com wrote: Hello everyone, i would like to ask if everyone

[R] DAtes

2012-08-04 Thread Trying To learn again
Hi all, I´m trying to convert as a data frame (with format date) this copied excel column of dates (exposed below), I have tried to save them in a txt file tfr-read.table(tfra.txt) tfr-data.frame(tfr) I have tried several things, as date, so on, but always error. And it makes Error en

Re: [R] DAtes

2012-08-04 Thread Rui Barradas
Hello, Works with me: x - scan(what = character, text = 14/12/2000 15/12/2000 18/12/2000 19/12/2000 20/12/2000 21/12/2000 22/12/2000 25/12/2000 26/12/2000 27/12/2000 28/12/2000 29/12/2000 01/01/2001 02/01/2001 03/01/2001 04/01/2001 05/01/2001 08/01/2001 09/01/2001 10/01/2001

Re: [R] Partial Likelihood

2012-08-04 Thread Joshua Wiley
In addition to Bert's suggestion of r sig mixed models (which I second), I would encourage you to create a more detailed example and explanation of what you hope to accomplish. Sounds a bit like an auto regressive structure, but more details would be good. Cheers, Josh On Aug 4, 2012, at

Re: [R] Questionnaire Analysis virtually without continuous Variables

2012-08-04 Thread Joshua Wiley
Hi Sacha, You're right that this is not an R related question really (would be better somewhere like crossvalidated.com). If basically everyone catches 0/1 birds, then I would consider dichotomizing: Y - as.integer(caught = 1) then check cross tabs to make sure there are no zero cells

Re: [R] DAtes

2012-08-04 Thread arun
Hi, Try this: tfr-read.table(text= 14/12/2000  15/12/2000  18/12/2000  19/12/2000  20/12/2000  21/12/2000 22/12/2000  25/12/2000  26/12/2000  27/12/2000  28/12/2000  29/12/2000 01/01/2001  02/01/2001  03/01/2001  04/01/2001  05/01/2001  08/01/2001 09/01/2001  10/01/2001  11/01/2001  12/01/2001 

Re: [R] DAtes

2012-08-04 Thread arun
HI, I guess this will be more appropriate: tfr-read.table(text= 14/12/2000  15/12/2000  18/12/2000  19/12/2000  20/12/2000  21/12/2000 22/12/2000  25/12/2000  26/12/2000  27/12/2000  28/12/2000  29/12/2000 01/01/2001  02/01/2001  03/01/2001  04/01/2001  05/01/2001  08/01/2001 09/01/2001 

Re: [R] AFT model time-dependent with weibull distribution

2012-08-04 Thread hafida
Dear R-community, I have tried to estimate an EXPONENTIEL accelerated failure time(AFT) power rule model with time-independent . For that purpose, I have used the eha package. Please, consider this example: vi Ti 1 265.79 2 26 1579.52 3 26 2323.70 4 28 68.85 5 28

Re: [R] AFT model time-dependent with weibull distribution

2012-08-04 Thread David Winsemius
On Aug 4, 2012, at 10:45 AM, hafida wrote: Dear R-community, I have tried to estimate an EXPONENTIEL accelerated failure time(AFT) power rule model with time-independent . For that purpose, I have used the eha package. Please, consider this example: vi Ti 1 265.79 2 26

Re: [R] AFT model time-dependent with weibull distribution

2012-08-04 Thread Rui Barradas
Hello, Vous êtes française? It shows, in english it would be 'exponential', with an 'a'. Worked with me, after reading the manual. dataexp - read.table(text= vi Ti 1 265.79 2 26 1579.52 3 26 2323.70 4 28 68.85 [...] 73 380.39 74 381.13 75 380.09 76 382.38 ,

Re: [R] Partial Likelihood

2012-08-04 Thread Ben Bolker
Joshua Wiley jwiley.psych at gmail.com writes: In addition to Bert's suggestion of r sig mixed models (which I second), I would encourage you to create a more detailed example and explanation of what you hope to accomplish. Sounds a bit like an auto regressive structure, but more details

[R] Getting unknown error trying to plot spatial data

2012-08-04 Thread mjkatsaros
Hi there! I'm following an awesome guide to working with spatial data (http://www.frankdavenport.com/blog/2012/6/19/notes-from-a-recent-spatial-r-class-i-gave.html) and am running into an error that I can't figure out how to fix. Disclaimer: I am very much an R n00b Here is the r script I am

[R] how to coerce the result of sweep to be an array if result of FUN is a string?

2012-08-04 Thread Peter Young
Hi, I would like to use sweep to sweep out proportions and confidence intervals for an array, however when I supply a function which returns a string (containing something like 9% (3-18%)) I get back a list instead of an array, here is a simplified example: # example showing that sweep

Re: [R] AFT model time-dependent with weibull distribution

2012-08-04 Thread hafida
thanks a lot sorry for the mistake that i do in exponential, i am francophone and for the programme if we want to apply the power rule condition we use log(vi). it works thank yo -- View this message in context:

Re: [R] Partial Likelihood

2012-08-04 Thread doctoratza
Thank you for your comment. I suspected that a model with well defined predictors should work fine with a glm procedure. Thanks again K -- View this message in context: http://r.789695.n4.nabble.com/Partial-Likelihood-tp4639159p4639185.html Sent from the R help mailing list archive at

Re: [R] how to coerce the result of sweep to be an array if result of FUN is a string?

2012-08-04 Thread Rui Barradas
Hello, You can coerce the result to the input shape by assigning the dim attribute by hand. string.ans - sweep(m, c(2,3), stat, string.fun) dim(string.ans) - dim(m) string.ans Or put this in a function. # An abbreviation and the complete function name sweep.ch - sweep.character -

Re: [R] Questionnaire Analysis virtually without continuous Variables

2012-08-04 Thread Joshua Wiley
You may be able to get around zero cells using a an MCMC approach such as with MCMCglmm. On Aug 4, 2012, at 15:30, Sacha Viquerat dawa.ya.m...@googlemail.com wrote: On 08/04/2012 07:57 PM, Joshua Wiley wrote: Hi Sacha, You're right that this is not an R related question really (would be

[R] ggplot2 boxplot help

2012-08-04 Thread apadr007
Hello, I have a data set that looks like this: name G-ID test_id g-id g 1 00077464 C_068131 C_068131 OC_068131- 2 00051728 C_044461 C_044461 OC_044461- 3 00058738 C_050343 C_050343 OC_050343- 4 00059239 C_050649 C_050649 OC_050649- 5 1761 C_000909 C_000909

Re: [R] evaluate sum of sum

2012-08-04 Thread hafida
Hi can any body please help me to programme this formula: a[j]= E[j]-sum from l=i to i-1 (exp{(B0 B1*row matrix*) (z[l]*column matrix*) } x[l]) / sum from l=i to n it s complicate for me ; hope you can help me thank you a lot -- View this message in context:

Re: [R] sapply and matrix command

2012-08-04 Thread alijk1989 [via R]
Thanks again for the help looks like this will be useful for what I'm doing. Is there any way to use combn to return combinations of values with themselves: e.g. combn(1:3,2) [,1] [,2] [,3] [,4] [,5] [,6] [1,]111 2 2 3 [2,]1 232 3 3

Re: [R] sapply and matrix command

2012-08-04 Thread R. Michael Weylandt michael.weyla...@gmail.com
Take a look at ?expand.grid Michael On Aug 4, 2012, at 5:03 PM, alijk1989 [via R] ml-node+s789695n463919...@n4.nabble.com wrote: Thanks again for the help looks like this will be useful for what I'm doing. Is there any way to use combn to return combinations of values with themselves:

Re: [R] lme4 / HLM question

2012-08-04 Thread Ben Bolker
Jeff r at jp.pair.com writes: I'm hoping that this is a relatively easy question for someone familiar with the lme4 package. I'm accustomed to using HLM software and writing a simple 2 level [null] equation like this: L1 - Yij = b0 + e L2 - b0 = B00 + u0 The following

[R] how to put barchart and line chart in the same plot in ggplot2

2012-08-04 Thread xin wei
dear userR: I am trying to plot two dependent variables in the same plot in ggplot2. because these two variables have very different magnitude, I have to use a second Y axis. I hope one variable to be line and the other to be barchart. The x axis is continuous. Yet since I have to make barchart, I

[R] ptproc package

2012-08-04 Thread amirzadeh
Dear all I came across ptproc package on following website: http://www.biostat.jhsph.edu/~rpeng/software/index.html Actually I downloaded it on the contributors website and tried to install it manual but R wont unzip it. It is not available on CRAN project. I use R 2.15.1 and windows vista on

[R] Possible bug with MCMCpack metropolis sampler

2012-08-04 Thread dcervone
Hi, I'm having issues with what I believe is a bug in the MCMCpack's MCMCmetrop1R function. I have code that basically looks like this: posterior.sampler - function(data, prior.mu){ log.posterior - function(theta) log.likelihood(data, theta) + log.prior(prior.mu, theta) post.samples -

[R] Package to remove collinear variables

2012-08-04 Thread Roberto
Hi, I need to remove collinear variables to my Near-Infrared table of spectra. What package can I use? Something simple, because I am a novice about statistic. Thank you. Best regards, Roberto -- View this message in context: