Re: [R] Collapsing data.frame to its or xts

2014-06-05 Thread Joshua Ulrich
On Wed, Jun 4, 2014 at 3:52 PM, Costas Vorlow costas.vor...@gmail.com wrote: Hello, I have a data.frame of a time series sampled every 15 minutes. Also the data are in reverse order (recent to older). It looks like the following: snip lots of data Each row has 96 elements (excluding the

Re: [R] detect escape character

2014-06-05 Thread peter dalgaard
You'll find it even more entertaining to realize that Frede's _previous_ position (at Department of Genetics and Biotechnology, Faculty of Agricultural Sciences, Aarhus University) was quite a bit closer to yours. ;-) -pd On 03 Jun 2014, at 20:37 , Sarah Goslee sarah.gos...@gmail.com wrote:

[R] access scopus data

2014-06-05 Thread email
Hello, The Scopus bibliographic database allows one to manually download publications. Is there any R package for accessing scopus data ? How can it be accessed in R? Thanks: John __ R-help@r-project.org mailing list

[R] Trucated Normal Function

2014-06-05 Thread thanoon younis
Dear all members The following function is truncated normal distribution function i wrote it by using winbugs so now i want to write it by using R - program. for(j in 1:P){y[i,j]~djl.dnorm.trunc(mu[i,j],psi[j],thd[j,z[i,j]],thd[j,z[i,j]+1])} where y:underlying continuous variables and treated

Re: [R] detect escape character

2014-06-05 Thread Frede Aakmann Tøgersen
Yes, and at that time there were in fact some people in the department studying biodiversity or perhaps I should say the lack of biodiversity in the modern agricultural farmland in Denmark. And now some years later things are sadly not better. Today the plants I'm studying is wind power plants,

[R] distance by sea

2014-06-05 Thread Giulia Fassio
Hello, someone know if it is possible to use R to calculate distance by sea between two geographic coordinates? I have many points in the sea and I want to create a matrix using R of the length of trajectories that pass only trough sea. Thanks Giulia -- Giulia Fassio Animal Biology PhD

[R] big matrix reading and writing

2014-06-05 Thread Adrienne Wootten
All, Got a tricky situation and unfortunately because it's a big file I can't exactly provide an example, so I'll describe this as best I can for everyone. I have a distance matrix that we are using for a modeling calculation in space for multiple days. Since the matrix is never going to change

Re: [R] big matrix reading and writing

2014-06-05 Thread jim holtman
How are you writing it out now? Are you using 'save' which will compress the file? What are the range of numbers in the matrix? Can you scale them to integers (what is the range of the numbers) which might save some space? You did not provide enough information to make a definitive solution.

Re: [R] error in R program

2014-06-05 Thread Charles Determan Jr
Hello again Thanoon, Once again, you should send these request not to me but to the r-help list. You are far more likely to get help from the greater R community than just me. Furthermore, it is not entirely clear where your error is. It is courteous to provide only the code that is run up to

Re: [R] big matrix reading and writing

2014-06-05 Thread Adrienne Wootten
Jim At the moment I'm using write.table. I tried using write.matrix from the MASS package, but that failed. Integers are not appropriate here because we are working with fractions of miles for some locations and that needs to be retained. The range is from 0 to about 3.5 (it's a little less

Re: [R] big matrix reading and writing

2014-06-05 Thread jim holtman
The real question is how much memory does the machine that you are working on have. The 32000x32000 matrix will take up ~8GB of physical memory, so how much memory will the rest of your objects take up. Are any of them going to be copies of the distance matrix, or is it always going to be

Re: [R] distance by sea

2014-06-05 Thread Jeff Newmiller
If it is possible at all (and I suspect it is) then it should be possible in R. However, your question is lazy... you should not be asking about black boxes that magically solve your problem, but rather do a search for algorithms that accomplish your goals (wouldn't you want to know if someone

Re: [R] big matrix reading and writing

2014-06-05 Thread Adrienne Wootten
Jim, There are not going to be additional copies of the distance matrix. The distance matrix is what is needed for a geographically weighted regression, so I can estimate the results from that to be a SpatialPointsDataFrame at roughly 3 rows by 7 columns. Much smaller size than the distance

Re: [R] distance by sea

2014-06-05 Thread David L Carlson
Package geosphere has functions to compute the great circle distance between any two points given the latitude and longitude. It does not care if they are at sea, but does not take topography into account. - David L Carlson Department of Anthropology Texas AM

Re: [R] big matrix reading and writing

2014-06-05 Thread Dave Roberts
Adrienne, I have a crew just starting work on this problem this week, but I think in your case the best solution is more memory. R stores the distance matrix as a vector with (n^2-n)/2 entries. It's perfectly dense and immune to sparse matrix compaction. It would be quite possible to

Re: [R] Trucated Normal Function

2014-06-05 Thread Spencer Graves
library(sos) tn - findFn('truncated normal', 999) found 421 matches; retrieving 22 pages 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Downloaded 305 links in 138 packages. tn # opens the list of 305 links in a web browser installPackages(tn) # installs the packages with the most

[R] R 3.1.0 interpreting large negative seconds since epoch as LMT?

2014-06-05 Thread Pfuntner, John
I'm seeing a weird difference in behavior between R versions 3.0.2 and 3.1.0. Consider this session from version 3.0.2: secs = c(-6327530133, -632753013, -63275301, -6327530, -632753, -63275, -6327, -632, -63) class(secs) = c('POSIXt', 'POSIXct') secs [1] 1769-06-27 11:44:27 EST 1949-12-13

[R] .Rprofile: contains invalid line(s)

2014-06-05 Thread Stephen Davies
At some point in the recent past, my local .Rprofile has ceased to be executed on startup. I've upgraded R several times in the last few months, and am unsure which version caused this problem. Currently I'm running version 3.1.0 (2014-04-10) Spring Dance on 64-bit Ubuntu. My symptoms

Re: [R] .Rprofile: contains invalid line(s)

2014-06-05 Thread Ista Zahn
Hi Stephan, R_ENVIRON should not point to your .Rpofile, use R_PROFILE_USER for that. See ?Startup for details. Best, Ista On Thu, Jun 5, 2014 at 10:18 AM, Stephen Davies step...@umw.edu wrote: At some point in the recent past, my local .Rprofile has ceased to be executed on startup.

[R] Reading specific lines from a text file in r

2014-06-05 Thread Navin Goyal
Dear R users, I am trying to read a text file into R. the text file looks as shown below (data1). I want to skip the text lines and collect all lines starting with specific marker(s). Example in below, I want to collect all lines which start with -1000 and -1001 If the model results in

[R] Bitwise operations on large numbers

2014-06-05 Thread Koustubh Bagade
Hi I am working on numbers between 0 - 2^32. I want to perform bit-wise shift operations on these numbers. Integer allows me to do bitwise shift operations but number range is limited to 0 - 2^31. Double allows me to store large numbers but I can not perform bitwise shifting. I can not change

[R] Mapping

2014-06-05 Thread Tom Detzel
Hey Folks, Apologies in advance if this has been covered. I'm taking on a simple mapping project. What packages, tutorials and examples would you recommend for a beginning mapper in R? Thanks, Tom [[alternative HTML version deleted]] __

[R] Run R Code Continuously in the Background of HTML

2014-06-05 Thread Cheryl Johnson
I would like to run R code continuously in the background of a HTML page. This code will run in a loop that has a random number generator. I would like the different values from the random number generator to be displayed on the HTML page as the loop iterates. Thanks in advance for any help.

[R] Understanding survey design (svydesign)

2014-06-05 Thread Ryan de Vera
Hi all, I am trying to understand the output of the svydesign function. My question is, is there documentation on how the probabilities are computer? Or could someone please explain to me how they are? I have this d-svydesign(id=~PSU, strata=~STRATUM,weights=~w, data=s, nest=TRUE) And this

Re: [R] Mapping

2014-06-05 Thread Greg Snow
What type of mapping? Do you want to add points to an existing map? Color in polygons of a downloaded map? Create a completely new map? other? our advice to you depends on what you want to do. Also please read the posting guide linked to at the bottom of all emails and don't post in HTML,

Re: [R] .Rprofile: contains invalid line(s)

2014-06-05 Thread Henrik Bengtsson
Make sure that the last line has a newline at the end, otherwise that expression will be silently ignored, cf. R-devel thread '[Rd] Last line in .Rprofile must have newline (PR#4056)' on 2003-09-03 [https://stat.ethz.ch/pipermail/r-devel/2003-September/027455.html]. I'm pretty sure many many

[R] Understanding svymean

2014-06-05 Thread Ryan de Vera
Hello all, I am trying to understand how svymean is calulated with svydesign. I have the code: dstrat1-svydesign(id=~PSU, strata=~STRATUM,weights=~Sample_Weight, data=subset25k, nest=TRUE) and I am using svymean to compute the mean. My main question is how are the sampling probabilities

Re: [R] Bitwise operations on large numbers

2014-06-05 Thread William Dunlap
Double allows me to store large numbers but I can not perform bitwise shifting. It is a nuisance that bitwShiftL and bitwShitR don't just shift (and wrap around to negative) for integers so you could use all 32 bits. You could use doubles and multiply (*) and divide (%/%) by 2^n instead of

[R] Error Correction Model on Panel Data

2014-06-05 Thread Bentley Coffey
I have a panel data set with a non-stationary regressand and a non-stationary regressor. I've used the plm package to do a fixed effects regression of a long-run (i.e. cointegrating) relationship between these non-stationary variables and I've used plm's purtest to do an Engle-Granger test that

Re: [R] Bitwise operations on large numbers

2014-06-05 Thread William Dunlap
Oops, I got bitSlice wrong, hence and and or won't be right. bitSlice should be: bitSlice - function(x, from, length) shiftR(x, from) %% 2^length Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Jun 5, 2014 at 3:31 PM, William Dunlap wdun...@tibco.com wrote: Double allows me to store

[R] Fwd: error in R program

2014-06-05 Thread Charles Determan Jr
-- Forwarded message -- From: thanoon younis thanoon.youni...@gmail.com Date: Thursday, June 5, 2014 Subject: error in R program To: Charles Determan Jr deter...@umn.edu many thanks to you Dr. Charles Really i have a problem with simulation data in xi and now i have this erro r

[R] Why have my glmms stopped converging (lme4)

2014-06-05 Thread Heather Baldwin
I have four sets of glmms (binomial, logit-linked) which I have run in various incarnations with no problems over the last weeks. All converged, data assumptions checked, reasonable goodness-of-fit (0.75-85). They are based on three different data sets. Today, I wanted to rerun one of them after

Re: [R] Understanding svymean

2014-06-05 Thread Thomas Lumley
On Fri, Jun 6, 2014 at 9:50 AM, Ryan de Vera ryan.devera...@gmail.com wrote: Hello all, I am trying to understand how svymean is calulated with svydesign. I have the code: dstrat1-svydesign(id=~PSU, strata=~STRATUM,weights=~Sample_Weight, data=subset25k, nest=TRUE) and I am using svymean

Re: [R] Understanding survey design (svydesign)

2014-06-05 Thread Thomas Lumley
If you have zeros in the supplied sample weights, the display in the summary() function will look like this. Nothing is actually wrong with the calculations, though. If the zero weights are because of restriction to a subpopulation, you will get better-looking summaries if you put the whole

Re: [R] detect escape character

2014-06-05 Thread Adrian Dușa
On Tue, Jun 3, 2014 at 8:44 PM, David Winsemius dwinsem...@comcast.net wrote: On Jun 3, 2014, at 11:03 AM, Adrian Dușa wrote: Dear All, I should be knowing this, but not get it right... I'm a little surprised to see you ask this, too, but we each have lacunae in our R knowledge, so I

Re: [R] How do I do a conditional sum which only looks between certain date criteria

2014-06-05 Thread arun
Hi, The expected output is confusing. dat1 - read.table(text=date, user, items_bought 2013-01-01, x, 2 2013-01-02, x, 1 2013-01-03, x, 0 2013-01-04, x, 0 2013-01-05, x, 3 2013-01-06, x, 1 2013-01-01, y, 1 2013-01-02, y, 1 2013-01-03, y, 0 2013-01-04, y, 5 2013-01-05, y, 6 2013-01-06, y,