Re: [R-es] Identificar porción de una imagen.-

2016-09-01 Thread Freddy Omar López Quintero
Gracias Carlos y Javier.

No. No es reconocimiento de imágenes.

Por ahora me he contentado con la (muy rudimentaria) solución:

image(array(findInterval(as.numeric(lennon), c(0, 150,  200), left.open =
F, all.inside = T), dim = c(256, 256)), col=grey(seq(0,1,,256)) )

donde el c(0, 150, 200) lo encontré al tanteo. Nada elegante, pero me dice
que los pixeles de la frente (y nariz) tienen valores sobre 150.

¡Mil gracias!

On Thu, Sep 1, 2016 at 5:31 PM,  wrote:

> Estimado Freddy
>
>
>
> Un artículo reciente que se me paso comentar en el correo anterior
>
>
>
> https://www.r-bloggers.com/image-recognition-tutorial-in-
> r-using-deep-convolutional-neural-networks-mxnet-package/
>
>
>
>
>
> Javier Rubén Marcuzzi
>
>
>
> *De: *Freddy Omar López Quintero 
> *Enviado: *jueves, 1 de septiembre de 2016 16:10
> *Para: *r-help-es@r-project.org
> *Asunto: *[R-es] Identificar porción de una imagen.-
>
>
>
> ¡Hola muchachos!
>
>
>
> Tengo un problema que no he podido resolver.
>
>
>
> Les cuento: tengo una imagen y quisiera conocer cuáles son los valores de
>
> los pixeles en un área más o menos delimitada. Yo creo que mi problema
>
> principal es que no sé cómo podría hacer la selección de esta área más o
>
> menos delimitada para luego conocer el valor en cada pixel :-\
>
>
>
> Un ejemplo:
>
>
>
> library(fields)
>
> data(lennon)
>
> image(lennon, col=grey(seq(0,1,,256)) )
>
>
>
> Para esa imagen, digamos, estoy interesado en conocer los (valores de los)
>
> pixeles de la frente del señor Lennon.
>
>
>
> ¿Alguien tendrá una idea de cómo podría proceder?
>
>
>
> ¡Gracias!
>
>
>
> --
>
> «...my role is to be on the bottom of things.»
>
>
>
> Donald Knuth
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> ___
>
> R-help-es mailing list
>
> R-help-es@r-project.org
>
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>
>
>



-- 
«...my role is to be on the bottom of things.»

Donald Knuth

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] plot.drm in "drc" package

2016-09-01 Thread li li
Thanks Petr for the reply.
When I run "plot(mod, type="all",log="x")", the tickmarks of the x axix
include (0.02, 0.1, 1,10).
But the log(Dose) should be less than 4.
Anyway, I think there is something missing in the plot.drm function.

   Hanna

2016-08-31 7:41 GMT-04:00 PIKAL Petr :

> Hi
>
> Thanks for code.
> see in line
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of li li
> > Sent: Tuesday, August 30, 2016 5:07 PM
> > To: r-help 
> > Subject: [R] plot.drm in "drc" package
> >
> > Hi all,
> >   I am trying to use the drc package to fit 4L curve.
> > I am so confused about the plot.drm function in the drc package.
> > Particularly, I am confused about the scale of the xaxis in the plots
> generated
> > using the plot.drm function. See the example below:
> >
> > ## generate data and fit the model
> > dose <- rep(50*2^(-(0:11)),3)
> > dose
> > d <- 100
> > c <- 1
> > b <- 1
> > e <- 1.6
> > y <- rnorm(length(dose))+ c+ (d-c)/(1+exp(b*(log(dose)-log(e
> > library(drc)
> > mod <- drm(y~dose, fct = LL.4())
> > summary(mod)
> >
> > Now I plot the data and the fitted curve with the plot.drm using the code
> > below and get the figure 1 below.
> >
> >
> > ##obtaining figure 1
> > plot(mod, type="all",log="x")
> >
> >
> > Next I plot the raw data and add the curve by extracting the estimate of
> the
> > parameters.
> >
> > ##extract parameters
> > para <- mod$fit$par
> > bhat<- para[1]
> > chat <- para[2]
> > dhat <- para[3]
> > ehat <- para[4]
> >
> > ##plot figure 2
> > plot(log(dose),y)
> > points(log(50*2^(-(0:11))),  chat +
> > (dhat-chat)/(1+exp(bhat*(log(50*2^(-(0:11)))-log(ehat, type="l")
> >
> > My question is regarding the figure 1 generated by the plot.drm.
> > The x axis is the not the log scale of the doses. I checked the package
> manual,
>  ^^^
> Well I am either missing something obvios but when I tried
>
> plot(mod, type="all",log="x")
>
> I got x axis with log scaling. Actually the result is the same as
>
> plot(mod, type="all")
>
> If you want x axis to be in original range you need to put empty string
>
> plot(mod, type="all",log="")
>
> Cheers
> Petr
>
> > it says the default is log base 10. But it is not true in this case.
> > Does some have some insight on the correct usage of the plot.drm
> function.
> >
> > Thanks much in advance.
> >   Hanna
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, minimal, self-contained, reproducible code.
>
> 
> Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou
> určeny pouze jeho adresátům.
> Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě
> neprodleně jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie
> vymažte ze svého systému.
> Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email
> jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
> Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi
> či zpožděním přenosu e-mailu.
>
> V případě, že je tento e-mail součástí obchodního jednání:
> - vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření
> smlouvy, a to z jakéhokoliv důvodu i bez uvedení důvodu.
> - a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout;
> Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany
> příjemce s dodatkem či odchylkou.
> - trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve
> výslovným dosažením shody na všech jejích náležitostech.
> - odesílatel tohoto emailu informuje, že není oprávněn uzavírat za
> společnost žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn
> nebo písemně pověřen a takové pověření nebo plná moc byly adresátovi tohoto
> emailu případně osobě, kterou adresát zastupuje, předloženy nebo jejich
> existence je adresátovi či osobě jím zastoupené známá.
>
> This e-mail and any documents attached to it may be confidential and are
> intended only for its intended recipients.
> If you received this e-mail by mistake, please immediately inform its
> sender. Delete the contents of this e-mail with all attachments and its
> copies from your system.
> If you are not the intended recipient of this e-mail, you are not
> authorized to use, disseminate, copy or disclose this e-mail in any manner.
> The sender of this e-mail shall not be liable for any possible damage
> caused by modifications of the e-mail or by delay with transfer of the
> email.
>
> In case that this e-mail forms part of business dealings:
> - the sender reserves the right to end negotiations about entering into a
> 

Re: [R] plot with different symbols and colors according to the factor levels

2016-09-01 Thread li li
Thank you all.
   Hanna

2016-08-30 16:55 GMT-04:00 Paulo Moniz :

> Obter o Outlook para Android 
>
>
>
> On Tue, Aug 30, 2016 at 2:41 PM -0300, "Clint Bowman" 
> wrote:
>
> Hanna,
>
> lili<-read.table("lili.txt",header=T)  # don't forget to label the row
> number if it's in your data
>
> with(lili,plot(y,conc,pch=sample,col=sample))
>
> Clint
>
>
> Clint BowmanINTERNET:   cl...@ecy.wa.gov
> Air Quality Modeler INTERNET:   cl...@math.utah.edu
> Department of Ecology   VOICE:  (360) 407-6815
> PO Box 47600FAX:(360) 407-7534
> Olympia, WA 98504-7600
>
>  USPS:   PO Box 47600, Olympia, WA 98504-7600
>  Parcels:300 Desmond Drive, Lacey, WA 98503-1274
>
> On Tue, 30 Aug 2016, li li wrote:
>
> > Hi all,
> > I have the following data. I want to plot the data (y ~ conc)
> > with different symbols and colors corresponding to different levels of
> the
> > factor sample.
> > I could create a column with color and pch and then do the plot, but I am
> > sure there are much better ways.
> > Can anyone make suggestions?
> >  Hanna
> >
> >
> >
> >   y conc sample
> > 1  33 20.0  1
> > 2  33  5.0  1
> > 3  35  1.25000  1
> > 4  43  0.31250  1
> > 5  58  0.078125000  1
> > 6  54  0.019531250  1
> > 7  57  0.004882812  1
> > 8  57  0.001220703  1
> > 9  32 20.0  1
> > 10 32  5.0  1
> > 11 34  1.25000  1
> > 12 52  0.31250  1
> > 13 57  0.078125000  1
> > 14 58  0.019531250  1
> > 15 59  0.004882812  1
> > 16 50  0.001220703  1
> > 17 34 20.0  2
> > 18 34  5.0  2
> > 19 38  1.25000  2
> > 20 53  0.31250  2
> > 21 57  0.078125000  2
> > 22 57  0.019531250  2
> > 23 57  0.004882812  2
> > 24 52  0.001220703  2
> > 25 34 20.0  2
> > 26 33  5.0  2
> > 27 36  1.25000  2
> > 28 48  0.31250  2
> > 29 58  0.078125000  2
> > 30 57  0.019531250  2
> > 31 58  0.004882812  2
> > 32 53  0.001220703  2
> > 33 34 20.0  2
> > 34 35  5.0  2
> > 35 37  1.25000  2
> > 36 49  0.31250  2
> > 37 55  0.078125000  2
> > 38 59  0.019531250  2
> > 39 57  0.004882812  2
> > 40 54  0.001220703  2
> > 41 36 20.0  3
> > 42 33  5.0  3
> > 43 36  1.25000  3
> > 44 51  0.31250  3
> > 45 57  0.078125000  3
> > 46 57  0.019531250  3
> > 47 59  0.004882812  3
> > 48 56  0.001220703  3
> > 49 33 20.0  3
> > 50 32  5.0  3
> > 51 35  1.25000  3
> > 52 47  0.31250  3
> > 53 57  0.078125000  3
> > 54 56  0.019531250  3
> > 55 57  0.004882812  3
> > 56 53  0.001220703  3
> > 57 33 20.0  3
> > 58 34  5.0  3
> > 59 38  1.25000  3
> > 60 52  0.31250  3
> > 61 56  0.078125000  3
> > 62 61  0.019531250  3
> > 63 56  0.004882812  3
> > 64 55  0.001220703  3
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, minimal, self-contained, reproducible code.
> >
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Same code on Mac?

2016-09-01 Thread Jim Lemon
Sometimes the problem stems from chronic exposure to user interfaces.
Yesterday I prepared some material for a Mac user's presentation and
said,

"This text file tells you the names of the files you need for the presentation"

the response was,

"Can I click on it?"

I deleted all the files in the directory apart from the necessary ones
and crossed my fingers.

Jim


On Fri, Sep 2, 2016 at 1:50 AM, Sarah Goslee  wrote:
> R already contains platform-independent code to open a graphics
> device: dev.new()
> The device thus created is specified in options(), but by default is
> appropriate for the current platform.
>
> It's good practice to use this function instead of calling quartz()
> directly so that your code can be run on other systems.
>
> Sarah
>
> On Thu, Sep 1, 2016 at 11:34 AM, Franklin Bretschneider
>  wrote:
>> Dear Tom Mosca,
>>
>> Re:
>>
>>> Using a PC I have written the R code for my elementary statistics students. 
>>>  One of the students has a Mac.  Should the same lines of code work on a 
>>> Mac?
>>>
>>>
>>>
>>> Where can the student find support for R on her Mac?  I don't know anything 
>>> about them, and have never used one.
>>>
>>
>>
>> Some commands are platform-dependent though, such as opening the standard 
>> graphics window [quartz() vs windows()].
>> This needn't be a problem, since in R a script can sense on which platform 
>> it is running.
>> Some years ago I wrote a platform-sensing graphics routine, reproduced below.
>> This might help to prevent problems with simple graphics demos, and can no 
>> doubt be extended to other commands.
>>
>> Success, and
>> Best regards,
>>
>>
>> Franklin Bretschneider
>> Dept of Biology
>> Utrecht University
>> brets...@xs4all.nl
>>
>>
>>
>>
>> #  function PIgraph.r
>> #  Platform-Independent graphics init
>> #  determines platform (Windows or Mac) then chooses device type
>> #  F. Bretschneider; 04-08-2009
>> #  
>>
>> PIgraph <- function(w,h) if(.Platform$OS.type == "windows") windows(w=w, 
>> h=h) else quartz(w=w, h=h)
>>
>> #  example application
>> x=-3:3
>> y=x^2
>> PIgraph(8,6)
>> plot(x,y, type = 'o')
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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, minimal, self-contained, reproducible code.
>
>
>
> --
> Sarah Goslee
> http://www.stringpage.com
> http://www.sarahgoslee.com
> http://www.functionaldiversity.org
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Need advice on linear programming in R

2016-09-01 Thread Michael Hannon
Thanks, Florian.  That looks very useful.

-- Mike

On Thu, Sep 1, 2016 at 2:33 AM, Florian Schwendinger
 wrote:
> You could try ROI
> 
> you write the model once and can use several solver, therefore
> you could just try which solver performs best (uses a low amount of
> memory) for your given problem.
>
> solver overview:
> 
>
> simple LP example:
> 
>
> Best,
> Florian
>
> Gesendet: Donnerstag, 01. September 2016 um 05:34 Uhr
> Von: "Michael Hannon" 
> An: "R help" 
> Betreff: [R] Need advice on linear programming in R
> Greetings. A subset of a problem that the group I work with turns out to be
> an optimization problem, in the sense of linear programming.
>
> We've looked at several approaches to this but haven't found one that seems
> to
> be the right fit. I'm looking for some guidance in finding an R package that
> does what we want in an acceptable time.
>
> Here's a toy example. We start with a matrix, called "gMat1" (historical
> reasons):
>
>> gMat1 <- matrix(c(3, 6, 9, 5, 9, 5), nrow=3)
>> print(gMat1)
> [,1] [,2]
> [1,] 3 5
> [2,] 6 9
> [3,] 9 5
>
> The goal is to add the contents of one column of each row to one of two bins
> (in general the number of bins equals the number of columns) such that the
> minimum number in each bin is maximized. An example follows.
>
> In the toy example, the possibilities can be enumerated simply:
>
>> allChoices <- expand.grid(rep(list(1:ncol(gMat1)), nrow(gMat1)))
>> print(allChoices)
> Var1 Var2 Var3
> 1 1 1 1
> 2 2 1 1
> 3 1 2 1
> 4 2 2 1
> 5 1 1 2
> 6 2 1 2
> 7 1 2 2
> 8 2 2 2
>
> For example, with the first choice, (1, 1, 1), column 1, hence, bin 1, is
> selected for all three rows, giving a result for the two bins of:
>
> 18 0
>
> For the second choice, (2, 1, 1), the '2' in the first position selects the
> contents of column 2 for bin 2. The remaining (1, 1) select the (6, 9) in
> the
> first column and assign those to bin 1:
>
> 15 5
>
> The result is a set of "binSums" corresponding to the each of the set of
> possible choices:
>
>> print(binSums)
> [,1] [,2]
> [1,] 18 0
> [2,] 15 5
> [3,] 12 9
> [4,] 9 14
> [5,] 9 5
> [6,] 6 10
> [7,] 3 14
> [8,] 0 19
>
> Having generated the sums, the goal is to pick the row that has the largest
> minimum and map that back to the original choice. In the toy example, both
> rows 3 and 4 satisfy that criterion ('9' is the minimum in each, and '9' is
> bigger than the minima in the other 6 rows -- 0, 3, 5, 6).
>
> In the real case there are potentially thousands of rows and columns, so
> eye-balling is not an option. And, in fact, using "expand.grid" isn't even
> an
> option to generate the original choices.
>
> We've tried some ad hoc approaches that seem to work tolerably well. Here's
> one that we *might* have considered, if we *could* have generated the
> "allChoices/binSums":
>
>> bsVar <- apply(binSums, 1, var)
>> locBestVar <- which(bsVar == min(bsVar))
>> allChoices[locBestVar, ]
> Var1 Var2 Var3
> 3 1 2 1
>
> But there was a feeling within the group that we didn't have a solid-enough
> foundation using the ad hoc approaches. Hence, we asked for help from an
> expert in Operations Research. He was able to solve a problem of realistic
> size in more or less no time at all using the "GAMS" software:
>
> https://www.gams.com/
>
> Unfortunately, GAMS is not free software, and we are hoping to produce an R
> package that is freely distributable. The next suggestion was to use Gurobi:
>
> http://www.gurobi.com/
>
> which is evidently free for academic use but not otherwise. Better, but
> still
> not perfect. (And I couldn't use the free version of Gurobi while working
> from home, as it didn't consider my home network to be associated with an
> academic institution -- which of course it isn't).
>
> Finally, we tried:
>
> Rglpk_solve_LP
>
> from the R package "Rglpk":
>
> https://cran.r-project.org/web/packages/Rglpk/index.html
>
> This satisfied the licensing constraints, but we were unable to produce a
> result in a "finite" amount of time. By this I mean that we ran the Rglpk
> software on a problem with 200 rows and 20 columns on the latest Mac Pro
> with
> 64GB of memory, and it didn't finish overnight. A realistic problem would
> have at least 1 rows and 50 columns. (This admittedly might simply have
> been a consequence of our unfamiliarity with the package. Suggestions
> welcome.) To be clear, this process is not something we'd be doing once in
> order to build the package. This is something an end user would have to do
> every time he/she ran our package.
>
> If you've managed to read this far and have any suggestions as to how we
> might
> proceed, please send them my way. Thanks.
>
> -- Mike
>
> __

Re: [R] Adding multiple polygons to a Leaflet map

2016-09-01 Thread Adams, Jean
It is hard to troubleshoot without the data.  Can you provide the data, for
example using the dput() function, or can you replicate the issue with some
simplified version of code that we can run?

Jean

On Tue, Aug 30, 2016 at 11:26 AM, Kevin Haynes  wrote:

> Hi everyone - I'd like to add multiple polygons to a leaflet map. I don't
> get any errors when running this code, but it'll only display the second
> choro layer - the citizenship rate one. Here's my code below. Any thoughts?
> Here's the map right now:http://rpubs.com/khaynes17/205217
>   #map
>
>   la_trad_school_perf_map_layers <- leaflet(lac_schools) %>%
> addProviderTiles("CartoDB.Positron") %>%
> setView(-118.4, 34.05, zoom = 9) %>%
> addCircleMarkers(
>   radius = 3,
>   color = ~pal(metandabove_mth),
>   stroke= FALSE, fillOpacity = 0.5,
>   group="14-15 Proficiency Rates - Math"
> ) %>%
> addPolygons(data = income_merged,
>   fillColor = ~pal_income(MedianIncome_2014),
>   color = "#b2aeae",
>   fillOpacity = 0.5,
>   weight = 1,
>   smoothFactor = 0.2,
>   popup = popup_income,
>   group="Median Income - 2014")%>%
> addPolygons(data = cit_merged,
>   fillColor = ~pal_cit(non_citizenship_rate),
>   color = "#b2aeae",
>   fillOpacity = 0.5,
>   weight = 1,
>   smoothFactor = 0.2,
>   popup = popup_cit,
>   group="Non-U.S. Citizen - 2014")%>%
>addLayersControl(
>  baseGroups=c("Median Income - 2014", "Non-U.S. Citizen - 2014"),
>  overlayGroups=c("14-15 Proficiency Rates - Math"),
>  options = layersControlOptions(collapsed = FALSE)
>)
>   la_trad_school_perf_map_layers
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Improving function that estimates regressions for all variables specified

2016-09-01 Thread Adams, Jean
You may be able find someone else's function that already does you want.
For example the dredge() function of the MuMIn package.

http://rpackages.ianhowson.com/cran/MuMIn/man/MuMIn-package.html

Jean

On Fri, Aug 26, 2016 at 1:11 PM, Jorge Cimentada 
wrote:

> Hi, I'd like some feedback on how to make this function more "quicker and
> parsimonious".
>
> I normally run several regressions like this:
> y ~ x1
> y ~ x1 + x2
> y ~ x1 + x2 +xn
>
> Instead, I created a function in which I specify y, x1 and x2 and the
> function automatically generates:
> y ~ x1
> y ~ x1 + x2
> y ~ x1 + x2 +xn
>
> This is the function:
>
> models <- function(dv, covariates, data) {
> dv <- paste(dv, "~ 1")
> combinations <- lapply(1:length(covariates), function(i) seq(1:i))
> formulas <- lapply(combinations, function(p) x <-
> as.formula(paste(c(dv, covariates[p]), collapse=" + ")))
> results <- lapply(formulas, function(o) lm(o, data=data))
> return(results)
> }
>
> And an example:
> models("mpg",c("cyl","disp","hp","am"), mtcars)
>
> I'm concerned about the time that it takes when using other regression
> models, such as those with the survey package(I know these models are heavy
> and take time) but I'm sure that the function has room for improvement.
>
> I'd also like to specify the variables as a formula. I managed to do it but
> I get different results when using things like scale() for predictors.
>
> Formula version of the function:
> models2 <- function(formula, data) {
> dv <- paste(all.vars(formula)[1], " ~ 1")
> covariates <- all.vars(formula)[-1]
> combinations <- lapply(1:length(covariates), function(i) seq(1:i))
> lfo <- lapply(combinations, function(p) x <- as.formula(paste(c(dv,
> covariates[p]), collapse=" + ")))
> results <- lapply(lfo, function(o) lm(o, data=data))
> return(results)
> }
>
> models("mpg",c("cyl","scale(disp)"), mtcars)
>
> models2(mpg ~ cyl + scale(disp), mtcars)
>
> See the difference between the disp variables?
>
> Any feedback is appreciated!
>
>
> *Jorge Cimentada*
> *Ph.D. Candidate*
> Dpt. Ciències Polítiques i Socials
> Ramon Trias Fargas, 25-27 | 08005 Barcelona
>
> Office 24.331
> [Tel.] 697 382 009www.jorgecimentada.com
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.

Re: [R-es] Identificar porción de una imagen.-

2016-09-01 Thread javier.ruben.marcuzzi
Estimado Freddy

Un artículo reciente que se me paso comentar en el correo anterior

https://www.r-bloggers.com/image-recognition-tutorial-in-r-using-deep-convolutional-neural-networks-mxnet-package/


Javier Rubén Marcuzzi

De: Freddy Omar López Quintero
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Identificar porción de una imagen.-

2016-09-01 Thread javier.ruben.marcuzzi
Estimado Freddy Omar López Quintero

http://cran.at.r-project.org/web/packages/raster/vignettes/Raster.pdf puede ser 
de ayuda, aunque no lo utilicé nunca.

O pretendes realizar reconocimiento de imágenes, como son los ejemplos de 
detectar letras, las caras, etc., para eso deberías entrenar o encontrar la 
forma que quieres como la frente de la cara, puesto que si cambias de imagen 
ese entrenamiento o función debería reconocer la frente de otra persona.

Vi algunos ejemplos con R, aunque la mejor herramienta que encontré estaba con 
OpenCV (creo que se puede colocar con R), era una versión comercial con una 
lite que estaba en la página, lo interesante es el poder de forma gráfica 
colocar valores y funciones, en instantes uno visualiza estos en la pantalla, 
entonces al identificar lo que uno desea el algoritmo es lo que uno fue 
seleccionando en forma gráfica, quedando este para el entrenamiento y posterior 
reconocimiento. 

http://stackoverflow.com/questions/9105379/face-recognition-in-r/9107659

Javier Rubén Marcuzzi

De: Carlos Ortega
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Identificar porción de una imagen.-

2016-09-01 Thread Carlos Ortega
Hola,

Prueba con esto:
https://cloud.r-project.org/web/packages/magick/index.html

Tendrás que instalarte "ImageMagick"...

Aquí puedes ver alguna de sus posibilidades...
https://github.com/ropensci/magick#readme

Saludos,
Carlos Ortega
www.qualityexcellence.es

El 1 de septiembre de 2016, 21:09, Freddy Omar López Quintero <
freddy.lopez.quint...@gmail.com> escribió:

> ¡Hola muchachos!
>
> Tengo un problema que no he podido resolver.
>
> Les cuento: tengo una imagen y quisiera conocer cuáles son los valores de
> los pixeles en un área más o menos delimitada. Yo creo que mi problema
> principal es que no sé cómo podría hacer la selección de esta área más o
> menos delimitada para luego conocer el valor en cada pixel :-\
>
> Un ejemplo:
>
> library(fields)
> data(lennon)
> image(lennon, col=grey(seq(0,1,,256)) )
>
> Para esa imagen, digamos, estoy interesado en conocer los (valores de los)
> pixeles de la frente del señor Lennon.
>
> ¿Alguien tendrá una idea de cómo podría proceder?
>
> ¡Gracias!
>
> --
> «...my role is to be on the bottom of things.»
>
> Donald Knuth
>
> [[alternative HTML version deleted]]
>
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>



-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R] Extract baseline from prop.odds function in timereg package

2016-09-01 Thread Lauren N. Spirko
Hi everyone!

I am using the prop.odds() function in the timereg package.  I am trying to
extract the estimated baseline value, G(t), described in the package
documentation.

Does anyone know how this baseline value can be extracted from the output?

Thanks in advance for your help!

Lauren

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R-es] Identificar porción de una imagen.-

2016-09-01 Thread Freddy Omar López Quintero
¡Hola muchachos!

Tengo un problema que no he podido resolver.

Les cuento: tengo una imagen y quisiera conocer cuáles son los valores de
los pixeles en un área más o menos delimitada. Yo creo que mi problema
principal es que no sé cómo podría hacer la selección de esta área más o
menos delimitada para luego conocer el valor en cada pixel :-\

Un ejemplo:

library(fields)
data(lennon)
image(lennon, col=grey(seq(0,1,,256)) )

Para esa imagen, digamos, estoy interesado en conocer los (valores de los)
pixeles de la frente del señor Lennon.

¿Alguien tendrá una idea de cómo podría proceder?

¡Gracias!

-- 
«...my role is to be on the bottom of things.»

Donald Knuth

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R] robumeta package - error

2016-09-01 Thread Kristina Loderer
Dear all,

I am trying to fit a simple (intercept-only) meta-analytic model using
the robumeta package using the following code: 
 anx_cont_mean<-robu(formula = es_fisher ~ 1, var.eff.size =
variance_fisher, studynum = study_ID, modelweights = "CORR", rho = 0.8,
small=TRUE, data = anxiety_control)

When I try to run this model, the following error message pops up: 
Error in solve.default(sumXWX) : 
  system is computationally singular: reciprocal condition number = 0

What exactly does this mean in the context of meta-analysis? I haven't
been able to find any answers.

Thank you,
Kristina


-
Kristina Loderer
Ludwig-Maximilians-Universität München
Department Psychologie
Leopoldstr. 13
D-80802 München

Telefon: +49 (89) 2180-6047
Email: kristina.lode...@psy.lmu.de

-

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.

Re: [R] Same code on Mac?

2016-09-01 Thread Sarah Goslee
R already contains platform-independent code to open a graphics
device: dev.new()
The device thus created is specified in options(), but by default is
appropriate for the current platform.

It's good practice to use this function instead of calling quartz()
directly so that your code can be run on other systems.

Sarah

On Thu, Sep 1, 2016 at 11:34 AM, Franklin Bretschneider
 wrote:
> Dear Tom Mosca,
>
> Re:
>
>> Using a PC I have written the R code for my elementary statistics students.  
>> One of the students has a Mac.  Should the same lines of code work on a Mac?
>>
>>
>>
>> Where can the student find support for R on her Mac?  I don't know anything 
>> about them, and have never used one.
>>
>
>
> Some commands are platform-dependent though, such as opening the standard 
> graphics window [quartz() vs windows()].
> This needn't be a problem, since in R a script can sense on which platform it 
> is running.
> Some years ago I wrote a platform-sensing graphics routine, reproduced below.
> This might help to prevent problems with simple graphics demos, and can no 
> doubt be extended to other commands.
>
> Success, and
> Best regards,
>
>
> Franklin Bretschneider
> Dept of Biology
> Utrecht University
> brets...@xs4all.nl
>
>
>
>
> #  function PIgraph.r
> #  Platform-Independent graphics init
> #  determines platform (Windows or Mac) then chooses device type
> #  F. Bretschneider; 04-08-2009
> #  
>
> PIgraph <- function(w,h) if(.Platform$OS.type == "windows") windows(w=w, h=h) 
> else quartz(w=w, h=h)
>
> #  example application
> x=-3:3
> y=x^2
> PIgraph(8,6)
> plot(x,y, type = 'o')
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.



-- 
Sarah Goslee
http://www.stringpage.com
http://www.sarahgoslee.com
http://www.functionaldiversity.org

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Same code on Mac?

2016-09-01 Thread Franklin Bretschneider
Dear Tom Mosca,

Re:

> Using a PC I have written the R code for my elementary statistics students.  
> One of the students has a Mac.  Should the same lines of code work on a Mac?
> 
> 
> 
> Where can the student find support for R on her Mac?  I don't know anything 
> about them, and have never used one.
> 


Some commands are platform-dependent though, such as opening the standard 
graphics window [quartz() vs windows()].
This needn't be a problem, since in R a script can sense on which platform it 
is running.
Some years ago I wrote a platform-sensing graphics routine, reproduced below.
This might help to prevent problems with simple graphics demos, and can no 
doubt be extended to other commands.

Success, and
Best regards,


Franklin Bretschneider
Dept of Biology
Utrecht University
brets...@xs4all.nl




#  function PIgraph.r
#  Platform-Independent graphics init
#  determines platform (Windows or Mac) then chooses device type
#  F. Bretschneider; 04-08-2009
#  

PIgraph <- function(w,h) if(.Platform$OS.type == "windows") windows(w=w, h=h) 
else quartz(w=w, h=h)

#  example application
x=-3:3
y=x^2
PIgraph(8,6)
plot(x,y, type = 'o')

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Same code on Mac?

2016-09-01 Thread Robert Baer

On 9/1/2016 9:44 AM, Sarah Goslee wrote:

On Wed, Aug 31, 2016 at 4:25 PM, Tom Mosca  wrote:

Using a PC I have written the R code for my elementary statistics students.  
One of the students has a Mac.  Should the same lines of code work on a Mac?

Where can the student find support for R on her Mac?  I don't know anything 
about them, and have never used one.



There's an official FAQ for Mac, just as there is for Windows.
https://cran.r-project.org/faqs.html
There's also a Mac-specific email help list.
https://www.r-project.org/mail.html

Most R code will run as well or better on Mac. All of the OS problems
I've run into tend to be problems with Windows. It's a bit harder to
get some geospatial stuff working on Mac, but that's unlikely to be a
problem with your elementary stats students.
Sarah has pointed you at some Mac support, but some additional advice as 
to the student audience.   [I live in a Windows world most of the time 
and a Ubuntu world the rest of the time, so I have minimal knowledg of 
OSX].Having students install RStudio has really helped because it 
brings cross-platform commonality here and there.


The biggest problems I've run into with beginning statistics students 
are the issues related to getting them connected to our network and/or 
reading in textbook datasets located on that network.  Differences in 
handling of line endings on text files. However, if you do ground work 
to show them how to do some basic basic things early, they can support 
themselves with these things. The commands will work the same


For text files I often have (Windows) students copy data to the 
clipboard and use a command like  x <- read.table(file = 'clipboard', 
sep = '\t', header = TRUE)  so we can work through some statistical 
tests or graphing.   This won't work on a Mac.  An equivalent 
formulation that is helpful on the Mac is x <- read.table(file = 
pipe('pbpaste'), sep = '\t', header = TRUE)


Other than that, I think you'll find R extremely OS agnostic in a 
teaching environment.


--


--
Robert W. Baer, Ph.D.
Professor of Physiology
Kirksville College of Osteopathic Medicine
A T Still University of Health Sciences
800 W. Jefferson St
Kirksville, MO 63501
660-626-2321 Department
660-626-2965 FAX

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R] Off topic, but hopefully not totally irrelevant: on MS Excel and genomics

2016-09-01 Thread Bert Gunter
http://www.sciencemag.org/news/sifter/one-five-genetics-papers-contains-errors-thanks-microsoft-excel

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] R-Studio+Commander

2016-09-01 Thread Marc Schwartz

> On Aug 31, 2016, at 5:25 PM, Lisa Ducati HH 
>  wrote:
> 
>> Hello,
>> 
>> I would like to Know if i can install r on my iPad Air 2? Is this possible?
>> 
>> Regards Lisa-Marie Kindler


Not directly and if you search the archives (use rseek.org and search for 
"iPad" or "iPhone"), there have been a variety of posts on why over the years, 
such as:

  https://stat.ethz.ch/pipermail/r-help/2010-June/240901.html

unless you "jailbreak" your device.

That being said, there may be options via third party technologies to run an R 
instance remotely from a server and/or via desktop VM clients that can run on 
mobile devices (e.g. Parallels). A Google search brings up some links from the 
RStudio support forums and you may want to search those separately.

Regards,

Marc Schwartz

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R] R-Studio+Commander

2016-09-01 Thread Lisa Ducati HH
> Hello,
> 
> I would like to Know if i can install r on my iPad Air 2? Is this possible?
> 
> Regards Lisa-Marie Kindler

Von meinem iPhone gesendet
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Same code on Mac?

2016-09-01 Thread Sarah Goslee
On Wed, Aug 31, 2016 at 4:25 PM, Tom Mosca  wrote:
> Using a PC I have written the R code for my elementary statistics students.  
> One of the students has a Mac.  Should the same lines of code work on a Mac?
>
>
>
> Where can the student find support for R on her Mac?  I don't know anything 
> about them, and have never used one.
>


There's an official FAQ for Mac, just as there is for Windows.
https://cran.r-project.org/faqs.html
There's also a Mac-specific email help list.
https://www.r-project.org/mail.html

Most R code will run as well or better on Mac. All of the OS problems
I've run into tend to be problems with Windows. It's a bit harder to
get some geospatial stuff working on Mac, but that's unlikely to be a
problem with your elementary stats students.

Sarah

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] GLM output problem

2016-09-01 Thread Anderson Eduardo
Embarrassing but that's true. I wrote 'binamial' instead of 'binomial'. I
tried now with the correct spelling and everything is ok, in fact.


> summary(GLM)

Call:
glm(formula = model, family = binomial(link = logit))

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -18.575010.7646  -1.726   0.0844 .
x 5.0403 2.7757   1.816   0.0694 .
I(x^2)   -0.2845 0.1558  -1.826   0.0679 .



Thank you all.

Anderson Eduardo


2016-09-01 5:14 GMT-03:00 peter dalgaard :

> >> And use the parameters returned by GLM to contruct an equation for the
> >> regression model:
> >>
> >> model.eq = -0.446078 + 0.267673*x - 0.014577*I(x^2)
> >
> > ## Not what I got with your data. I got:
> >
> > Coefficients:
> > (Intercept)x   I(x^2)
> >   -18.5750   5.0403  -0.2845
> >
> >
> > I suspect you had some other x,y variables lying around when you
> > defined your model.
>
>
> More likely, the family= specification got lost and gaussian family
> implied:
>
> > glm(model)
>
> Call:  glm(formula = model)
>
> Coefficients:
> (Intercept)x   I(x^2)
>-0.44608  0.26767 -0.01458
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>
>
>


-- 
Anderson A. Eduardo
--
Lattes  | Researcher ID
 | Google Acadêmico
 | Site

--

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.

[R] problem writing .bil files in netcdf

2016-09-01 Thread Abdoulaye SARR
Dear List,

I have daily rainfall data in .bil format and can get info of the file using 
rgdal:

> library(rgdal)
> GDALinfo("/1981/v2p19810101.bil")
rows1600 
columns 1500 
bands   1 
lower left origin.x-20 
lower left origin.y-40 
res.x   0.05 
res.y   0.05 
ysign   -1 
oblique.x   0 
oblique.y   0 
driver  EHdr 
projection  NA 

How can I read all daily file and write them as netcdf files and concatenate as 
one yearly file and also avoid boundary pixels alter rainfall values.

Best regards,

Eus

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Importint stata file and using value labels

2016-09-01 Thread Juan Ceccarelli Arias
I solved this problem using the
nonint.factors=F,generate.factors=F)
when i imported the dta files.
Thanks to all. My issue can be declared as solved.


On Sat, Aug 27, 2016 at 12:55 PM, Michael Friendly 
wrote:

> On 8/26/2016 11:05 AM, Juan Ceccarelli Arias wrote:
>
>> Yep. Im a bit stalled.
>> I can't find the option to import only the values and drop the value
>> labels
>> from the dta file.
>> Im quite sure R can do that. Then i'd only used the values and i'd rely on
>> my memory.
>> It isn't a bad alternative.
>>
>>
> Hint: use str() to see the class of what you've read.
> Then try as.data.frame() on the resulting object read from the .dta file.
>
>
> --
> Michael Friendly Email: friendly AT yorku DOT ca
> Professor, Psychology Dept. & Chair, Quantitative Methods
> York University  Voice: 416 736-2100 x66249 Fax: 416 736-5814
> 4700 Keele StreetWeb:   http://www.datavis.ca
> Toronto, ONT  M3J 1P3 CANADA
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R] Same code on Mac?

2016-09-01 Thread Tom Mosca
Using a PC I have written the R code for my elementary statistics students.  
One of the students has a Mac.  Should the same lines of code work on a Mac?



Where can the student find support for R on her Mac?  I don't know anything 
about them, and have never used one.



Thank you.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Loop over rda list files and using the attach function

2016-09-01 Thread Juan Ceccarelli Arias
Hi
I want to comment something.
When i added the detach(get(yyz)) the RAM consumption was considerable
reduced.
So, i want to declare this issue as solved and thank you all for your
assistance.
Good luck to all.

On Tue, Aug 30, 2016 at 6:24 PM, Juan Ceccarelli Arias 
wrote:

> The attach(get(yyz)) option i tried and it worked. The only issue, is that
> when i'm  trying to export the results, it takes a lot of time.
> Considerably more than Stata. Also, the computer almost collapses for a
> task which isn't so exhausting for my PC station.
> Im dubious...
>
> On Tue, Aug 30, 2016 at 3:42 PM,  wrote:
>
>> Hello,
>>
>> Try
>>
>> attach(get(yyz))
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>>
>>
>>
>>
>>
>>
>> Citando Juan Ceccarelli Arias :
>>
>> Hi.
>>> I need to loop over rda files.
>>> I generated the list of them.
>>> That's ok. The problem is that the name of the files are as _mm (eg
>>> 2010_01 is january or 2010, 2016_03 is march of 2016).
>>> So, when i try to use the attach function to create a simple table(age,
>>> sex) it fails.
>>> The only way to attach a file as is using
>>> attach(`2016_03`)
>>> The text above i have no idea how to declare it in my code below
>>>
>>>
>>> dd=list.files("C:/Users/Me/r", pattern="rda$", full.names=F)
>>> for (i in 1:length(dd)) {
>>> yyz=load(dd[i])
>>> attach(yyz)
>>> table(age, sex)
>>> rm(list=yyz)
>>>
>>> }
>>> This is the error it declares the loop:
>>> Error in attach(yyz) : file '2013_02' not found
>>>
>>>
>>> Thanks for your help and time
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posti
>>> ng-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>
>>
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] How can I add text in plot and x axis of figures created in ggplot2?

2016-09-01 Thread Ulrik Stervbo
Hi Marna,

when you use facet there is just one X-axis title and one Y-axis title. As
an alternative you can create several plots and put them into one using the
package gridExtra.

As for adding text you can use geom_text and extract the x, y coordinates
from your data. When I add text, I usually create a separate data.frame
which in addition to the text I want to add and the positions also contains
indications of the global aesthetic and the facet column

Hope this helps
Ulrik

On Thu, 1 Sep 2016 at 15:48 John Kane  wrote:

> Hi Marna,
>
> Thanks for providing the data and code. However there is a problem with
> the code and I wondered if something got garbled in transmission.
>
> Below is the code that was in my mailbox
> ==
> ylab *(*"My Y"*)+*theme(
> axis.text.x = element_text(size=8))
> =
> Clearly not functioning code
>
> Am I correct in assuming that what it originally looked like was :
> ==
> ylab("http://docs.ggplot2.org/0.9.2.1/labs.html;) +
>theme(axis.text.x = element_text(size=8))
> ==
> ?
>
> It looks like you are sending mail in HTML and that can badly mangle code
> and data layouts. Please send an messages to R-help in plain text.
>
> I don't use facet_wrap() enough to know if what you want to do is doable
> but I am a bit dubious.
>
> I wonder if you have considered creating 4 independent graphs and using
> grid.Extra or grid.arrange to get the results you want.?
>
> Sorry not to be of more help
>
> John Kane
> Kingston ON Canada
>
>
> > -Original Message-
> > From: marna.wag...@gmail.com
> > Sent: Wed, 31 Aug 2016 16:35:29 -0700
> > To: r-help@r-project.org
> > Subject: [R] How can I add text in plot and x axis of figures created in
> > ggplot2?
> >
> > Hi R users,
> > I have created four figures using ggplot2, but I am having trouble  to
> > add
> > "r2=XXX, p=XX" value on the upper left in each figure and also unit of X
> > axis of each figure are different. I was also trying to write following
> > :
> > 1.  "rainfall (mm/year") on X axix for fig A.
> > 2. "temp (degree Celsius)" on X axis for fig B
> > 3.  "distance (m)" on X axis for fig C
> > 4.  "survival Proba(%) on X axis for fig D
> >
> > I am wondering how I can create the figures with the above information
> >
> > Thank you for your help in advance
> >
> > Sincerely,
> >
> > Marna
> >
> > following code and the example I have used.
> >
> > dat<-structure(list(x = c(0.31, 0.04, 0.1, 0.54, 0.03, 0.86, 0.97,
> >
> > 0.4, 0.62, 0.3, 0.44, 0.51, 0.03, 0.12, 0.79, 0.3, 0.22, 0.66,
> >
> > 0.75, 0.45), y = c(0.38, 0.61, 0.16, 0.06, 0.42, 0.67, 0.85,
> >
> > 0.11, 0.79, 0.21, 0.84, 0.95, 0.3, 0.47, 0.79, 0.2, 0.34, 0.21,
> >
> > 0.62, 0.25), group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
> >
> > 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L), .Label = c("A",
> >
> > "B", "C", "D"), class = "factor")), .Names = c("x", "y", "group"
> >
> > ), class = "data.frame", row.names = c(NA, -20L))
> >
> >
> > gp<-ggplot(data=dat, aes(x=x, y=y))
> >
> > Gp<-gp + geom_point(size=1, col="blue")
> >
> > Gp<-Gp+ stat_smooth(method="lm", level=0.99,
> > col="black",formula=y~poly(x,1
> > ))+
> >
> > coord_cartesian(ylim=c(0, 1))+theme_bw()+
> >
> > theme(axis.text.y = element_text(angle = 90, vjust = 0))+
> >
> > ylab *(*"My Y"*)+*theme(
> > axis.text.x = element_text(size=8))
> >
> > Gp+ facet_wrap(~group,ncol=5, scales="free_x")
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, minimal, self-contained, reproducible code.
>
> 
> Can't remember your password? Do you need a strong and secure password?
> Use Password manager! It stores your passwords & protects your account.
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] How can I add text in plot and x axis of figures created in ggplot2?

2016-09-01 Thread John Kane
Hi Marna,

Thanks for providing the data and code. However there is a problem with the 
code and I wondered if something got garbled in transmission.

Below is the code that was in my mailbox
==
ylab *(*"My Y"*)+*theme(
axis.text.x = element_text(size=8))
=
Clearly not functioning code

Am I correct in assuming that what it originally looked like was :
==
ylab("http://docs.ggplot2.org/0.9.2.1/labs.html;) +
   theme(axis.text.x = element_text(size=8))
==
?

It looks like you are sending mail in HTML and that can badly mangle code and 
data layouts. Please send an messages to R-help in plain text.  

I don't use facet_wrap() enough to know if what you want to do is doable but I 
am a bit dubious. 

I wonder if you have considered creating 4 independent graphs and using 
grid.Extra or grid.arrange to get the results you want.?

Sorry not to be of more help

John Kane
Kingston ON Canada


> -Original Message-
> From: marna.wag...@gmail.com
> Sent: Wed, 31 Aug 2016 16:35:29 -0700
> To: r-help@r-project.org
> Subject: [R] How can I add text in plot and x axis of figures created in
> ggplot2?
> 
> Hi R users,
> I have created four figures using ggplot2, but I am having trouble  to
> add
> "r2=XXX, p=XX" value on the upper left in each figure and also unit of X
> axis of each figure are different. I was also trying to write following
> :
> 1.  "rainfall (mm/year") on X axix for fig A.
> 2. "temp (degree Celsius)" on X axis for fig B
> 3.  "distance (m)" on X axis for fig C
> 4.  "survival Proba(%) on X axis for fig D
> 
> I am wondering how I can create the figures with the above information
> 
> Thank you for your help in advance
> 
> Sincerely,
> 
> Marna
> 
> following code and the example I have used.
> 
> dat<-structure(list(x = c(0.31, 0.04, 0.1, 0.54, 0.03, 0.86, 0.97,
> 
> 0.4, 0.62, 0.3, 0.44, 0.51, 0.03, 0.12, 0.79, 0.3, 0.22, 0.66,
> 
> 0.75, 0.45), y = c(0.38, 0.61, 0.16, 0.06, 0.42, 0.67, 0.85,
> 
> 0.11, 0.79, 0.21, 0.84, 0.95, 0.3, 0.47, 0.79, 0.2, 0.34, 0.21,
> 
> 0.62, 0.25), group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
> 
> 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L), .Label = c("A",
> 
> "B", "C", "D"), class = "factor")), .Names = c("x", "y", "group"
> 
> ), class = "data.frame", row.names = c(NA, -20L))
> 
> 
> gp<-ggplot(data=dat, aes(x=x, y=y))
> 
> Gp<-gp + geom_point(size=1, col="blue")
> 
> Gp<-Gp+ stat_smooth(method="lm", level=0.99,
> col="black",formula=y~poly(x,1
> ))+
> 
> coord_cartesian(ylim=c(0, 1))+theme_bw()+
> 
> theme(axis.text.y = element_text(angle = 90, vjust = 0))+
> 
> ylab *(*"My Y"*)+*theme(
> axis.text.x = element_text(size=8))
> 
> Gp+ facet_wrap(~group,ncol=5, scales="free_x")
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, minimal, self-contained, reproducible code.


Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R-es] Microsoft R Open 3.3.1 problema

2016-09-01 Thread javier.ruben.marcuzzi
Estimado Miguel Angel Rodriguez Muinos

Hace mucho que no uso la versión de R-project, es un error extraño, de tres 
códigos R dos andan y el más simple da error, lástima que a esos datos no puedo 
enviarlos para reproducir el inconveniente, incluso dos códigos son a partir de 
los mismos datos, lo que cambia es el número de columnas de utilizo.

Javier Rubén Marcuzzi

De: miguel.angel.rodriguez.mui...@sergas.es
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Microsoft R Open 3.3.1 problema

2016-09-01 Thread javier.ruben.marcuzzi
Estimado Marcelino de la Cruz Rot

Creo que redacte de forma errada, es una columna con muchas filas, a esta le 
agrego muchas filas que vienen de otro data.frame, y varias veces así

Yo uso mucho rbind y cbind, pegando una cantidad de filas o columnas, me es una 
forma práctica.

Javier Rubén Marcuzzi

De: Marcelino de la Cruz Rot
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] Looping through different groups of variables in models

2016-09-01 Thread Kai Mx
Thanks so much everybody, especially to Dennis. I didn't really occur to me
that I could put the models into a list. I have used dplyr for simple data
transformations and will definitely look into it.

On Thu, Sep 1, 2016 at 8:10 AM, Dennis Murphy  wrote:

> Hi:
>
> See inline.
>
> On Wed, Aug 31, 2016 at 2:58 PM, Kai Mx  wrote:
> > Hi all,
> >
> > I am having trouble wrapping my head around a probably simple issue:
> >
> > After using the reshape package, I have a melted dataframe with the
> columns
> > group (factor), time (int), condition (factor), value(int).
> >
> > These are experimental data. The data were obtained from different
> > treatment groups (group) under different conditions at different time
> > points.
> >
> > I would now like to perform ANOVA, boxplots and calculate means to
> compare
> > groups for all combinations of conditions and time points with something
> > like
> >
> > fit <- lm(value~group, data=[subset of data with combination of
> > condition/timepoint])
> > summary (fit)
> > p <- ggplot([subset of data with combination of condition/timepoint],
> > aes(x= group, y=value)) + geom_boxplot ()
> > print (p)
> > tapply ([subset of data with combination of condition/timepoint]$value,
> > subset of data with combination of condition/timepoint]$group, mean)
>
> There is a traditional approach to this class of problem and an
> evolving 'modern' approach. The traditional approach is to use
> lapply() to produce a list of model objects (one per subgroup); the
> more recent approach is to take advantage of the pipeline operations
> enabled by the magrittr package, e.g.,via the dplyr and tidyr
> packages.  Related packages are purrr and broom; the former applies
> functional programming ideas to map a function recursively across a
> list, while the latter focuses on converting information from model
> objects into data frames that are more compatible with dplyr and
> friends.A package released to CRAN within the past couple of days,
> modelr, adds a few bells and whistles (e.g., bootstrap regression,
> adding columns of predicted values or residuals to a data frame), but
> you don't need it for your immediate purposes.
>
> Below is a generic approach to solving the types of problems you
> described above, which is the best one can do in the absence of a
> reproducible example. Therefore, if this doesn't work out of the box,
> you'll have to fix your data. (I won't do it for you, sorry.)
>
> You could do something like what you have in mind in plyr as follows,
> where md is a surrogate for the name of your melted data frame:
>
> library(plyr)
> L <- dlply(md, .(condition, time), function(d) lm(value ~ group, data = d))
>
> This would produce a list of models, one per condition * time
> combination. You could then use do.call() or another plyr function to
> extract elements of interest from the list, which generally would
> require that you write one or more (anonymous) functions to extract
> the information of interest. A similar approach can be used to
> generate a list of ggplots. It's cleaner if you put your code into
> functions and have it return the output you want, but you have to be
> careful about the form of the input and output - for dlply(), you want
> a function that takes a data frame as input. If you just want the
> plots printed, you could write a function to do that for a single plot
> (again with a data frame as input) and then use the d_ply() function
> in plyr to print them en masse, but it would generally make more sense
> to write them to files, so you'd probably be better off writing a
> function that ends with a ggsave() call and call d_ply(). [Note: the _
> is used when your function creates a side effect, such as printing or
> saving a plot object - it returns nothing to the R console.]
>
> As for the numeric summaries,
>
> ddply(md, .(condition, time, group), function(d) mean(d$value, na.rm =
> TRUE))
>
> would work. The advantage of plyr (and its successor, dplyr) is that
> you can pass arbitrary functions as the third argument as long as the
> input is a data frame and the output is a data frame (or something
> that can be coerced to a data frame). This is more robust than
> tapply().
>
> Comment: plyr/reshape2 is a good starter package combination as it
> teaches you the value of the split-apply-combine approach to data
> analysis, but it can be (very) slow. The dplyr/tidyr package
> combination is faster, more computationally efficient version of
> plyr::ddply() and reshape2 and is recommended for use, although you
> have to learn a somewhat different approach to R programming in the
> process. If you're fairly new to R, that shouldn't matter much.
>
> There has been a lot of work in the last year or two to improve the
> flow of programming for tasks such as recursive plotting or model
> fitting. The dplyr and tidyr packages are meant to be replacements for
> plyr and reshape[2], respectively; both are written by Hadley 

[R] Error while running Vegas function in cpvSNP package

2016-09-01 Thread MLSC
Hello Sir,

When I try to run vegas() function, I come across below errors, can
somebody help me in fixing this issue?

> test<-vegas(snpsGSC, gr,ldMat,1000,correction=TRUE,seed=NULL,
verbose=FALSE)
Warning: coercing ldMatrix from data.frame to matrix.
Error in validObject(.Object) :
  invalid class “VEGASResultCollection” object: members must all be
'VEGASResult' classes
> test<-vegas(gs2, gr,ldMat,1000,correction=TRUE,seed=NULL, verbose=FALSE)
Warning: coercing ldMatrix from data.frame to matrix.
Error in validObject(.Object) :
  invalid class “VEGASResultCollection” object: members must all be
'VEGASResult' classes


Please find structure of objects used inside vegas(), below


> class(gs2)
[1] "GeneSetCollection"
attr(,"package")
[1] "GSEABase"
> gs2
GeneSetCollection
  names: NA (1 total)
  unique identifiers: 730005, 23755, ..., 23762 (8 total)
  types in collection:
geneIdType: NullIdentifier (1 total)
collectionType: NullCollection (1 total)
> snpsGSC
GeneSetCollection
  names: NA (1 total)
  unique identifiers: rs9608956, rs6518694, ..., rs2240176 (117 total)
  types in collection:
geneIdType: AnnotationIdentifier (1 total)
collectionType: NullCollection (1 total)
> gr
GRanges object with 10357 ranges and 6 metadata columns:
  seqnames   ranges strand   | P SNP
  |  
  [1]chr22 [16114244, 16114244]  *   |0.9298  rs12157537
  [2]chr22 [16494187, 16494187]  *   |0.2571   rs8142331
  [3]chr22 [16855618, 16855618]  *   |0.3743   rs5747010
  [4]chr22 [17012935, 17012935]  *   |0.1005   rs9604821
  [5]chr22 [17057138, 17057138]  *   |0.5120   rs5746647
  ...  ...  ...... ...   ... ...
  [10353]chr22 [51171693, 51171693]  *   |0.6500rs756638
  [10354]chr22 [51175626, 51175626]  *   |0.5235   rs3810648
  [10355]chr22 [51178090, 51178090]  *   |0.2008   rs2285395
  [10356]chr22 [51181759, 51181759]  *   |0.4858  rs13056621
  [10357]chr22 [51211392, 51211392]  *   |0.2952   rs3888396
   Position Chromosome Start   End
   
  [1]  16114244  chr22  16114244  16114244
  [2]  16494187  chr22  16494187  16494187
  [3]  16855618  chr22  16855618  16855618
  [4]  17012935  chr22  17012935  17012935
  [5]  17057138  chr22  17057138  17057138
  ...   ......   ...   ...
  [10353]  51171693  chr22  51171693  51171693
  [10354]  51175626  chr22  51175626  51175626
  [10355]  51178090  chr22  51178090  51178090
  [10356]  51181759  chr22  51181759  51181759
  [10357]  51211392  chr22  51211392  51211392
  ---
  seqinfo: 1 sequence from an unspecified genome; no seqlengths

>ldMat
   rs756638rs3810648rs2285395   rs13056621rs3888396
rs133433   2.302381e-04 1.593234e-03 1.745740e-03 3.279513e-03 1.135283e-03
rs4645824  3.435556e-04 2.872766e-03 6.350416e-05 9.143595e-04 2.032939e-03
rs12165592 1.164639e-04 6.331347e-03 1.911289e-03 2.124385e-03 7.972265e-04
rs2413348  1.148297e-04 4.106582e-03 1.857187e-03 9.805785e-04 5.707284e-04
rs5755729  6.863351e-04 7.718787e-04 1.794326e-04 9.102677e-05 1.835078e-05
rs5755730  6.606449e-04 1.817608e-03 2.795217e-04 2.912946e-04 1.582141e-03
rs738207   3.193647e-03 1.833686e-06 2.162108e-06 1.377696e-03 3.024123e-03
rs28528068 5.097169e-04 9.289022e-05 8.253080e-05 9.775527e-06 4.618146e-04
rs9610304  2.185120e-05 1.753900e-03 3.760546e-04 4.235130e-06 7.791331e-04
rs5999844  1.511305e-04 5.263161e-05 1.594619e-04 3.668878e-04 9.886630e-05
rs8136332  1.466643e-04 6.929900e-04 1.128017e-05 1.327246e-03 3.758860e-04
rs909704   9.107431e-05 6.988505e-05 8.734125e-04 6.070963e-04 1.666259e-05
rs10483191 1.563958e-04 6.843857e-04 1.050799e-05 1.289273e-03 3.944796e-04
rs880211   7.008708e-05 3.167541e-03 6.418652e-04 2.483367e-04 1.344723e-03
rs1107498  1.888331e-04 2.733062e-03 6.233536e-04 3.931746e-04 1.341147e-03
rs5999855  3.143964e-05 5.473455e-03 1.166912e-03 4.374772e-03 2.152193e-03
rs9610308  1.579521e-05 5.385714e-06 1.199517e-06 3.337275e-03 4.705493e-04
rs713968   1.125728e-03 2.431651e-05 7.292905e-05 9.684127e-04 6.402607e-05
rs139059   2.946244e-04 2.765441e-04 2.785183e-06 7.474786e-04 3.190005e-04
 [ reached getOption("max.print") -- omitted 4981 rows ]

Please find session info below,
> sessionInfo()
R version 3.2.4 Revised (2016-03-16 r70336)
Platform: x86_64-pc-linux-gnu/64 (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats4parallel  stats graphics  grDevices utils 

Re: [R] Need advice on linear programming in R

2016-09-01 Thread Michael Hannon
Thanks, Peter.  Not useless at all, but I'm somewhat overwhelmed by
the choices.  I'll have a closer look at some of them.

-- Mike


On Thu, Sep 1, 2016 at 1:24 AM, peter dalgaard  wrote:
>
>> On 01 Sep 2016, at 05:34 , Michael Hannon  wrote:
>>
>> Greetings.  A subset of a problem that the group I work with turns out to be
>> an optimization problem, in the sense of linear programming.
>>
>> We've looked at several approaches to this but haven't found one that seems 
>> to
>> be the right fit.  I'm looking for some guidance in finding an R package that
>> does what we want in an acceptable time.
>>
>
> Possibly a completely useless piece of advice, but have you checked the CRAN 
> Task View:
>
> https://cran.r-project.org/web/views/Optimization.html#MathematicalProgrammingSolvers
>
> ?
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] Need advice on linear programming in R

2016-09-01 Thread peter dalgaard

> On 01 Sep 2016, at 05:34 , Michael Hannon  wrote:
> 
> Greetings.  A subset of a problem that the group I work with turns out to be
> an optimization problem, in the sense of linear programming.
> 
> We've looked at several approaches to this but haven't found one that seems to
> be the right fit.  I'm looking for some guidance in finding an R package that
> does what we want in an acceptable time.
> 

Possibly a completely useless piece of advice, but have you checked the CRAN 
Task View:

https://cran.r-project.org/web/views/Optimization.html#MathematicalProgrammingSolvers

?

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R] GLM output problem

2016-09-01 Thread peter dalgaard
>> And use the parameters returned by GLM to contruct an equation for the
>> regression model:
>> 
>> model.eq = -0.446078 + 0.267673*x - 0.014577*I(x^2)
> 
> ## Not what I got with your data. I got:
> 
> Coefficients:
> (Intercept)x   I(x^2)
>   -18.5750   5.0403  -0.2845
> 
> 
> I suspect you had some other x,y variables lying around when you
> defined your model.


More likely, the family= specification got lost and gaussian family implied:

> glm(model)

Call:  glm(formula = model)

Coefficients:
(Intercept)x   I(x^2)  
   -0.44608  0.26767 -0.01458  

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


Re: [R-es] Microsoft R Open 3.3.1 problema

2016-09-01 Thread Marcelino de la Cruz Rot
Si no he entendido mal, para obtener un resultado 1 x n deberías usar 
c() en vez de rbind().


Si haces un rbind con las primera columna de n data.frames, cada una con 
m filas, obtendrás una matriz n x m.



El 01/09/2016 a las 6:43, javier.ruben.marcu...@gmail.com escribió:


Estimados

Microsoft R Open 3.3.1 me está dando problemas, por ejemplo rbind.

Los resultados son extraños, por ejemplo muchas columnas cuándo debería ser una 
sola sonde tomo solamente la primer columna de varios data.frames, como un 
arreglo de n x n donde los n son números “grandes”, cuándo debería ser solo 1 x 
n .

¿Alguno tiene problemas? Está imposible para trabajar.

Javier Rubén Marcuzzi


[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es




--
Marcelino de la Cruz Rot
Depto. de Biología Y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es