Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2024-01-03 Thread Dr Eberhard Lisse
If you do something like this

for i in  $(pandoc --list-output-formats);
do pandoc -f docx -t $i -o test.$i Now\ they\ want\ us\ to\ 
charge\
our\ electric\ cars\ from\ litter\ bins.docx;
done

you get approximately 65 formats, from which you can pick one which you can
write a little parser for. The dokuwiki one for example uses long lines
which
makes parsing easier.

el


On 2023-12-30 13:57 , Andy wrote:
> Good idea, El - thanks.
>
> The link is
> https://docs.google.com/document/d/1QwuaWZk6tYlWQXJ3WLczxC8Cda6zVERk/edit?usp=sharing=103065135255080058813=true=true
>
>  This is helpful.
>
> From the article, which is typical of Lexis+ output, I want to
> extract the following fields and append to a Calc/ Excel spreadsheet.
> Given the volume of articles I have to work through, if this can be
> iterative and semi-automatic, that would be a god send and I might be
> able to do some actual research on the articles before I reach my
> pensionable age. :-)
>
> Title Newspaper Date Section and page number Length Byline Subject
> (only if the threshold of coverage for a specific subject is
>> =50% is reached (e.g. Greenwashing (51%)) - if not, enter 'nil' and
>>
> move onto the next article in the folder
>
> This is the ambition. I am clearly a long way short of that though.
>
> Many thanks. Andy

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Barplot for data frame

2023-11-29 Thread Dr Eberhard Lisse

Look like homework to me :-)-O

el

On 2023-11-29 02:29 , Livio Beqiri wrote:

I have a dataframe df <-

df <- data.frame (Revenue = c("100", "300", "500"),
   Brand = c("Apple", "HP", "Lenovo")
   )


how can i create a vertical barplot that displays brands in x-axis and Revenue 
in Y-axis



[[alternative HTML version deleted]]



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R Gigs

2023-10-07 Thread Dr Eberhard Lisse

LinkedIn is what seems to go these days

el

On 2023-10-06 22:35 , Bert Gunter wrote:

May be an age gap here, but I assume "gigs" = freelance jobs. If so,
https://stat.ethz.ch/mailman/listinfo/r-sig-jobs
might be useful. As well as an online search in all the usual places.
Otherwise, please excuse my out-of-date ignorance.

[...]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] knitr and tinytex

2023-04-27 Thread Dr Eberhard Lisse
Open the script in RSTudio which should ask you whether you want to
install (the) missing packages.

el



On 27/04/2023 02:26, Steven T. Yen wrote:
> Dear tinytex users
> 
> I install knitr and tinytex with the following line commands in RStudio
> and it seems to work:
> 
> install.packages("knitr")
> install.packages('tinytex')
> 
> In the long past I was told to also run the following lines but now they
> do not seem to be needed.
> #update.packages(ask = FALSE, checkBuilt = TRUE)
> #tinytex::tlmgr_update()
> #tinytex::reinstall_tinytex()
> 
> Would running the first two lines above be adequate? Is it also OK run
> run in RStudio by Tool -> Install.packages? Thanks you!
> 

-- 
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R does not run under latest RStudio

2023-04-06 Thread Dr Eberhard Lisse
Works without issues on

R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Platform: x86_64-apple-darwin17.0 (64-bit)
RStudio Version 2023.03.0+386 (2023.03.0+386)

el

On 06/04/2023 16:22, John C Frain wrote:
> Does R run from a command prompt? If so, the problem is likely due to
> your Rstudio setup. If R does not run from a command prompt, any error
> messages might give some idea of the problem. I can run R and Rstudio
> in Windows 11?, Windows 10 and the current version of Linux Mint.
[...]
>> On 06.04.2023 11:28, Steven T. Yen wrote:
>>> I updated to latest RStudio (RStudio-2023.03.0-386.exe) but
>>> R would not run. Error message:
>>>
>>> Error Starting R
>>> The R session failed to start.
[...]


-- 
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to parse a really silly date with lubridate

2022-07-13 Thread Dr Eberhard Lisse



Hi,

I have data file which generated by an otherwise very nice (diabetes
log) app, but exports dates really silly.

After reading the enclosed mwe.csv into R like so

 MWE <- read_delim('mwe.csv', delim = ';') %>%
select(Date) %>%
print()


this comes out as:

 # A tibble: 2 × 1
Date

 1 9. Jul 2022 at 11:39
 2 10. Jul 2022 at 01:58


No matter what I try I am not able to parse this inside R to get at
proper dates (I have loaded tidyverse and lubridate).

I can easily do somethig

 csvq  -d ';' -t '%e. %b %Y at %H:%i' \
'SELECT Date as oridate,
DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
FROM mwe'

 +---+--+
 |oridate|   date   |
 +---+--+
 | 9. Jul 2022 at 11:39  | 2022-07-09 11:07 |
 | 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
 +---+--+

and hence could easily do something like

 csvq  -d ';' -t '%e. %b %Y at %H:%i' \
  'ALTER mwe
  SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'

but would rather like to be able to do it inside R and would therefor
appreciate any advice in this regard.


greetings, el

--
To email me replace 'nospam' with 'el'
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] ISO Code for Namibia ('NA')

2021-09-02 Thread Dr Eberhard Lisse

Thank you.

el


On 02/09/2021 00:41, Bill Dunlap wrote:

z <- tibble(Code=c("NA","NZ",NA), Name=c("Namibia","New Zealand","?"))
z

# A tibble: 3 x 2
   Code  Name

1 NANamibia
2 NZNew Zealand
3   ?

subset(z, Code=="NA")

# A tibble: 1 x 2
   Code  Name

1 NANamibia

subset(z, is.na(Code))

# A tibble: 1 x 2
   Code  Name

1   ?

subset(z, Code==NA_character_)

# A tibble: 0 x 2
# ... with 2 variables: Code , Name 

On Wed, Sep 1, 2021 at 3:33 PM Dr Eberhard Lisse  wrote:


Hi,

how can I look for the ISO code for Namibia 'NA' in a list of ISO codes
which looks something like

 # A tibble: 10 × 1
location_code

  1 NC
[...]
 10 NZ

but should look like

 # A tibble: 10 × 1
location_code

  1 NA
  2 NC
[...]
 11 NZ

In other words 'NA' is taken for the missing value NA.

greetings, el

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]




--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ISO Code for Namibia ('NA')

2021-09-01 Thread Dr Eberhard Lisse

Hi,

how can I look for the ISO code for Namibia 'NA' in a list of ISO codes
which looks something like

# A tibble: 10 × 1
   location_code
   
 1 NC
[...]
10 NZ

but should look like

# A tibble: 10 × 1
   location_code
   
 1 NA
 2 NC
[...]
11 NZ

In other words 'NA' is taken for the missing value NA.

greetings, el

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Upgraded to 4.1.1 assignment operator keys not working [RESOLVED]

2021-08-30 Thread Dr Eberhard Lisse

Or using RStudio :-)-O

el

On 29/08/2021 21:37, Rich Shepard wrote:

On Sun, 29 Aug 2021, Rich Shepard wrote:


But, ... help.


Sigh. It helps to start ESS in emacs first.

Rich




--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Dr Eberhard Lisse

Thanks,

long weekend coming up :-)-O

el

On 2021-08-23 18:06 , Bert Gunter wrote:

...  and to add to Ivan's suggestions, **depending on what you are
trying to show with your grid of graphs,** you may wish to consider
using ggplot's "facet" capabilities to assure that any quantitative
variables that you are encoding in the maps (e.g. by color, density
shading, etc.)  are depicted on the same scale with appropriate
legends.  (Of course, ignore if this is not the case).  If so, you
will need a different data structure for your data, I believe.

Bert Gunter

[...]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Dr Eberhard Lisse

Thank you,

more to study :-)-O

el

On 23/08/2021 10:20, Ivan Krylov wrote:

On Mon, 23 Aug 2021 08:37:54 +0200
Dr Eberhard Lisse  wrote:


create the variables dynamically and add them to to
the grid (dynamically, ie adding more countries)


In my opinion, creating variables in the global environment
programmatically may lead to code that is hard to understand and debug
[*]. A key-value data structure (a named list or a separate
environment) would avoid the potential problems from variable name
collision. How about the following:

1. Put the countries in a vector: c('Namibia', 'Germany', ...)

2. Use lapply() to get a list of objects returned from your PICTURE
function

3. To save the pictures into individual files, loop over the list. You
can use setNames on the step 1 or 2 to make it a named list and keep
the country names together with their pictures:

for (n in names(pictures)) {

  dev.new()
  print(pictures[[n]])
  ggsave(paste0(n, '.png'), ...)
  dev.off()
}

(You can also use the png() device and plot straight to the file,
avoiding the need to draw the plot in the window for a fraction of a
second and for ggsave().)

4. Use the grobs= argument of grid.arrange() to pass the list of
objects to arrange instead of passing individual objects via ...




--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Dr Eberhard Lisse

Hi,

I have a function PICTURE() and do something like

COUNTRY = 'Namibia'
NAKURVE = PICTURE(COUNTRY)
NAKURVE
ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9)

COUNTRY = ('Germany')
DEKURVE = PICTURE(COUNTRY)
DEKURVE
ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9)

COUNTRY = ('Netherlands')
NLKURVE = PICTURE(COUNTRY)
NLKURVE
ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9)

[...]

COUNTRYGRID=grid.arrange(NAKURVE, DEKURVE, NLKURVE,
 ncol=3)
COUNTRYGRID
ggsave(paste0("R7.incidence.", Sys.Date(), ".png"), COUNTRYGRID)

I am not able to figure out (and/or find on Google) how to do this in a
loop (of sorts), ie create the variables dynamically and add them to to
the grid (dynamically, ie adding more countries)

Any ideas?

greetings, el
--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Rolling 7 day incidence

2021-08-19 Thread Dr Eberhard Lisse

Thanks,

I'll delve into this deepr, eventually :-)-O

el

On 17/08/2021 15:09, PIKAL Petr wrote:

Hi

You're wellcome. You probably know

https://www.repidemicsconsortium.org/projects/

as a collection of tools for epidemy evaluation.

Cheers
Petr

[...]
--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Rolling 7 day incidence

2021-08-17 Thread Dr Eberhard Lisse

Petr,

thank you very much, this pointed me in the right direction (to refine
my Google search :-)-O):

 library(tidyverse)
 library(coronavirus)
 library(zoo)

 as_tibble(coronavirus) %>%
 filter(country=='Namibia' & type=="confirmed") %>%
 mutate(rollsum = rollapplyr(cases, 7, sum, partial=TRUE)) %>%
 arrange(desc(date)) %>%
 mutate(R7=rollsum / 25.4 )  %>%
 select(date,R7)

gives me something like

 # A tibble: 573 × 2
 date  R7
  
  1 2021-08-16  52.8
  2 2021-08-15  56.1
  3 2021-08-14  55.6
  4 2021-08-13  63.1
  5 2021-08-12  62.8
  6 2021-08-11  63.7
  7 2021-08-10  67.3
  8 2021-08-09  69.3
  9 2021-08-08  69.2
 10 2021-08-07  74.5
 # … with 563 more rows

which seems to be correct :-)-O so I can now play with ggplot2 over the
weekend :-)-O

greetings, el

On 17/08/2021 12:46, PIKAL Petr wrote:

Hi.

There are several ways how to do it.  You could find them easily using
Google.  e.g.

https://stackoverflow.com/questions/19200841/consecutive-rolling-sums-in-a-vector-in-r

where you find several options.

Cheers
Petr

[...]


--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Rolling 7 day incidence

2021-08-17 Thread Dr Eberhard Lisse

Hi,

I am loading the coronavirus dataset everyday which looks something like:


 as_tibble(coronavirus) %>%
 filter(country=="Namibia" & type=="confirmed") %>%
 arrange(desc(date)) %>%
 print(n=10)

 # A tibble: 573 × 7
 date   province country   lat  long type  cases

  1 2021-08-16 ""   Namibia -23.0  18.5 confirmed76
  2 2021-08-15 ""   Namibia -23.0  18.5 confirmed   242
  3 2021-08-14 ""   Namibia -23.0  18.5 confirmed   130
  4 2021-08-13 ""   Namibia -23.0  18.5 confirmed   280
  5 2021-08-12 ""   Namibia -23.0  18.5 confirmed   214
  6 2021-08-11 ""   Namibia -23.0  18.5 confirmed96
  7 2021-08-10 ""   Namibia -23.0  18.5 confirmed   304
  8 2021-08-09 ""   Namibia -23.0  18.5 confirmed   160
  9 2021-08-08 ""   Namibia -23.0  18.5 confirmed   229
 10 2021-08-07 ""   Namibia -23.0  18.5 confirmed   319
 # … with 563 more rows

How do I do a rolling 7 day incidence (ie sum the cases over 7 days) but
rolling, ie from the last day to 7 (or 6?)  days before the end of the
dataset, so I get pairs of date/7-Day-Incidence?

I know it's probably re-inventing the plot as it were but I can't find
R code to do that.

I want to plot it per 10 but that I can do.

greetings, el


--
To email me replace 'nospam' with 'el'

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] checksums for R src file

2021-06-25 Thread Dr Eberhard Lisse

Peter,

have you ever though about GPG signing them, with the armor (ASCII)
files accompanying them on the server?

el



On 2021-06-24 19:43 , peter dalgaard wrote:

Yes, these are in the release announcements.  They are deliberately
not kept with the actual files due to security considerations.  The
easiest source is

https://stat.ethz.ch/pipermail/r-announce/2021/date.html

(because that mailing list doesn't contain much other than release
announcements).

- Peter D.


On 24 Jun 2021, at 17:47 , kap4lin  wrote:

When I download the file,
https://cran.r-project.org/src/base/R-4/R-4.1.0.tar.gz (or anything
similar) is there a checksum for the file I can compare it to?

Thanks
PK

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R for mac

2020-09-28 Thread Dr Eberhard Lisse
Michael,

I would propose the easiest way (and appropriate in a student setting is
via Homebrew (https://brew.sh/)

 /bin/bash -c "$(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

 brew install R
 brew cask install Rstudio

and thereafter once in a while

 brew upgrade
 brew upgrade --cask
 brew cleanup -s

and from within Rstudio

 Tools -> Check for Package Updates...
 Select All

el

On 25/09/2020 06:55, Michael Johnston wrote:
> Hi
> 
> I am club mentor for a group of high school students learning R. The Vice
> President of Information Technology is hoping to broaden and deepen her
> skill set so she can help others. She is doing well in helping students
> install R on the Windows operating system. However, a few have problems
> installing R on mac and one student is struggling to install R on
> Chromebook. Is there someone who would be willing to provide some pointers?
> 
> Thank you for considering this request,
> Michael
[...]


-- 
If you want to email me, replace nospam with el

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] filter() question

2020-08-21 Thread Dr Eberhard Lisse
Rasmus,

thank you,

I am an elderly Gynecologist, dabbling a little, ie exactly the
clientele for which the tidyverse "thingy" was developed :-)-O. 

In addition I like readable code so I later understand what I was trying
to do :-)-O

el


On 2020-08-21 16:15 , Rasmus Liland wrote:
> On 2020-08-21 13:45 +0200, Dr Eberhard Lisse wrote:
[...]
> If you want to work with tibbles in that tidyverse thing, which
> probably can more easily work with Dates, rbinding tibbles together
> apparently works:
[...]

-- 
If you want to email me, replace nospam with el




signature.asc
Description: OpenPGP digital signature
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] filter() question

2020-08-21 Thread Dr Eberhard Lisse
Eric, Rasmus,

thank you very much,

 ALLPAP  %>%
 group_by(Provider) %>%
 mutate( minDt=min(CollectionDate),
 maxDt=max(CollectionDate)) %>%
 summarize( minDt = min(minDt),
 maxDt = max(maxDt), .groups="keep" ) %>%
 ungroup() %>%
 mutate(MAX_MIN_DATE = max(minDt),
 MIN_MAX_DATE = min(maxDt)) %>%
 distinct(MAX_MIN_DATE, MIN_MAX_DATE)

gives me

 # A tibble: 1 x 2
MAX_MIN_DATE MIN_MAX_DATE
   
 1 2010-02-05   2019-08-30  

which is correct, and what I wanted.

This is so cool :-)-O

el

On 21/08/2020 11:41, Eric Berger wrote:
> Hi Eberhard,
> Here is one possibility using dplyr. 
[...]
> 
> HTH,
> Eric
> 
> 
> On Fri, Aug 21, 2020 at 12:34 PM Rasmus Liland  wrote:
>> On 2020-08-21 09:03 +0200, Dr Eberhard Lisse wrote:
[...]
>> 
>> Dear Eberhard,
>> 
>> Is each report in a csv file with those two columns, and you want to
>> unify them into a dataframe with CollectionDate along the rows, and
>> other details for each provider along the columns?  This can be done
>> with various apply calls and reshape.  Can you please subset some
>> more example data here using dput.  It makes it so much easier.
>> 
>> /Rasmus
[...]
-- 
Dr. Eberhard W. Lisse   \ /   Obstetrician & Gynaecologist 
e...@lisse.na / *  |  Telephone: +264 81 124 6733 (cell)
PO Box 8421 Bachbrecht  \  /  If this email is signed with GPG/PGP
10007, Namibia   ;/ Sect 20 of Act No. 4 of 2019 may apply

-- 
If you want to email me, replace nospam with el

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] filter() question

2020-08-21 Thread Dr Eberhard Lisse
Hi,

I have a small test sample with lab reports (PAP smears) from a number
of different providers.  These have Collection Dates and the relevant 
columns glimpse() something like this:

$ Provider"Dr C", "Dr D", "Dr C", "Dr D"
$ CollectionDate  "2016-11-03", "2016-11-02", "2016-11-03", "2016-11-03"


I am looking to find (filter) the reports which were collected in the
time period common to all providers?

Something like 

 the largest First Common CollectionDate 
and 
 the smallest Last Common CollectionDate

How would I do that? 

I can of course do this "manually", ie collect all Providers and their 
first and last Collection dates and then find the Common First and Last 
one, but wonder if there is an elegant way of doing this :-)-O



greetings, el

-- 
If you want to email me, replace nospam with el

Dr. Eberhard W. Lisse   \ /   Obstetrician & Gynaecologist
e...@lisse.na / *  |  Telephone: +264 81 124 6733 (cell)
PO Box 8421 Bachbrecht  \  /  If this email is signed with GPG/PGP
10007, Namibia   ;/ Sect 20 of Act No. 4 of 2019 may apply

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to create a readable plot in R with 10000+ values in a dataframe

2020-07-30 Thread Dr Eberhard Lisse
I always find two things helpful

1) RTFM

2) Asking myself what information do I want to convey 
   before thinking about how to do that. 

>From the below I can not understand what you want to tell 
your audience.

I don't think it's helpful trying to read 17298 names on a 
plot so maybe show the counts by region, perhaps with another 
grouping.

>From the data sample in another post, one could maybe group/count
count the host(names) and them plot it on a worldmap with a colour 
scale showing the numbers.


el

On 2020-07-23 20:11 , Ritwik Mohapatra wrote:
> How to create a readable and legible plot in R with 10k+ values.I have a
> dataframe with 17298 records.There are two columns:Machine Name(Character)
> and Region(Character).So i want to create a readable plot with region in x
> axis and machine name in y axis.How do i do that using ggplot or any other
> way.Please help.
> 
>   [[alternative HTML version deleted]]
> 


-- 
If you want to email me, replace nospam with el

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] ESTIMATION OF PANEL VAR

2017-03-20 Thread Dr Eberhard Lisse
What did

https://www.google.de/search?q=Panel+VAR+R

show?

el

On 2017-03-20 12:50 , Abhishek Kumar Rohit wrote:
> Is there any package available for estimating Panel VAR. Can the packages
> vars and palm be combined in some way to do that?
> 
> Regards,
> *Abhishek Rohit*
> Research Fellow
> IIM Raipur
> 
>   [[alternative HTML version deleted]]
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Determine IP address of gateway

2017-03-14 Thread Dr Eberhard Lisse
Hi,

I want code to run on my laptop depending on what WiFi I am connected to
(ie internally I access MySQL without password, externally with
password). Currently I look for the gateway and then branch accordingly.

Is there any way of doing

gateway = system("netstat -r -f inet -n|grep default|awk '{print $2}'",
intern = T)

within R other than running it as a system() call?

greetings, el

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Best cross-platform OSS GUI CSV management application?

2014-08-28 Thread Dr Eberhard Lisse
Put it into a SQL database, MySQL or PostgreSQL.

el

on 2014-08-28, 00:01 Grant Rettke said the following:
 Good evening,
 
 Suppose that /the business/ want to store tabular data inside of a
 file. They want manage that file using a GUI program that runs on OSX,
 Linux, and Windows.  Additionally, it needs to be OSS and *not* MS Word.
 
 Two options that immediately come to mind are [LibreOffice] and
 [OpenOffice.]
 
 The desire is that they could manage it in a format exportable to CSV so
 that `R' could use it.
 
 Specifically, they are looking for a tool that would export the data to
 a CSV format that `R' was happy with /right out of the box/.
 
 Have you found any good solutions that are similar or identical to this
 and what are they?
 
 Kind regards,
 
 
 [LibreOffice] https://www.libreoffice.org/
 
 [OpenOffice.] https://www.openoffice.org/
 
 Grant Rettke | ACM, ASA, FSF
[...]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] merge question

2014-06-29 Thread Dr Eberhard Lisse
I have two data frames like so

 qpiso
iso requests
1A1   20
2A2  199
3AD5
4AE  176
...
189  ZW   82

 qplegit
iso requests
1A2   36
2AE4
3AM2
4AO1
...
100  ZW3


I want to create another dataframe qpspam which contains all pairs
from pqiso with the values for requests of qplegit being subtracted
from those which exist in qpiso,

ie
iso requests
1A1   20
2A2  163
3AD5
4AE  172
...
189  ZW   79

but don't know how to do this, and google isn't too helpful.

As usual, a solution is preferred, but a pointer to where I can
read this up is equally appreciated :-)-O

el

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] seeking latex peace

2014-05-26 Thread Dr Eberhard Lisse
It's not a TeX issue veven, it's a Fedore issue :-)-O

pdflatex is standard in all (most) TeX distributions.

TeXLive is probably the standard TeX distribution for Linux, it has
a Windoze version and a MacTeX version (or rather two, a complete
and a basic).  I have used both on Linux and the Mac respectively
for many years.

It is upgraded every year completely and in the interval you can use
the TeX Live Manager to update packages and to install missing ones.

It is currently frozen and the new version is supposed to come out
on 2014-07-01.


That said, while some Linux package managers for some Linux
distributions are very up-to-date, most are not.

el


On 2014-05-25, 11:17 , Jim Lemon wrote:
 Hi all, I realize that this is not an R question, but in
 attempting to build a new version of a package, I have encountered
 the error:
 
 Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet =
 quiet, : pdflatex is not available
 
 As I could not find any way to install pdflatex (it didn't appear
 on a yum search), I tried a method that claimed to install
 pdflatex via a package named texlive.  Almost 300 packages later
 and minus over 300 Mb of disk space, I then got the error:
 
 ! LaTeX Error: File `zi4.sty' not found.
 
 This seems to be an updated version of the inconsolata.sty error
 that used to torment me (and after reading a lot of messages about
 this, many other people as well), so I found the file zi4.sty
 and copied it into what I thought was the appropriate directory.
 It seems to be, as I now get the error:
 
 ! LaTeX Error: File `upquote.sty' not found.
 
 At this point, I wonder if someone would be kind enough to inform
 me whether this is a potentially infinite task of finding .sty
 files, in which case I will live without them, or if there is an
 easier method of satisfying the apparently immense appetite of
 LaTeX? Thanks.
 
 R-3.1.0
 Fedora 19
 
 Jim


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] SQL vs R

2014-05-21 Thread Dr Eberhard Lisse
So,

some feedback.

Have installed MariaDB 10.0.10 on the Linux box. That speeded things up.
Changed from InnoDB/XtraDb to Aria. That speeded loading of the data up.
Have installed MariaDB on the iMac. That speeded things up more.
Tried to tune MariadDB's config. Didn't speed things up much, but for
the query buffer.
Figured out Replication (from the linux box to the iMac). This slowed
loading down somewhat.
Played with the SQL. Speeded things up significantly.
Played with the inxdexes. Did not speed things up much.
Found what I could do in data.table that was faster than SQL and did
that. Obvious increase in speed.

My R processing time came down from 35 to 6 1/2 minutes.


Removed all large tables before saving (and once the raw data was no
longer required). That reduced RData from 150MB to 7KB.

Pushed the table and image generation into a second R file. This takes 4
seconds. The corresponding LyX/LaTeX/Beamer/KnitR runs in 12 seconds.

Installed RStudio. Nice.

Adding new SQL queries adds between 30 and 90 seconds in the input R
file, next to nothing to the presentation generation.

I could not care lass how long the input takes, even hours, as long as I
can save the analysis results and not the data into the RData.

el

PS: Ordered a MacPro :-)-O. Will report back.

on 2014-05-06, 15:40 Peter Crowther said the following:
 The dataset is not large by database standards.  Even in mySQL - not known
 for its speed at multi-row querying - the queries you describe should
 complete within a few seconds on even moderately recent hardware if your
 indexes are reasonable.
 
 What are your performance criteria for processing these queries, and how
 have you / your team optimised the relational database storage?
 
 Cheers,
 
 - Peter
 --
 Peter Crowther, Director, Melandra Limited
 
 
 On 6 May 2014 15:32, Dr Eberhard Lisse e...@lisse.na wrote:
 
 Exactly,
 
 which is why I am looking for something faster :-)-O
 
 el
 
 on 2014-05-06, 15:21 David R Forrest said the following:
 It sounds as if your underlying MySQL database is too slow for your
 purposes.  Whatever you layer on top of it will be constrained by
 the underlying database.  To speed up the process significantly,
 you may need to do work on the database backend part of the
 process.

 Dave

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
   [[alternative HTML version deleted]]


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] SQL vs R

2014-05-06 Thread Dr Eberhard Lisse
Jeff

It's in MySQL, at the moment roughly 1.8 GB, if I pull it into a
dataframe it saves to 180MB. I work from the dataframe.

But, it's not only a size issue it's also a speed issue and hence I
don't care what I am going to use, as long as it is fast.

sqldf is easy to understand for me but it takes ages.  If
alternatives were roughly similar in speed I would remain with
sqldf.

dplyr sounds faster, and promising, but the intrinsic stuff is
way beyond me (elderly Gynaecologist) on the learning curve...

el

on 2014-05-06, 09:41 Jeff Newmiller said the following:
 In what format is this growing data stored?  CSV? SQL? Log
 textfile?  You say you don't want to use sqldf, but you haven't
 said what you do want to use.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] SQL vs R

2014-05-06 Thread Dr Eberhard Lisse
David,

this is quite slow :-)-O

el

on 2014-05-06, 10:55 David McPearson said the following:
[...]
 It seems like you are trying to extract a (relatively) small data set from a
 much larger SQL databaseWhy not do the SQL stiff in the database and the
 analysis *statsm graphics...) in R? Maybe use a make table query to grab the
 data of interest, and then import the whole table into R for the analysis?
 (Disclaimer: my ignorance of SQL is not far off total)
 
 HTH
 D.
[...]
-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
e...@lisse.na/ * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /
Bachbrecht, Namibia ;/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] SQL vs R

2014-05-06 Thread Dr Eberhard Lisse
Thanks,

tried all of that, too slow.

el

on 2014-05-06, 12:00 Gabor Grothendieck said the following:
 On Tue, May 6, 2014 at 5:12 AM, Dr Eberhard Lisse e...@lisse.na wrote:
 Jeff

 It's in MySQL, at the moment roughly 1.8 GB, if I pull it into a
 dataframe it saves to 180MB. I work from the dataframe.

 But, it's not only a size issue it's also a speed issue and hence
 I don't care what I am going to use, as long as it is fast.

 sqldf is easy to understand for me but it takes ages.  If
 alternatives were roughly similar in speed I would remain with
 sqldf.

 dplyr sounds faster, and promising, but the intrinsic stuff is
 way beyond me (elderly Gynaecologist) on the learning curve...
 
 You can create indices in sqldf and that can speed up processing
 substantially for certain operations.  See examples 4h and 4i on
 the sqldf home page: http://sqldf.googlecode.com.  Also note that
 sqldf supports not only the default SQLite backend but also MySQL,
 h2 and postgresql.  See ?sqldf for info on using sqldf with MySQL
 and the others.
 

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
e...@lisse.na/ * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /
Bachbrecht, Namibia ;/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] SQL vs R

2014-05-06 Thread Dr Eberhard Lisse
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Exactly,

which is why I am looking for something faster :-)-O

el

on 2014-05-06, 15:21 David R Forrest said the following:
 It sounds as if your underlying MySQL database is too slow for your
 purposes.  Whatever you layer on top of it will be constrained by
 the underlying database.  To speed up the process significantly,
 you may need to do work on the database backend part of the
 process.
 
 Dave
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQCVAwUBU2jyd1sF2hmmSQy5AQJVPQP+MnrEkXLY9PK+N2CB+maySkRKhEXcWTUA
KNOQnTDaYl3wnRZKg8y1wiZbLFA8tWsKpXPv91phDZ2000MTbv7SbnpBXthSzbAn
clEOniQqRcXci1Q2Qjd+mH0YxyA6XpNvBnBIlbxPsQbObwjK+dKl7/cna1oZKUhW
6aytsFtPZTI=
=zepY
-END PGP SIGNATURE-

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] SQL vs R

2014-05-02 Thread Dr Eberhard Lisse
Hi,

How do I do something like this without using sqldf?

a - sqldf(SELECT COUNT(*) FROM b WHERE c = 'd')

or

e - sqldf(SELECT f, COUNT(*) FROM b GROUP BY f ORDER BY f)

greetings, el

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] INET_NTOA equivalent?

2014-04-23 Thread Dr Eberhard Lisse
In MySQL

SELECT INET_ATON('127.0.0.1')

returns the integer 2130706433

Is there a function in R to reverse that, ie so that something like

ip - inet_ntoa(2130706433)

would put  '127.0.0.1' into ip?

greetings, el

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] aggregation question

2011-07-07 Thread Dr Eberhard Lisse
Hi,

I am reading payment data like so

2010-01-01,100.00
2010-01-04,100.00
...
2011-01-01,200.00
2011-01-07,100.00

and plot it aggregated per month like so

library(zoo)
df - read.csv(daily.csv, colClasses=c(d=Date,s=numeric))
z - zoo(df$s, df$d)
z.mo - aggregate(z, as.yearmon, sum)
barplot(z.mo, col=darkblue)

How do I get the monthly aggregated payments in different colors
next to each other (ie for each year in a different color with the x
axis showing the months)?

Solution preferred, but pointers to documentation welcome :-)-O

greetings, el
-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
e...@lisse.na el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Odp: aggregation question

2011-07-07 Thread Dr Eberhard Lisse
Petr,

Maybe I did not make it clear, I apologize for that:

I want January to December on the X Axis (as 12 discrete (months))
and then for each month the values for each year as bars in
different colors next to each other, ie Jan-2009, Jan-2011,
Jan-2011...Dec-2009, Dec-2011, Dec-2011 whereas at the moment I get
Jan-2009, Feb-2009, Mar-2009...Oct-2011, Nov-2011, Dec-2011

In SQL something like GROUP BY MONTH, YEAR as opposed to GROUP BY
YEAR, MONTH.

greetings, el

on 2011-07-07 11:08 Petr PIKAL said the following:
[...]
 How do I get the monthly aggregated payments in different colors
 next to each other (ie for each year in a different color with the x
 axis showing the months)?
 
 What about putting suitable set of colours to col argument?
 
 Regards
 Petr
[...]

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
e...@lisse.na el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] aggregation question

2011-07-06 Thread Dr Eberhard Lisse
Hi,

I am reading payment data like so

2010-01-01,100.00
2010-01-04,100.00
...
2011-01-01,200.00
2011-01-07,100.00

and plot it aggregated per month like so

library(zoo)
df - read.csv(daily.csv, colClasses=c(d=Date,s=numeric))
z - zoo(df$s, df$d)
z.mo - aggregate(z, as.yearmon, sum)
barplot(z.mo, col=darkblue)

How do I get the monthly aggregated payments in different colors
next to each other (ie for each year in a different color with the x
axis showing the months)?

Solution preferred, but pointers to documentation welcome :-)-O

greetings, el

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
e...@lisse.na el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] What editors can I get R in Mac OS X to talk to?

2008-10-23 Thread Dr Eberhard Lisse
AlphaX 8.0.2 of Course!!

:-)-O

el

on 10/23/08 11:08 AM baptiste auguie said the following:
 Hi,
 
 I use Textmate, but every now and then I like to try out aquamacs.
 I've just downloaded it from   http://aquamacs.org/ , where ESS is
 part of the package. It runs flawlessly for me, out of the box. I just
 opened a r file, clicked the big R icon, then simply highlighted part of
 the code and Cc-Cr to evaluate it. For some reason the default graphics
 device turned out to be x11() but that's a minor detail to configure.
 
 Baptiste
 
 (R7.2, MBP, Leopard)
-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pdf creation error

2008-10-22 Thread Dr Eberhard Lisse
Same with the Mac, in fact, Skim (and others) can be made
to notice changes and reload the PDF when necesary.


greetings, el

on 10/22/08 9:28 AM Martin Maechler said the following:
 SK == Stephan Kolassa [EMAIL PROTECTED]
 on Tue, 21 Oct 2008 21:28:09 +0200 writes:
 
 SK Hi JD, do you have the pdf open in some app, e.g.,
 SK Acrobat Reader? If the file is open, R can't write on
 SK it. My (German) errors in this case look like yours:
 
 SK Fehler in pdf(paste(pic.directory, /full_map.pdf, sep
 SK = )) : unable to start device pdf Zusätzlich: Warning
 SK message: In pdf(paste(pic.directory, /full_map.pdf,
 SK sep = )) : cannot open 'pdf' file argument
 SK 'Pictures/full_map.pdf'
 
 SK Just close the Acrobat Reader or whatever.
 
 or even better: Close your OS (MS Windows) and start using a
 better one. 
 
 E.g., on all Linux versions I know I can write to files open in
 acroread (or any ofther of the several alternatives on Linux)
 and then reload the file inside the PDF viewer.
 
 Martin Maechler, ETH Zurich

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard Lisse
gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
gpg: key E2A11821: public key Vincent Goulet
[EMAIL PROTECTED] imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:   imported: 1


on 10/22/08 3:42 PM Renaud Gaujoux said the following:
 Hi,
 I tried to install R 2.8 on Ubuntu Hardy via the Ubuntu mirroed repository.
 I tried to import the GPG key with:
 
 gpg --keyserver subkeys.pgp.net --recv-key E2A11821
 
 but get the following error:
 
 gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
 gpgkeys: key E2A11821 not found on keyserver
 gpg: no valid OpenPGP data found.
 gpg: Total number processed: 0
 
 I also tried on http://keyserver.noreply.org/ as recommended, but no key
 is found either...
 
 Anybody else gets the error?
 
 
 Thanks
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard Lisse
No, I did

gpg --keyserver subkeys.pgp.net --recv-key E2A11821


I am getting broken packages unmet dependencies, but maybe
it'll take a while for everything to propagate :-)-O


el

on 10/22/08 4:31 PM Renaud Gaujoux said the following:
 Hi,
 
 well... that is what I would like to see indeed. :(
 But I keep getting my error, what's bothering me is that the web-based
 tools also does not find the key...
 Did you also try on http://keyserver.noreply.org/?
 
 thanks
 
 
 Dr Eberhard Lisse wrote:
 gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
 gpg: key E2A11821: public key Vincent Goulet
 [EMAIL PROTECTED] imported
 gpg: no ultimately trusted keys found
 gpg: Total number processed: 1
 gpg:   imported: 1


 on 10/22/08 3:42 PM Renaud Gaujoux said the following:
  
 Hi,
 I tried to install R 2.8 on Ubuntu Hardy via the Ubuntu mirroed
 repository.
 I tried to import the GPG key with:

 gpg --keyserver subkeys.pgp.net --recv-key E2A11821

 but get the following error:

 gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
 gpgkeys: key E2A11821 not found on keyserver
 gpg: no valid OpenPGP data found.
 gpg: Total number processed: 0

 I also tried on http://keyserver.noreply.org/ as recommended, but no key
 is found either...

 Anybody else gets the error?


 Thanks

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 

   
 

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and computer heat

2008-10-07 Thread Dr Eberhard Lisse
Why don't you hack a little script that looks at system load,
temperature and date/time and writes it somewhere. Then
you can load it into R and plot it nicely :-))-O

Even compare it witht he desktop :-)-O

el

on 10/7/08 12:21 PM Alexandre Aguiar said the following:
 Hi,
 
 I noticed the temperature of my laptop rises sharply during execution of a 
 long R script that generates several hundred plots, all of them saved to 
 files. No screen output. Temps reached above 90 Celsius degrees in the box 
 and above 80 C deg in the processor. The machine turns on cooler at maximum 
 speed and exhaled air is really hot. Tried similar operations (batch 
 graphic and music format conversion) and temp rises were usual.
 
 System: laptop, Turion 64, Kubuntu Linux, Xorg X server 1.4.0.90, KDE 3.5.9, 
 R 2.7.2 compiled with MBCS, PCRE, etc.
 
 Could it be fake due to an interaction of some R piece with system monitors?
 
 Alexandre
 
 
 
 
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Dream of a wiki GUI for R

2008-09-29 Thread Dr Eberhard Lisse
That's not the catch, the catch is that there is no editorial
control (for the lack of a better word) or quality control,
which allows every nincompoop to write authoritative knols
as evidenced on the web site. I am also quite sure that they
place and check cookies to increase their knowledge about users,
like they do with all their other web sites and chrome. (Not
that it bothers me much, personally...)

In any case, your elderly gynaecologist would like to be able to
look up the answers to fundamental before bothering the experts...

greetings, el


on 9/29/08 9:50 AM Ajay ohri said the following:

 However  wikis are a bit outdated. The latest is knol.google.com as it gives
 you the right to make document editable, or allow comments, or even what
 kind of license you want content to be shared. The catch again is its owned
 by Google , the big company.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R on a eeepc 901 ?

2008-09-17 Thread Dr Eberhard Lisse
Agustin,

which EEE PC 901 is it? The one for Windoze or Linux (Xandros)?

el

on 9/16/08 6:50 PM Agustin Lobo said the following:
 Hi!
 
 it seems that the directions in
 http://wiki.r-project.org/rwiki/doku.php?id=getting-started:installation:eeepc
 
 
 refer to installing R on a eeepc 701 and actually
 fail for a 901 at the first step.
 
 Does anyone have any experience on installing R on a eeepc 901?
 
 Thanks
 

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Hardwarefor R cpu 64 vs 32, dual vs quad

2008-09-10 Thread Dr Eberhard Lisse
Nic,

I'd buy a Mac Power server.

Not that's much faster, but while one of the cores toils away
at R you can play games on the others :-)-O

el

on 9/9/08 8:54 PM Henrik Bengtsson said the following:
 On Tue, Sep 9, 2008 at 6:31 AM, Nic Larson [EMAIL PROTECTED] wrote:
 Need to buy fast computer for running R on. Today we use 2,8 MHz intel D cpu
 and the calculations takes around 15 days. Is it possible to get the same
 calculations down to minutes/hours by only changing the hardware?
 Should I go for an really fast dual 32 bit cpu and run R over linux or xp or
 go for an quad core / 64 bit cpu?
 Is it effective to run R on 64 bit (and problem free
 (running/installing))???
 Have around 2000-3000 euro to spend
 
 Faster machines won't do that much.  Without knowing what methods and
 algorithms you are running, I bet you a beer that it can be made twice
 as fast by just optimizing the code.  My claim applies recursively.
 In other words, by optimizing the algorithms/code you can speed up
 things quite a bit.  From experience, it is not unlikely to find
 bottlenecks in generic algorithms that can be made 10-100 times
 faster.  Here is *one* example illustrating that even when you think
 the code is fully optimized you can still squeeze out more:
 
   http://wiki.r-project.org/rwiki/doku.php?id=tips:programming:code_optim2
 
 So, start profiling your code to narrow down the parts that takes most
 of the CPU time.  help(Rprof) is a start.  There is also a Section
 'Profiling R code for speed' in 'Writing R Extensions'.  Good old
 verbose print out of system.time() also helps.
 
 My $.02 ...or 2000-3000USD if it was bounty?! ;)
 
 /Henrik
 
 Thanx for any tip

[[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Compiling date

2008-09-09 Thread Dr Eberhard Lisse
Why not Format - Cell in Excell?

el

on 9/9/08 1:03 PM Henrique Dallazuanna said the following:
 Try this:
 
 strptime(x, ifelse(nchar(x) == 8, '%d/%m/%y', '%d/%m/%Y'))
 
 On Tue, Sep 9, 2008 at 3:48 AM, Megh Dal [EMAIL PROTECTED] wrote:
 
 Hi,

 I have following kind of dataset (all are dates) in my Excel sheet.

 09/08/08
 09/05/08
 09/04/08
 09/02/08
 09/01/08
 29/08/2008
 28/08/2008
 27/08/2008
 26/08/2008
 25/08/2008
 22/08/2008
 21/08/2008
 20/08/2008
 18/08/2008
 14/08/2008
 13/08/2008
 08/12/08
 08/11/08
 08/08/08
 08/07/08

 However I want to use R to compile those data to make all dates in same
 format. Can anyone please tell me any automated way for doing that?

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to preserve date format while aggregating

2008-09-08 Thread Dr Eberhard Lisse
Erich,

how does the data look, when it comes from SQL?

And why not extract the data with SQL directly, so you don't
have this issue in the first place?

el

on 9/8/08 3:15 PM Erich Studerus said the following:
 Thanks, I've already tried that. The problem is, that the original date is
 not restored when I change the numeric back to date. I get a totally
 different date.
 Maybe it has something to do with the original date format. My data are
 directly imported from a SQL-database. The date column to which I want to
 apply the aggregate function has the two classes POSIXt and POSIXct.
 Changing the column to class Date before applying the aggregate function
 did not help. I still get a different date, when I transform it back to
 class Date.
 I would be glad, if someone knew a more elegant way to extract the rows with
 minimum/earliest date per subject. 
 
 
 Erich
 
 
 -Ursprüngliche Nachricht-
 Von: jim holtman [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 8. September 2008 14:24
 An: Erich Studerus
 Cc: r-help@r-project.org
 Betreff: Re: [R] How to preserve date format while aggregating
 
 Try changing the 'class' of the numeric result back to Date:
 
 x - as.Date('2008-09-08')
 x
 [1] 2008-09-08
 y - as.numeric(x)
 y
 [1] 14130
 str(y)
  num 14130
 class(y) - Date
 y
 [1] 2008-09-08
 str(y)
 Class 'Date'  num 14130
 
 
 On Mon, Sep 8, 2008 at 6:38 AM, Erich Studerus
 [EMAIL PROTECTED] wrote:
 Hi

 I have a dataframe in which some subjects appear in more than one row. I
 want to extract the subject-rows which have the minimum date per subject.
 I
 tried the following aggregate function.

 attach(dataframe.xy)

 aggregate(Date,list(SubjectID),min)

 Unfortunately, the format of the Date-column changes to numeric, when I'm
 applying this function. How can I preserve the date format?

 Thanks

 Erich

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
 
 

-- 
Dr. Eberhard W. Lisse  \/ Obstetrician  Gynaecologist (Saar)
[EMAIL PROTECTED] el108-ARIN / * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /   Please do NOT email to this address
Bachbrecht, Namibia ;/if it is DNS related in ANY way

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.