Displaying 20 results from an estimated 4000 matches similar to: "changing langage [SOLVED]"
2011 May 04
1
issue with "strange" characters (locale settings)
WinXP-x32, R-21.13.0
Dear list,
I have a problem that (I think) relates to the interaction between Windows
and R.
I am trying to scrape a table with data on the Hawai'ian Islands, This is my
code:
library(XML)
u <- "http://en.wikipedia.org/wiki/Hawaii"
tables <- readHTMLTable(u)
Islands <- tables[[5]]
The output is (first set of columns):
2011 May 05
1
issue with "strange" characters (readHTMLTable)
Thank you. The line of code you give certainly resolves several of the
issues.
I didn't realize that font support is such a tough matter to realize. Let me
express my gratitude to those who provide this for us in R.
On 04-05-11, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
Oh, please!
This is about the contributed package XML, not R and not Windows.
Some of
2012 Jan 12
2
is there an equivalent for #ifdef (C langage) in R
Hi,
I'd like to know if there is an equivalent for #ifdef (Clangage) in R. I 'd
like to do something like:
useDebug = defmacro(DEBUG, expr=(DEBUG==1))
if(useDebug(0)){
#Here I do not use debug mode
make_addition = function(a, b) {
c=a+b
plot(c)
return(c)
}
}else{
#here I use debug mode
c=a+b
}
I assume this would work... The problem is :
if
2007 Apr 05
1
issue with pdf(paper="a4") in 2.5.0 alpha
In the latest windows binary (2007-04-03 r41023) pdf() with an argument paper="a4" gives an error, this was still ok in (2007-03-18 r40854)
Jan Oosting
> pdf("test.pdf",paper="a4")
Error in pdf("test.pdf", paper = "a4") : invalid paper type 'a4' (pdf)
> sessionInfo()
R version 2.5.0 alpha (2007-04-03 r41023)
i386-pc-mingw32
2007 Aug 27
1
use apply function with which
Dear R-users,
For a data frame (say in this example X) I want to look up the
corresponding value in a 'look-up data frame' (in this example Y). The
for-loop works but is very time-consuming because 'X' in reality is very
big.
Therefore I would like to have a solution with apply. However, I do not
succeed. Any suggestions?
Thanks in advance,
Hanneke
2006 Sep 11
1
S4 Method dispatch in recent 2.4.0alpha
I use 2 packages that both implement a S4 plot method, where one package
depends on the other (the bioconductor package globaltest which depends
on multtest). When the plot method is used from within the package, it
seems the default plot method is used, and an error is generated. When
the method is invoked from the console, the plot is created correctly. I
have reproduced this with 2 small
2012 Apr 23
0
Different results for sparse and dense version of model matrix using contrasts and interactions
Dear all,
I've been getting different results from the sparse and dense version
of model.Matrix when used with sparse contrasts and interactions
between factors. The same happens when using model.matrix and
sparse.model.matrix. When calculating list.contrasts I get the same
results for sparse and dense contrasts (except the type of the matrix
is different of course). However, when I use these
2007 Apr 16
1
langage R
bonjour,
je vous écris pour savoir si vous aviez trouver réponse pour l'écriture du test de Newman & Keuls sous R car j'en ai aussi besoin
merci encore
cordialement.
---------------------------------
[[alternative HTML version deleted]]
2007 Apr 16
0
Multiple comparisons: was Re: langage R
See library(multcomp) and
?glht
?contrMat
for several procedures for multiple comparisons.
The Newman Keuls test is not on the list. The related Tukey method
is on the list.
2013 Jun 02
2
Conversión de objeto temporal (TS) a matriz (o data.frame)
Hola a todos:
La pregunta ha quedado clara en el asunto, pero: ¿existe alguna función
que convierta un objeto temporal (TS) a matriz o data.frame?
En algunos cálculos que estoy haciendo me viene bien convertir un objeto
temporal a matriz para poder hacer cálculos parciales por meses o años
(aplicando apply en la matriz) pero no he encontrado ninguna función que
haga la conversión.
He
2013 Jun 02
0
Conversión de objeto temporal (TS) a matriz (o data.frame)
Estimado Rubén Gómez Antolí
En mi caso en particular al trabajar con fechas, me encontré con
inconvenientes, algunos de ellos fueron mejorados en R, hoy estoy
desactualizado, pero creo que en el siguiente lugar
http://cran.r-project.org/web/views/TimeSeries.html hay referencia
actualizada, esperando que en esta encuentre lo que necesite lo saludo muy
atentamente.
Javier Marcuzzi
2003 Nov 25
0
AW: ISOdate() and strptime()
Thanks for this clarification.
I have learned in the meantime that it is necessary to be very careful when
using all these POSIX things.
As another example, here is something that made me scratch my head just
yesterday:
When I create a sequence of days that happens to start before and ends in
daylight savings time, I seem to lose a day:
> seq(from = strptime("20030329",
2007 Mar 22
2
difftime / RBloomberg
hi,
I've troubles with some difftime objects. e.g.
ISOdate(2001, 4, 26) - ISOdate(2001, 2, 26) - 2
works, telling me "Time difference of 57 days". But when I'd like to add
days, such as
ISOdate(2001, 4, 26) - ISOdate(2001, 2, 26) + 2
the function gives me an error. Function "as.COMDate.chron" of the
Rbloomberg package doesn't work for that reason.
I'm
2003 Nov 14
5
ISOdate() and strptime()
Dear R-people!
I am using R 1.8.0, under Windows XP.
While using ISOdate() and strptime(), I noticed the following behaviour when
"wrong" arguments (e.g., months>12) are given to these functions:
> ISOdate(year=2003,month=2,day=20) #ok
[1] "2003-02-20 13:00:00 Westeurop?ische Normalzeit"
> ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value
[1]
2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create
objects of class AsIs:
> I("a")
[1] "a"
attr(,"class")
[1] "AsIs" "character"
> I(4)
[1] 4
attr(,"class")
[1] "AsIs" "numeric"
> I(4 + 0i)
[1] 4+0i
attr(,"class")
[1] "AsIs" "complex"
>
This
2018 Jan 22
0
Manipulating two large dataset differing by date and time
Hi Ogbos,
You can just use ISOdate. If you pass more values, it will process them:
ISOdate(2018,01,22)
[1] "2018-01-22 12:00:00 GMT"
> ISOdate(2018,01,22,18,17)
[1] "2018-01-22 18:17:00 GMT"
Add something like:
if(is.null(data$hour),data$hour<-12
then pass data$hour as it will default to the same value as if you
hadn't passed it.
Jim
On Mon, Jan 22, 2018 at 6:01
2007 Apr 10
1
CRAN packages maintained by you
On Sat, 2007-04-07 at 08:40 +0200, Kurt Hornik wrote:
> Dear maintainers of CRAN packages,
>
> This concerns the packages
<snip />
>
> And now keep the updates rolling in ...
Dear R Developers,
I was recently emailed by the CRAN maintainers about warnings for my two
packages, analog and cocorresp, that are on CRAN.
I have built both packages (the versions on CRAN plus
2013 Jun 02
2
Conversión de objeto temporal (TS) a matriz (o data.frame)
Hola,
Si no te entiendo mal, necesitas la conversión a matriz como paso
intermedio para agregar por meses (o cualquier unidad temporal). Si es
así, te aconsejo que uses el paquete zoo y el método aggregate para la
clase zoo.
Por ejemplo:
library(zoo)
dats <- data.frame(date=seq(as.Date('2012-01-01'), by='day', length=3*365),
A=rnorm(3*365),
2002 Mar 08
1
1st January isn't (PR#1370)
In today's pre1.5.0
> ISOdate(2002,1,1)
[1] "2002-03-01 04:00:00 PST"
> ISOdate(2002,1,1)==ISOdate(2002,3,1)
[1] TRUE
It doesn't seem to happen for days other than 1/1
-thomas
> version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status Under development (unstable)
major 1
minor 5.0
year 2002
month
2007 May 10
3
Getting the last day of the month.
Hi,
Given a date, how do I get the last date of that month? I have
data in the form YYYYMM, that I've read as a date using
> x$Date <-
as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1))
But this gives the first day of the month. To get the last day of the
month, I tried
> as.Date(as.yearmon(x$Date,frac=0))
But I don't get the last day of the month here. (Tried