You forgot the 'at a minimum' information required by the posting
guide.
Most likely this is a limitation of the locale you used (and failed to
tell us about) on the OS you used (...).
On Sat, 16 Jul 2011, Sverre Stausland wrote:
Dear helpers,
I'm trying to replace a character with a unico
On 16/07/11, David Winsemius (dwinsem...@comcast.net) wrote:
> From: David Winsemius
> On Jul 16, 2011, at 12:15 PM, Rory Campbell-Lange wrote:
> >On 16/07/11, David Winsemius (dwinsem...@comcast.net) wrote:
> >>On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote:
> >>
> >>>I'm an R beginner,
I am estimating Value at Risk using PerfomanceAnalytics package. The variables
are stored in a data frame. I formated the data variables using zoo() and
as.xtx() but it is not working. The working example is below.
##
reguire(zoo)
require(P
Don't know the answer to you first question, but for the \\ see below.
On Sat, Jul 16, 2011 at 7:19 PM, Sverre Stausland
wrote:
> Unrelated to that problem, but related to gsub() is that I can't find
> a way for gsub() to interpret the backslash as a character. In regular
> expression, \\ should
You need to specify the origin:
as.Date(730456, origin = "matlabs origin date")
HTH,
Josh
P.S. Alternately, you may be able to do something like:
## find R's numeric representation of 02-Dec-1999 and use the
difference from Matlabs to offset
MatLabROffset <- 730456 - as.numeric(as.Date("1999-1
Hello
I am new to R and I need to convert some dates (numeric format by matlab) to
actual dates in R.
For instance,
Matlab -> 730456 -> >> datestr(730456)
ans =
02-Dec-1999
R -
> library(zoo)
> as.Date(730456)
[1] "3969-12-03"
I don't not mind the output format but it needs to be right.
To put a backslash in the replacement expression
of sub or gsub (when fixed=FALSE) use 4 backslashes.
The rationale is that the replacement expression
backslash-digit means to use the digit'th parenthesized
subpattern as the replacement and backslash-backslash means
to put in a literal backslash.
Dear helpers,
I'm trying to replace a character with a unicode code inside a data
frame using gsub(), but unsuccessfully.
> data.frame(animals=c("dog","wolf","cat"))->my.data
> gsub("o","\u0254",my.data$animals)->my.data$animals
> my.data$animals
[1] "dɔg" "wɔlf" "cat"
It's not that a data fr
Is this what you want (using 'ave'):
> set.seed(1)
> f1 <- gl(2, 1, 10, labels=c("M", "F"))
> f2 <- gl(2, 2, 10, labels=c("H", "L"))
> x <- rnorm(10)
> d <- data.frame(f1, f2, x)
> g <- interaction(f1, f2)
> tapply(x, g, mean)
M.HF.HM.LF.L
0.0929451 -0.3140711 -0.17
Kind of hard to figure out the problem without a reproducible test case. Hint:
see the posting guide.
---
Jeff Newmiller The . . Go Live...
DCN: Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research E
Hi,
suppose we have a data in data.frame like a:
data
id q1 q2 q3 c
1 1 0 0 1 a
2 2 0 0 1 b
3 3 1 0 0 b
4 4 0 1 0 a
I need from this data receive cross validation table like a
a b <-- classified as
2 0 | a = a
1 1 | b = b
Plus i need have information about 'id' i.e I ne
Hi there dear R users!
Anyone knows why does matchit function returns error whenever the "hull" option
is used (either "hull.both", "hull.control" or "hull.treat"). Things work well
with all the rest of discard options.
This is the error msg.
>m.out.base <- matchit(formula=f, data=d, method=m,
On Jul 16, 2011, at 14:17 , Jochen1980 wrote:
> Hi,
>
> I am using ecdf-function and want to use the ecdf()-data-points for nls() as
> data-parameter.
> nls() expects 'list' or 'environment' as a data-type, knots(ecdf(mydata))
> gives me 'numeric'.
> What should I do now?
Consider using fitdist
Hi,
You could try grid.colorstrip() from the gridExtra package,
grid.colorstrip(ifelse(dat, "blue", "red"))
or grid.raster(), which should be more efficient,
grid.raster(matrix(ifelse(dat, "blue", "red")), interp=FALSE,
width=unit(1,"npc"), height=unit(1,"npc"))
HTH,
baptiste
On 15 July 201
On 11-07-16 4:08 PM, Duncan Murdoch wrote:
On 11-07-16 2:33 PM, BXC (Bendix Carstensen) wrote:
I run Windows XP.
and in a command window I get:
c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave Lexis.rnw
Error in length(arg) : 'arg' is missing
Calls:
Execution halted
AND:
c:\stat\r\R-2.13.1\bin\i38
Thanks a lot! I did not save the "200ms". I did exactly what you
described, since that is the only way to go. So I ended up with
restarting R hundreds of times a day.
Regards,
Yihui
--
Yihui Xie
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedec
On Jul 16, 2011, at 4:08 PM, Lars Bishop wrote:
Dear List,
I'd appreciate you guidance for obtaining the desired result shown
below, by combining tapply(x, g, mean) and g in the example.
Basically, I'm trying to create a vector whose values are based on the
result from tapply(x, g, mean) but
Dear List,
I'd appreciate you guidance for obtaining the desired result shown
below, by combining tapply(x, g, mean) and g in the example.
Basically, I'm trying to create a vector whose values are based on the
result from tapply(x, g, mean) but that follow the pattern and length
given by the fac
On 11-07-16 2:33 PM, BXC (Bendix Carstensen) wrote:
I run Windows XP.
and in a command window I get:
c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave Lexis.rnw
Error in length(arg) : 'arg' is missing
Calls:
Execution halted
AND:
c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave --help
Error in length(arg) :
Hi,
In your loop, change Corrs[i] to Corrs[i,]
Weidong Gu
On Sat, Jul 16, 2011 at 12:02 PM, EdBo wrote:
>> t
> Hi
>
> I have to matrices t and y below. I want correlation of columns (a,d) (b,e)
> and (c,f). The correlation should be for the first 3 rows of matrix t
> against matrix y; and the
Hi all,
Can anyone please help me in using the openNLP package for doing named-
entity extraction?
Regards,
Som
__
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/p
Writing to R-sig-geo would have been a good idea if you required speedier
response. That response would have suggested that your code is not at all
helpful, not using available classes in R for handling spatial data. You
could have read your Arc GRID into a SpatialGridDataFrame, and made
everything
On 16.07.2011 20:17, Hadley Wickham wrote:
Thank you, this is very helpful. One final question regarding this method:
suppose a function prints multiple plots, i.e. multiple pages to a PDF. Is
it possible to record all of these plots at once? The code below only
records the final plot. I would
I run Windows XP.
and in a command window I get:
> c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave Lexis.rnw
Error in length(arg) : 'arg' is missing
Calls:
Execution halted
AND:
> c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave --help
Error in length(arg) : 'arg' is missing
Calls:
Execution halted
BUT:
> c
Hi Nacho,
You should look grid.rect or grid.polygon function from "grid" library.
I attach you an example, you can play with this:
dat <- c(0,0,0,0,1,1,1,0,0,1)
colour=ifelse(dat == 0, "red", "blue")
library(grid)
library(foreach)
grid.newpage()
vp1 <- grid.layout(nrow = 1, ncol = 1,
>> Thank you, this is very helpful. One final question regarding this method:
>> suppose a function prints multiple plots, i.e. multiple pages to a PDF. Is
>> it possible to record all of these plots at once? The code below only
>> records the final plot. I would like to record all of them, without
Hi "e",
Here is a simple function to use the attributes from one scaled object
to scale another.
x = data.frame(a=1:10,b=11:20)
y = data.frame(a=2:11,b=12:21)
s <- scale(x)
## function to scale x using attributes from trained
scale2 <- function(x, trained) {
x <- as.matrix(x)
x <- sweep(x,
On 16.07.2011 20:01, Thomthom wrote:
Thanks everyone!
This is exactly what I needed! My graphs look perfect now thanks to you
guys! :)
Thanks so much! I've spent hours on this...
Last question though: do I need to edit my post and signal it as a "solved"
topic (I saw that on other forums...
Thanks everyone!
This is exactly what I needed! My graphs look perfect now thanks to you
guys! :)
Thanks so much! I've spent hours on this...
Last question though: do I need to edit my post and signal it as a "solved"
topic (I saw that on other forums... and I have to admit I am not really
famil
NEVER, ever, post a question on a new topic in an existing thread - see the
posting guide; you pollute the archive, and harm yourself by having your
question "disappear". For conversion of SpatialPolygons* objects to read
into WinBUGS, see ?sp2WB in the maptools package. Your question is more
appro
From: David Winsemius
On Jul 16, 2011, at 12:15 PM, Rory Campbell-Lange wrote:
On 16/07/11, David Winsemius (dwinsem...@comcast.net) wrote:
On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote:
I'm an R beginner, and I would like to construct a set of boxplots
showing database functi
The Java error when attempting to use the stemmers in the Snowball or
tm packages on Windows machines is caused by Quicktime. See prior
posts in this thread.
The workaround is to uninstall Quicktime.
After much trial and error on machines spanning WinXP/2k/Vista/7, I
finally verified this as foll
On 16.07.2011 19:10, David Winsemius wrote:
On Jul 16, 2011, at 12:09 PM, Thomthom wrote:
Hi everyone!
I tried to look up in the previous topics whether there was something
similar to my question but I think there's nothing corresponding...
Anyway! Here is my problem:
I have a plot (qplot
On Sat, Jul 16, 2011 at 10:10 AM, David Winsemius
wrote:
>
> On Jul 16, 2011, at 12:09 PM, Thomthom wrote:
>
>> Hi everyone!
>>
>> I tried to look up in the previous topics whether there was something
>> similar to my question but I think there's nothing corresponding...
>>
>> Anyway! Here is my p
On 16.07.2011 13:42, Jeroen Ooms wrote:
That warning is necessarily rather pessimistic. We haven't changed the
format for several years. But we might, without notice.
Thank you, this is very helpful. One final question regarding this method:
suppose a function prints multiple plots, i.e.
On Jul 16, 2011, at 12:09 PM, Thomthom wrote:
Hi everyone!
I tried to look up in the previous topics whether there was something
similar to my question but I think there's nothing corresponding...
Anyway! Here is my problem:
I have a plot (qplot()) in which I want to insert axis labels with
> Also, if we make days a list, the class attributes are kept when looping
> over the list, ie.
>
> days<- list( as.Date( c("2000-01-01", "2000-01-02") ) )
Do you realise that that's a list with length one?
I suspect you want
days <- as.list( as.Date( c("2000-01-01", "2000-01-02") ) )
for (day i
Hi everyone!
I tried to look up in the previous topics whether there was something
similar to my question but I think there's nothing corresponding...
Anyway! Here is my problem:
I have a plot (qplot()) in which I want to insert axis labels with the
following text:
kg NH4+ N-equiv. * ha-1 yr-1
> t
Hi
I have to matrices t and y below. I want correlation of columns (a,d) (b,e)
and (c,f). The correlation should be for the first 3 rows of matrix t
against matrix y; and then the last 3 i.e a loop function.
I have a code I created below but its giving me an error, surprisingly the
the indiv
On 16/07/11, David Winsemius (dwinsem...@comcast.net) wrote:
>
> On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote:
>
> >I'm an R beginner, and I would like to construct a set of boxplots
> >showing database function runtimes.
> >I can easily reformat the base data to provide it to R in a
On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote:
I'm an R beginner, and I would like to construct a set of boxplots
showing database function runtimes.
The data I have is currently is in the following format:
function1,12.5,13.11,35.2,11.1.n
function2,21.5,42.22,17.3,14.2...
I'm an R beginner, and I would like to construct a set of boxplots
showing database function runtimes.
The data I have is currently is in the following format:
function1,12.5,13.11,35.2,11.1.n
function2,21.5,42.22,17.3,14.2n
...
this is the function name fo
The question is how to plot a bar chart in which bars are sorted in
ascending order for each level of X. I would appreciate receiving your
advice and help.
This toy example might help:
barlab <- sample(LETTERS,10)
values <- sample(1:100, 10)
op <- par(mfrow= c(4,1))
barplot(values, names.arg
On Jul 16, 2011, at 10:21 AM, B Jessop wrote:
Dear Help-list, I have a dataframe containing 6 variables, 4 of
which are factors, 2 numeric. I want to create another factor
variable (SitePos) by combining 2 existing factors (Site and
Position). I have tried a number of approaches based on
Dear R users,
I am currently using the locpoly function from the KernSmooth package to
estimate densities. However, I have some trouble understanding how this
estimation technique is implemented in R. My main concern comes from the fact
that this function gives negative estimates when the band
Dear Help-list, I have a dataframe containing 6 variables, 4 of which are
factors, 2 numeric. I want to create another factor variable (SitePos) by
combining 2 existing factors (Site and Position). I have tried a number of
approaches based on trolling the R FAQs, various R webpages, etc.,
On Jul 16, 2011, at 9:55 AM, Thomas Chesney wrote:
I know there's a really easy way to do this but I just can't track
it down. I experimented with various apply functions but couldn't
get it quite right.
I have a matrix like this:
1, 16
1, 23
1, 21
1, 6
1, 25
2, 4
2, 17
2, 45
2, 11
2, 20
I know there's a really easy way to do this but I just can't track it down. I
experimented with various apply functions but couldn't get it quite right.
I have a matrix like this:
1, 16
1, 23
1, 21
1, 6
1, 25
2, 4
2, 17
2, 45
2, 11
2, 20
and I'd like to find the max value in Column 2 (or the in
On Jul 16, 2011, at 8:17 AM, Jochen1980 wrote:
Hi,
I am using ecdf-function and want to use the ecdf()-data-points for
nls() as
data-parameter.
nls() expects 'list' or 'environment' as a data-type,
knots(ecdf(mydata))
gives me 'numeric'.
If you put them into 'df' with appropriate name
On Jul 16, 2011, at 3:20 AM, Bogdan Lataianu wrote:
I want to see all
?print
str(demo1);
'data.frame': 24 obs. of 4 variables:
$ id : int 1 1 1 2 2 2 3 3 3 4 ...
$ group: int 1 1 1 1 1 1 1 1 1 1 ...
$ pulse: int 10 10 10 10 10 10 10 10 10 10 ...
$ time : int 1 2 3 1 2 3 1 2 3 1 .
On Jul 16, 2011, at 4:08 AM, E- Cognium wrote:
Hi Everyone,
I would like to scale a data frame and then using the same scaling
parameters scale on another data frame. This will be helpful in
scaling the
test dataset based on train dataset's scaling parameters. I couldn't
find
any utility f
Hi,
I am using ecdf-function and want to use the ecdf()-data-points for nls() as
data-parameter.
nls() expects 'list' or 'environment' as a data-type, knots(ecdf(mydata))
gives me 'numeric'.
What should I do now?
Thanks in advance - Jochen
Here is the code:
##
djmuseR wrote:
>
> Hi:
>
> To take this idea a step further,
>
> colSums(apply(unique(A), 1, function(x) apply(A, 1, function(y)
> identical(x, y
> [1] 10 5 5
>
> However, Denis' solution is a bit faster because fewer evaluations are
> required:
>
>> system.time(replicate(1000,
> + colS
Hi:
To take this idea a step further,
colSums(apply(unique(A), 1, function(x) apply(A, 1, function(y)
identical(x, y
[1] 10 5 5
However, Denis' solution is a bit faster because fewer evaluations are required:
> system.time(replicate(1000,
+ colSums(apply(unique(A), 1, function(x) apply(A,
On Sat, 16 Jul 2011, Dimitris.Kapetanakis wrote:
Dear all,
Is there a way to estimate a constrained binary logit model (logistic
regression). For example if I have
y~x1 x2 x3 to restrict the constant to be constant=0 and the coefficient of
x1 beta1=1?
glm(y ~ 0 + x2 + x3, offset = x1, family
>
> That warning is necessarily rather pessimistic. We haven't changed the
> format for several years. But we might, without notice.
>
Thank you, this is very helpful. One final question regarding this method:
suppose a function prints multiple plots, i.e. multiple pages to a PDF. Is
it possible
No, you do not need to install anything except the SQLDF package. I've used
it to do joins on Rdataframe. It worked well for me.
--
View this message in context:
http://r.789695.n4.nabble.com/Querying-RData-Files-SQL-style-tp3670111p3671686.html
Sent from the R help mailing list archive at Nabble
Dear all,
Is there a way to estimate a constrained binary logit model (logistic
regression). For example if I have
y~x1 x2 x3 to restrict the constant to be constant=0 and the coefficient of
x1 beta1=1?
Thank you
Dimitris
--
View this message in context:
http://r.789695.n4.nabble.com/constra
Sebastian Lerch wrote:
>
> Hi everyone,
>
> my question might be very trivial, but I could not come up with an
> answer...
>
> I want to find out how often a matrix contains a certain vector as row:
>
> x1<-c(1,2,3)
> x2<-c(1,5,6)
> x3<-c(7,8,9)
> A<-matrix(c(rep(x1,5),rep(x2,5),rep(x3,5),rep(
Hi Everyone,
I would like to scale a data frame and then using the same scaling
parameters scale on another data frame. This will be helpful in scaling the
test dataset based on train dataset's scaling parameters. I couldn't find
any utility functions that do this. Any suggestions on how to approa
I want to see all
str(demo1);
'data.frame': 24 obs. of 4 variables:
$ id : int 1 1 1 2 2 2 3 3 3 4 ...
$ group: int 1 1 1 1 1 1 1 1 1 1 ...
$ pulse: int 10 10 10 10 10 10 10 10 10 10 ...
$ time : int 1 2 3 1 2 3 1 2 3 1 ...
summary(demo2bis);
id.group.pulse.time
1
Hi
a bit ugly approach
but it works
x1<-c(1,2,3)
x2<-c(1,5,6)
x3<-c(7,8,9)
A<-matrix(c(rep(x1,5),rep(x2,5),rep(x3,5),rep(x1,5)),nrow=20,ncol=3,byrow=T)
A
B <- apply(A,1, FUN = function(x)paste(x, collapse = ''))
table(B)
On 16.07.2011 12:29, Sebastian Lerch wrote:
Hi everyone,
my question mi
Duncan,
thanks very much -- this explains the behaviour.
Also, if we make days a list, the class attributes are kept when looping
over the list, ie.
days<- list( as.Date( c("2000-01-01", "2000-01-02") ) )
for (day in days) {
# class(day) <- class(days)
print(as.POSIXct(day))
}
works as expect
Hi everyone,
my question might be very trivial, but I could not come up with an answer...
I want to find out how often a matrix contains a certain vector as row:
x1<-c(1,2,3)
x2<-c(1,5,6)
x3<-c(7,8,9)
A<-matrix(c(rep(x1,5),rep(x2,5),rep(x3,5),rep(x1,5)),nrow=20,ncol=3,byrow=T)
How can I find o
This is by design, *if* you have already used the help in the package.
The help database is cached.
I simply don't see you why you believe that you need to save the 200ms
it takes to start R: you can view the new documentation in a different
R instance.
On Sat, 16 Jul 2011, Rolf Turner wrote
On Sat, Jul 16, 2011 at 12:05 AM, Rolf Turner wrote:
> (1) Why on earth should the n - 1 divisor be a problem? This divisor
> yields an unbiased estimator of sigma^2. Generally speaking,
> unbiasedness is a Good Thing.
Yes, it is an unbiased estimator of sigma^2 for a sample. My response
was p
On 16/07/11 17:49, Joshua Wiley wrote:
Hi,
The Z is basically:
(mean(x) - mean(y))/sqrt(var(x)/length(x) + var(y)/length(y))
and pnorm will give you a p-value, if you desire it.
If the n - 1 divisior used in var() is a problem for you, it is
trivial to work around:
(1) Why on earth should
can any one help me in customizing output(inserting 2 or more tables in a
single sheet,creating table title etc.) in excel? I also need to know
whether it is possible to create a page with charts and graphs in word by
R? thanks in advance.
--
View this message in context:
http://r.789695.n
68 matches
Mail list logo