Re: [R] Plot Rclimdex or Climpact map with R

2018-07-30 Thread ouedraogo_agathe via R-help
For example the packages compute some indices let's say total precipitation (annua). So i ll have for each station a table representing annual totals with the trend slope. So i would like to put them on a map ( a county in Kenya) so that i can easily see the trend spatially. Sent from my Sams

Re: [R] Plot Rclimdex or Climpact map with R

2018-07-30 Thread Jim Lemon
Hi Agathe, You can start with the "maps" package: # in an R session install.packages("maps") # assume you want a simple map containing France map("world",xlim=c(-6.0,9.6),ylim=c(42,51.5)) then plot your data by the coordinates of the stations. You will probably want to plot graphical elements to

Re: [R] read txt file - date - no space

2018-07-30 Thread MacQueen, Don via R-help
Or, without removing the first line dadf <- read.table("xxx.txt", stringsAsFactors=FALSE, skip=1) Another alternative, dadf$datetime <- as.POSIXct(paste(dadf$V1,dadf$V2)) since the dates appear to be in the default format. (I generally prefer to work with datetimes in POSIXct class rather tha

Re: [R] read txt file - date - no space

2018-07-30 Thread Jim Lemon
Hi Diego, You may have to do some conversion as you have three fields in the first line using the default space separator and five fields in subsequent lines. If the first line doesn't contain any important data you can just delete it or replace it with a meaningful header line with five fields and

Re: [R] (no subject)

2018-07-30 Thread Bert Gunter
How can one possibly answer this without knowing the structure of your dataset? -- 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 Mon, Jul 30, 2018 at 8

Re: [R] Unexpected YAML

2018-07-30 Thread Rui Barradas
Hello, Maybe R is loading a previously saved session. Check whether you have a file named .RData in your working directory. (This is not a file extension, it's the full filename.) Hope this helps, Rui Barradas Às 20:14 de 30-07-2018, jlu...@ria.buffalo.edu escreveu: R Users: Whenever I fire

Re: [R] Unexpected YAML

2018-07-30 Thread Rich Shepard
On Mon, 30 Jul 2018, jlu...@ria.buffalo.edu wrote: Error in loadNamespace(name) : there is no package called ‘yaml’ How do I get rid of it? Joe, Easiest way is to install it: install.packages("yaml") Rich __ R-help@r-project.org mailing list

[R] Unexpected YAML

2018-07-30 Thread JLucke
R Users: Whenever I fire up R, I now get the following message (red) at the end of the prologue. R version 3.5.1 (2018-07-02) -- "Feather Spray" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY N

Re: [R] read txt file - date - no space

2018-07-30 Thread Jeff Newmiller
1) No. 2) The read.csv function is a s special case use of the more general read.table function that can handle any simple field separator. 3) Read the data in as character (I recommend using the stringsAsFactors=FALSE argument to read.table) and convert to an appropriate type from that form.

[R] Plot Rclimdex or Climpact map with R

2018-07-30 Thread ouedraogo_agathe via R-help
HelloI am using Rclimdex and Climpact packages to compute some indices. Having the location of all my stations I wish to plot the resultats on a map. Is there a way to simply do it from the packages or how to do it for someone who does not master R software?thanks  Sent from my Samsung Galaxy s

[R] read txt file - date - no space

2018-07-30 Thread Diego Avesani
Dear all, I am dealing with the reading of a *.txt file. The txt file the following shape: 103001930 103001580 103001530 1998-10-01 00:00:00 0.6 0 0 1998-10-01 01:00:00 0.2 0.2 0.2 1998-10-01 02:00:00 0.6 0.2 0.4 1998-10-01 03:00:00 0 0 0.6 1998-10-01 04:00:00 0 0 0 1998-10-01 05:00:00 0 0 0 1998

[R] (no subject)

2018-07-30 Thread Baojun Sun
The book "Introduction to Statistical Learning" gives R scripts for its labs. I found a script for ridge regression that works on the dataset the book uses but is unusable on other datasets I own unless I clean the data. I'm trying to understand the syntax for I need for data cleaning and am stuc

Re: [R] dbGetQuery() returns wrong value

2018-07-30 Thread Jeff Newmiller
If you have not read [1] already, you should. As to how JDBC handles this issue I don't know, but such a package-specific conversation belongs on r-sig-db. [1] http://www.win-vector.com/blog/2015/06/r-in-a-64-bit-world/ On July 30, 2018 6:06:04 AM PDT, Christofer Bogaso wrote: >The data type i

Re: [R] dbGetQuery() returns wrong value

2018-07-30 Thread Christofer Bogaso
The data type is defined as bigint On Mon, Jul 30, 2018 at 4:45 PM Eric Berger wrote: > The ID matches in the first 16 characters. > How is your table declared? > > > On Mon, Jul 30, 2018 at 2:00 PM, Christofer Bogaso < > bogaso.christo...@gmail.com> wrote: > >> Session Information for abov

Re: [R] dbGetQuery() returns wrong value

2018-07-30 Thread Eric Berger
The ID matches in the first 16 characters. How is your table declared? On Mon, Jul 30, 2018 at 2:00 PM, Christofer Bogaso < bogaso.christo...@gmail.com> wrote: > Session Information for above error: > > > sessionInfo() > R version 3.5.0 (2018-04-23) > Platform: x86_64-w64-mingw32/x64 (64-bi

Re: [R] dbGetQuery() returns wrong value

2018-07-30 Thread Christofer Bogaso
Session Information for above error: > sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 16299) Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252LC_MONETARY=E

[R] dbGetQuery() returns wrong value

2018-07-30 Thread Christofer Bogaso
Hi, I used following SQL query to fetch information from DB > dbGetQuery(Conn, "select ID from where date = '2018-07-18' and ID = '72075186224672770' limit 10") ID 1 72075186224672768 As you see, it is returning a different result from what actual query string contains. However wh

Re: [R] Fwd: Quadratic programming, for loop

2018-07-30 Thread Maija Sirkjärvi
Thanks a lot! I got the main part working (after a relaxing holiday). However I still have some problems with the conditions. The looping is not working properly, but this is not really an QP problem anymore. It's more about that R runs the loop differently than c++, I guess. Thanks a lot for help