Re: [R] Spatial & Temporal Analysis of Daily Rainfall, Temperature Data

2016-11-08 Thread Henry Utila
Dear R experts, I have a problem which I don't seem to get to pass. I want to analyze daily rainfall & temperature data with a lot of missing or unavailable points. I have been asked to use evd, evir, ismev and geoR packages. I have not used R before neither do I know any computer languages let

Re: [R] Read in files in r

2016-11-08 Thread Jim Lemon
Hi lily, My first guess is that the errors are due to trying to open a file like: "fold1/file1.txt" as: "file1.txt" That is, your code will generate filenames in the directories fold1,..., without prepending the folder names. Maybe: result_list<-list() read_dirs<-paste("fold",1:3,sep="")

[R] Read in files in r

2016-11-08 Thread lily li
Hi R users, In the current directory, there are several folders (such as fold1, fold2, fold3, etc.), while each folder includes the same named files, such as file1.txt, file2.txt, file3.txt, etc. The structures of each folder and each file are the same, but with different values. I want to read

Re: [R] a book recommendation, please [O/T]

2016-11-08 Thread Simon Blomberg
How about Cox and Reid (2000) The Theory of the Design of Experiments. It has S-PLUS code in the back, which should pretty much work with R. On 08/11/16 22:24, Spencer Graves wrote: Have you considered Box and Draper (2007) Response Surfaces, Mixtures, and Ridge Analyses, 2nd Edition?

Re: [R] Alternative to apply in base R

2016-11-08 Thread William Dunlap via R-help
The version which allows any number of columns does not take much more time than the one that requires exactly 7 columns. If you have a zillion columns then these are not so good. > f1 <- function(x) x[,1]*x[,2]*x[,3]*x[,4]*x[,5]*x[,6]*x[,7] > f2 <- function(x) { +val <- rep(1, nrow(x)) +

Re: [R] Alternative to apply in base R

2016-11-08 Thread Doran, Harold
Well, I wish R-help had a “like” button as I would most certainly like this reply :) As usual, you’re right. I should have added a disclaimer that “in this instance” there are 7 columns as the function I wrote evaluates an N-dimensional integral and so as the dimensions change, so do the number

Re: [R] Alternative to apply in base R

2016-11-08 Thread peter dalgaard
> On 08 Nov 2016, at 21:23 , Doran, Harold wrote: > > It¹s a good suggestion. Multiplication in this case is over 7 columns in > the data, but the number of rows is millions. Unfortunately, the values > are negative as these are actually gauss-quad nodes used to evaluate a >

Re: [R] Alternative to apply in base R

2016-11-08 Thread Jeff Newmiller
Log-sum-antilog is faster than apply by several times, but vector multiplication in a for loop as David and Chuck have suggested is several times faster than that. -- Sent from my phone. Please excuse my brevity. On November 8, 2016 12:23:04 PM PST, "Doran, Harold" wrote:

Re: [R] Alternative to apply in base R

2016-11-08 Thread Doran, Harold
It¹s a good suggestion. Multiplication in this case is over 7 columns in the data, but the number of rows is millions. Unfortunately, the values are negative as these are actually gauss-quad nodes used to evaluate a multidimensional integral. colSums is better than something like apply(dat, 2,

Re: [R] Alternative to apply in base R

2016-11-08 Thread Fox, John
Dear Harold, If the actual data with which you're dealing are non-negative, you could log all the values, and use colSums() on the logs. That might also have the advantage of greater numerical accuracy than multiplying millions of numbers. Depending on the numbers, the products may be too

Re: [R] AdehabitatHR Write Spatial Polygon Problem

2016-11-08 Thread Duncan Murdoch
On 08/11/2016 12:09 PM, Shaney, Kyle J wrote: Hi All, I am trying to export a shapefile of a minimum convex polygon, but I receive the following error message: Error: is(x, "SpatialPolygonsDataFrame") is not TRUE I was able to successfully get my minimum convex polygon and plot it in R

Re: [R] [R-sig-Debian] proplems installing R 2.5 on Ubuntu 14.04

2016-11-08 Thread Lentes, Bernd via R-help
- Am 8. Nov 2016 um 16:22 schrieb Johannes Ranke johannes.ra...@jrwb.de: > Hallo Bernd, > > das heisst die gleiche Fehlermeldung bei "configure"? > > Gruß, > > Johannes > > Am Dienstag, 8. November 2016, 15:45:15 schrieb Lentes, Bernd: >> - Am 8. Nov 2016 um 15:26 schrieb Johannes

[R] AdehabitatHR Write Spatial Polygon Problem

2016-11-08 Thread Shaney, Kyle J
Hi All, I am trying to export a shapefile of a minimum convex polygon, but I receive the following error message: Error: is(x, "SpatialPolygonsDataFrame") is not TRUE I was able to successfully get my minimum convex polygon and plot it in R using the following code: PID208 <-

Re: [R] Duplicate row.names of lncRNA

2016-11-08 Thread Vivek Das
This is cross posted in Biostars https://www.biostars.org/p/221116/ . I do not see any problem with duplicate row names unless you have specific reasons to keep them. Here you are performing with transcript ids either with refseq or ensemble. Now every gene does not have unique transcript ids,

[R] Duplicate row.names of lncRNA

2016-11-08 Thread Elham - via R-help
I want to do meta analysis for lncRNA,but there is this error : Duplicate row.names are not allowed.  so 35 genes that are duplicate were detected,for example: PGM5-AS1-001 ENST0417887.1       PGM5-AS1-001 ENST0613309.4      when I search them in ensembl by its Transcript ID, one of them

Re: [R] Unsupervised Clustering Algorithms(Possibilistic C-Means and Noisy Clustering)

2016-11-08 Thread Bert Gunter
Get familiar with the R ecosystem. https://cran.r-project.org/web/views/Cluster.html 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 ) On Tue, Nov

[R] Duplicate row.names of lncRNA

2016-11-08 Thread Elham - via R-help
I want to do meta analysis for lncRNA,but there is this error : Duplicate row.names are not allowedso some genes that are duplicate were detected,for example:PGM5-AS1-001 ENST0417887.1PGM5-AS1-001 ENST0613309.4when I search them in ensembl by its Transcript ID, one of them is antisense

Re: [R] Alternative to apply in base R

2016-11-08 Thread David Winsemius
> On Nov 8, 2016, at 7:57 AM, Doran, Harold wrote: > > Without reaching out to another package in R, I wonder what the best way is > to speed enhance the following toy example? Over the years I have become very > comfortable with the family of apply functions and generally not

Re: [R] Alternative to apply in base R

2016-11-08 Thread Charles C. Berry
On Tue, 8 Nov 2016, Doran, Harold wrote: Without reaching out to another package in R, I wonder what the best way is to speed enhance the following toy example? Over the years I have become very comfortable with the family of apply functions and generally not good at finding an improvement

[R] Unsupervised Clustering Algorithms(Possibilistic C-Means and Noisy Clustering)

2016-11-08 Thread alper tuna kavlak
Hi, I need some help about coding on clustering algorithms. To compose the structure of clusters I have already codes for K-Means and Fuzzy C-Means. I need also for PCM and NC but the problem that I can't write the proper code for those algorithms. So if there is a responsible person who is

Re: [R] Sorting of character vectors

2016-11-08 Thread Pascal A. Niklaus
Thanks for all suggestions. With my build (from the CRAN repo) I don't get ICU support, and setting LC_COLLATE to "C" did not help. > capabilities("ICU") ICU FALSE > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.5 LTS locale:

[R] Alternative to apply in base R

2016-11-08 Thread Doran, Harold
Without reaching out to another package in R, I wonder what the best way is to speed enhance the following toy example? Over the years I have become very comfortable with the family of apply functions and generally not good at finding an improvement for speed. This toy example is small, but my

Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-08 Thread Achim Zeileis
On Tue, 8 Nov 2016, danilo.car...@uniparthenope.it wrote: I tried the function flexmix() with the driver FLXMRnegbin() with two components first, in order to compare its results with those provided by my function mixnbinom(). In particular, I ran the following code: fm0 <- flexmix(y ~ 1,

Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-08 Thread danilo . carita
I tried the function flexmix() with the driver FLXMRnegbin() with two components first, in order to compare its results with those provided by my function mixnbinom(). In particular, I ran the following code: fm0 <- flexmix(y ~ 1, data = data.frame(y), k = 2, model = FLXMRnegbin())

Re: [R] problem installing R 2.5

2016-11-08 Thread peter dalgaard
Notice that it is pretty much mandatory to study the Admin manual, e.g., https://cran.r-project.org/doc/manuals/r-release/R-admin.html and its appendices in particular. It is also included in the sources (in .texi format). As you are building an old R on a recent OS, some interpolation may be

Re: [R] problem installing R 2.5

2016-11-08 Thread Marc Schwartz
> On Nov 8, 2016, at 7:08 AM, Lentes, Bernd via R-help > wrote: > > > > - Am 8. Nov 2016 um 7:53 schrieb Göran Broström goran.brost...@umu.se: > >> libX11-dev? >> >> Göran > > Hi, > > is already installed: > > i A libx11-dev -

Re: [R] a book recommendation, please [O/T]

2016-11-08 Thread Richard M. Heiberger
It depends what "Data Analytics" means. Is it more or less, or just a synonym, for "Statistics"? My book, "Statistical Analysis and Data Display: An Intermediate Course with Examples in R" 2nd edition, Springer 2015 could support about half of a Design of Experiments course for MS in Statistics.

Re: [R] problem installing R 2.5

2016-11-08 Thread Lentes, Bernd via R-help
> Hi, > I would like to suggest that this discussion be moved to R-SIG-Debian, since > this is Linux distribution specific: > https://stat.ethz.ch/mailman/listinfo/r-sig-debian > You will avail yourself of a more focused audience there as well. > Regards, > Marc Schwartz Ok. I subscribed

Re: [R] Sorting of character vectors

2016-11-08 Thread Rui Barradas
Hello, What is your sessionInfo()? With me it works as expected: > sort(c("-", "+")) [1] "-" "+" > sort(c("+", "-")) [1] "-" "+" > x5 <- c("+Aa","-Ab") > sort(x5) [1] "-Ab" "+Aa" > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64

Re: [R] Sorting of character vectors

2016-11-08 Thread peter dalgaard
On 08 Nov 2016, at 13:18 , Pascal A. Niklaus wrote: > I just got caught by the way in character vectors are sorted. > > It seems that on my machine "sort" (and related functions like "order") only > consider characters related to punctuation (at least here the "+"

Re: [R] Help-Text file

2016-11-08 Thread Priya Arasu
Hi, I have taken Mr.Jeff's suggestions in producing a reproducible example and edited my question again. Kindly someone in the mailing list, help to solve the problem, which I have mentioned in the below mail Thank youPriya Dear Mr. Jeff Newmiller,                

[R] Sorting of character vectors

2016-11-08 Thread Pascal A. Niklaus
I just got caught by the way in character vectors are sorted. It seems that on my machine "sort" (and related functions like "order") only consider characters related to punctuation (at least here the "+" and "-") when there is no difference in the remaining characters: > x1 <- c("-A","+A")

Re: [R] problem installing R 2.5

2016-11-08 Thread Lentes, Bernd via R-help
- Am 8. Nov 2016 um 7:53 schrieb Göran Broström goran.brost...@umu.se: > libX11-dev? > > Göran Hi, is already installed: i A libx11-dev - Client-seitige Bibliothek für X11 (Entwick (ubuntu system) Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum

Re: [R] a book recommendation, please [O/T]

2016-11-08 Thread Spencer Graves
Have you considered Box and Draper (2007) Response Surfaces, Mixtures, and Ridge Analyses, 2nd Edition? You probably know that George Box invented the field of Response Surfaces with Box, G. E. P. and Wilson, K.B. (1951) On the Experimental Attainment of Optimum Conditions (with

[R] drm function in drc package for fitting dose response curve

2016-11-08 Thread li li
Hi all, When using drm function in drc package, we can fit several does response curves simultaneously or fitting each curve separately. If we fit simultaneous curves without any constraining condition, for example, parallelism condition, will we get the same results as the results obtained by