Re: [R-es] como hacer un simple barchart horizontal ordenado por el valor ...

2015-05-19 Thread Emilio L. Cano
Eric, En un barplot, el orden que se usa es el de los niveles del factor. Al crear un factor, por defecto este orden es alfabético. Lo que tienes que hacer es reordenar los niveles del factor usando el criterio de la otra variable (podría ser cualquier función aplicada a las observaciones del

[R] Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Livia Maria Vestergaard
Hi guys I have a statistical question to an analyse I ran in R. It is a dummy variable model with the 5 regions of Denmark as 4 independent dummy variables and price as the dependent variable: price = 10.325 - 0.176*Sjaeland - 0.368 * NJylland - 0.230*MJylland - 0.120* Syddanmark I

Re: [R] Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Jim Lemon
Hi Livia, You seem to have mixed up the residual error with the R^2, which is just over 0.02. The bottom line on your summary table says that the obtained F statistic was equal to 1894 (this has been truncated to four significant places). The probability of obtaining that value with your data

[R] Finding Optimum of Stochastic Function

2015-05-19 Thread Prof J C Nash (U30A)
Most of the stochastic optimization methods are directed at multiple optima. You appear to have an imprecisely determined function e.g., time taken for racing driver to get round the track, and indeed this is a different form of stochastic optimization. With Harry Joe of UBC I did quite a bit of

Re: [R] Count unchanged class attribute

2015-05-19 Thread John Kane
John Kane Kingston ON Canada -Original Message- From: gunter.ber...@gene.com Sent: Tue, 19 May 2015 20:04:58 -0700 To: jrkrid...@inbox.com Subject: Re: [R] Count unchanged class attribute Probably or what. This demonstrates a fundamental conundrum: many users or prospective users of R

Re: [R] Count unchanged class attribute

2015-05-19 Thread John Kane
Is this a list of data.frames or what? Please have a look at one or both of these for some ideas of how to ask a question and provide information on the problem. The better you can describe what you have and what you need the better people can help.

Re: [R] Count unchanged class attribute

2015-05-19 Thread Rolf Turner
On 20/05/15 04:37, Soe Xiyan wrote: Maybe someone can help me. Suppose I have data-set like this: Netto Bruto class 1 10 1000yes 2 100 20 yes Netto Bruto class 1 101 1000yes 2 100 210 no Netto Bruto class 1 10 10 yes 2 12 28

Re: [R] Count unchanged class attribute

2015-05-19 Thread Bert Gunter
Probably or what. This demonstrates a fundamental conundrum: many users or prospective users of R have had little exposure to data structures in their formal education and therefore can be flummoxed by R's fussiness -- as any programming language must necessarily be. Consider: data frames,

Re: [R] Error in dimnames(phi) - list(rn, dims) : length of 'dimnames' [2] not equal to array extent

2015-05-19 Thread Yonas Yohannes
Dear Oleg, Thank you so much for your advice! But I tried to update the packages and check whether the problem is fixed. But I end up with the same error. Error in dimnames(phi) - list(rn, dims) : length of 'dimnames' [2] not equal to array extent It seems to me that, what I got to update from

[R] Count number in r

2015-05-19 Thread Hafizuddin Arshad
Dear R users, Could someone help me on this? I have this kind of data set: structure(list(Year = c(1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L,

Re: [R] Count number in r

2015-05-19 Thread Jorge I Velez
Dear Arshad, Here is a possibility using tapply(): with(d, tapply(Rain, list(Month, Year), function(x) sum(x .1))) ##1971 #1 12 #20 where d is your data.frame(). See also ?aggregate and ?ave. Best, Jorge.- On Tue, May 19, 2015 at 8:10 PM, Hafizuddin Arshad

Re: [R] Error in dimnames(phi) - list(rn, dims) : length of 'dimnames' [2] not equal to array extent

2015-05-19 Thread Oleg Nenadić
Dear Yonas, It usually takes some time until a Windows binary version is available on R-Forge. It is version 0.61 you want here. So, you can either install the source version using install.packages(ca, repos=http://R-Forge.R-project.org;, type=source) or manually download and install the

[R-es] Formador en R en México DF....

2015-05-19 Thread Carlos Ortega
Hola, Eduard (le conocemos del grupo de Periodismo de Datos) nos ha pedido ayuda para localizar a un formador en R en México DF. Si alguien de la lista está interesado, por favor que se ponga en contacto con él o con Tamar (ambos en copia) para concretar detalles de la colaboración. ​G

Re: [R] Count number in r

2015-05-19 Thread David L Carlson
Here's an approach using xtabs() if you want the output as a table: flag - as.integer(d$Rain=.1) xtabs(flag~Year+Month, d) Month Year1 2 1971 12 0 - David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352

[R] Count unchanged class attribute

2015-05-19 Thread Soe Xiyan
Maybe someone can help me. Suppose I have data-set like this: Netto Bruto class 1 10 1000yes 2 100 20 yes Netto Bruto class 1 101 1000yes 2 100 210 no Netto Bruto class 1 10 10 yes 2 12 28 yes 3 100 20 yes Netto

[R] RJDBC and Unicode characters on Windows

2015-05-19 Thread Joshua Ainsley
Hello, I am using the RJDBC library to connect to a SQL database and pull out text that includes Hebrew characters. If I do this on a Mac, the data frames I construct display the characters properly. If I do it on a Windows PC, then the characters are converted to strings like this:

Re: [R] Count number in r

2015-05-19 Thread John Kane
And another approach just for the heck of it. library(plyr) # where dat1 is your data dd1 - subset(dat1, Rain = .01) dd1$Year - as.factor(dd1$Year) dd1$Month - as.factor(dd1$Month) count (dd1, .(Year, Month)) John Kane Kingston ON Canada -Original Message- From:

Re: [R] Count number in r

2015-05-19 Thread John Wasige
Dear all, I am kindly requesting for help on how I can count pixels with value less and equal to -0.08 for a raster stack. Thanks for your help John On Tue, May 19, 2015 at 5:57 PM, John Kane jrkrid...@inbox.com wrote: And another approach just for the heck of it. library(plyr) # where

Re: [R] Urgent :) Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Livia Maria Vestergaard
Hi :) I have an an examination tomorrow, and don't quite understand how R calculated the values. Yes. You are right R^2=0.02166 :) As mentioned It is a dummy variable model with the 5 regions of Denmark as 4 independent dummy variables and price as the dependent variable. price = 10.325 -

[R] Fixed effects regression and robust regression

2015-05-19 Thread michael westphal via R-help
Hello: I am using R 3.0.2.   I have panel data on countries' renewable energy net generation (and installed capacity) over time.  I am regressing these dependent variables on various socioeconomic variables, as well as binary policy variables.  I have have done basic OLS, but I wanted to

Re: [R] Fixed effects regression and robust regression

2015-05-19 Thread Bert Gunter
On Tue, May 19, 2015 at 1:23 PM, michael westphal via R-help r-help@r-project.org wrote: You can't compare them (statistically -- you can of course draw pictures). Note, from ?rlm: Note that the df.residual component is deliberately set to NA to avoid inappropriate estimation of the residual

Re: [R] Count number in r

2015-05-19 Thread John Kane
If nothing suggested in this thread help I'd suggest asking in R-sig-Geo where they will be more familiar with the issues. Please do not post in HTML. It can serious mangle code to the point it is indecipherable. John Kane Kingston ON Canada -Original Message- From:

Re: [R] Urgent :) Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Jeff Newmiller
Technically it is not on topic to discuss the statistics behind R calculations here, and certainly not our job to do so within the context of your educational institution's schedule. However, you have the power to read the source code of any function in R or contributed packages, so go for it.