Re: [R] Count unchanged class attribute

2015-05-19 Thread Jim Lemon
Hi Xiyan, I have to admit that your puzzle very nearly stumped me. At first I thought the question was: "What are the numbers of rows with changed and unchanged class values?" That doesn't work as there are at most four rows and your answer sums to five. I then tried: "How many times does at lea

[R] Sequentially serializing large objects

2015-05-19 Thread Kevin Wang via R-help
Hi r-help, I've been having some issues serializing large objects over a socket. I can reproduce the issue with the following two instances: Instance 1: > conn <- socketConnection("localhost", 34533, server = TRUE, open = "w+b") > for (i in 1:10) { serialize(1:2e9, conn) } Instance 2: > conn <- s

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 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, matri

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. http://stackoverflow.com/questions/5963269/ho

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] 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. J

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: johnwas...@gmail

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 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 scale from the residua

[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 explore

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] 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: I have tri

[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

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 wrote: > And another approach just for the heck of it. > > library(plyr) > > # where dat1 is your dat

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: hafiz

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 A&M University College Station, TX 77840-43

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 < hafizuddinarsha...@gm

[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, 19

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

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] 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 w

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 given

[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 understan