"JL" == Johannes Lips
on Tue, 15 Feb 2011 16:07:50 +0100
JL> Hello,
JL>
JL> I'm quite new to R but tried to learn as much as possible in
JL> the last
JL> few months.
JL> My problem is that I would like to estimate the model of Leon
JL> et al. (2005).
JL> I have s
Hi,
rasterImage may alleviate the pdf artefacts in the viewer. This seems
to produce a similar output,
plot(range(x),range(y), t="n")
rasterImage(t(rgb(colorRamp(heat.colors(7))(z/max(z))/255)),
min(x),min(y),max(x),max(y), interpolate=FALSE)
HTH,
baptiste
On 16 February 2011 05:43, Steven Cor
Steven Cordwell wrote:
>
> However, transforming z into a matrix with two rows, where both rows are
> the same as z above does seem to be a workaround.
>
> z <- matrix(c(z,z),2,length(z),byrow=TRUE)
> y <- c(0.25,0.75)
> image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),xlab="Year",ylab="Action",ya
On Tue, Feb 15, 2011 at 8:43 PM, Steven Cordwell wrote:
> Hi,
>
> I have a vectors x and z, for example,
>
> x <- 0:20
> z <- round(runif(20,1,7))
> y <- 0.5
>
> and I want to display z as an image. However if I then call image() with a
> vector
>
> image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),x
Hi,
I have a vectors x and z, for example,
x <- 0:20
z <- round(runif(20,1,7))
y <- 0.5
and I want to display z as an image. However if I then call image() with a
vector
image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),xlab="Year",ylab="Action",yaxt="n",xaxs="r",yaxs="r")
then I get the error
E
Hi,
I am solving a projection pursuit regression problem, of the
form y = \sum_i f_i (a_i^T x), where a_i are unknown directions, while
f_i are unknown univariate link functions. The following is known about
each f_i:
1. f_i (0) = 0 (that is, each f_i passes through the origin)
2. f_i is m
built-in and idiomatic
Mod(diff(x)+1i*diff(y))
or even better
Mod(diff(x+1i*y))
Rich
On Tue, Feb 15, 2011 at 10:24 PM, William Dunlap wrote:
> > -Original Message-
> > From: r-help-boun...@r-project.org
> > [mailto:r-help-boun...@r-project.org] On Behalf Of Darcy Webber
> > Sent: Tu
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Darcy Webber
> Sent: Tuesday, February 15, 2011 4:10 PM
> To: r-help@r-project.org
> Subject: [R] distance between consecutive points
>
> Dear R users,
>
> I have two coloumns o
Did you have any other warnings going on. I had this same error and fix it
because I got a bunch of words that after stemming and number removal some
of my files were blank. After deleting these files I made the textmatrix
fine. I think when it tries to make the dataframe there is a mismatch
be
On Feb 15, 2011, at 8:22 PM, Peter Alspach wrote:
Tena koe D'Arcy
You might find dist() more suited to your needs.
HTH
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Darcy Webber
Sent: Wednesday, 16 Febru
Hi,
May I know how to obtain the confidence interval of the survival curve of
weighted Cox regression model?
I tried coxph, cph, and coxphw, but they did not work.
Any help would be much appreciated.
Thanks,
Jeanne
--
View this message in context:
http://r.789695.n4.nabble.com/Confidence-in
> To: r-h...@stat.math.ethz.ch
> From: s...@gnu.org
> Date: Tue, 15 Feb 2011 17:20:11 -0500
> Subject: [R] string parsing
>
> I am trying to get stock metadata from Yahoo finance (or maybe there is
> a better source?)
search this for "yahoo",
http://
Hi,
On Tue, Feb 15, 2011 at 5:52 PM, Du, Ruofei wrote:
> I'm using 'getBM' function in Bioconductor package 'biomaRt' to retrieve gene
> ids based on known chromosome locations.
>
> The question is getBM just only return one gene id once a time, even a query
> is mapped to multiple genes. What
Hi I am posting to seek some advice regarding the R Gui 2.12.0 that keeps
freezing on my pc.
I have been trying to run MCMC ordinal factanal code on my PC but the window
freezes everytime after 7001 iterations (total of 25 iterations). My
operating system is window vista 64-bit with 4.0 gb of
It does print frequency stats, just not all of them. The reason it
doesn't print all of them is that there could be thousands of them.
If you want a table, use table()
-thomas
On Wed, Feb 16, 2011 at 11:31 AM, Sam Steingold wrote:
> summary() for a factor prints:
>
> ColName
> SNDK :
__
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.
Clayton -
From your explanation, it sounds like you want to create
a new file removing the "Location" variable, and all the
variables that have the string "Ambient" or "Name" in their names.
Suppose that your data frame is called mydata, and you wish to
create a reduced csv file called "myda
Tena koe D'Arcy
You might find dist() more suited to your needs.
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Darcy Webber
> Sent: Wednesday, 16 February 2011 1:10 p.m.
> To: r-help@r-project.org
>
summary() for a factor prints:
ColName
SNDK : 72
VXX : 36
MWW : 30
ACI : 28
FRO : 28
(Other):1801
it would have been much more useful if it additionally
printed frequency stats as if by
summary(aggregate(frame$ColName,by=list(frame$ColName),FUN=length)$x)
--
Sam St
Sam -
Since the error message said the argument wasn't numeric
or logical, that would be the source of your problem. What
is the result of
class(all$Value)
If it's 'character' or 'factor', that would explain the problem.
Provide more details for a (most likely) easy solution.
I am trying to get stock metadata from Yahoo finance (or maybe there is
a better source?)
here is what I did so far:
yahoo.url <- "http://finance.yahoo.com/d/quotes.csv?f=j1jka2&s=";;
stocks <- c("IBM","NOIZ","MSFT","LNN","C","BODY","F"); # just some samples
socket <- url(paste(yahoo.url,sep="",pa
> * Jan van der Laan [2011-02-15 10:09:44 +0100]:
>
> The fact that your column names from your aggregate result contain
> multiple numbers, suggests that something has gone wrong with reading
> your data in from file. Have you had a look at your data.frame 'all'?
yes, the data is loaded correctl
> * Sam Steingold [2011-02-14 18:42:40 -0500]:
>
> byFOO$Mean <- aggregate(all$Value, by = list(all$FOO), FUN = mean)$x;
this fails with
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In mean.default(X[[1L]], ...) :
argument is not numeric
Hi,
I have a package I was previously able to compile and use for R 2.6.
In the newer versions of R it did not work, so I am making it from scratch
using Rtools and new R version.
However, I keep getting error after Rcmd build –binary mypack
Here is the complete log:
* checking for file ‘mypack/
I'm using 'getBM' function in Bioconductor package 'biomaRt' to retrieve gene
ids based on known chromosome locations.
The question is getBM just only return one gene id once a time, even a query
is mapped to multiple genes. What's the criteria for picking that special one?
[[alter
Dear R users,
I have two coloumns of data, say x and y, referring to a list of
points in 2D space. I am trying to develop a code that will give me
the distances (using Pythagoras) between consecutive points (xi,yi)
and (xi+1,yi+1). So far I have come up with the following:
for (i in 1:length(x))
Hi, I'm using the latest version of 64-bit R for Windows: R x64 2.12.1
I'm using it because I currently need to do hierarchical clustering on a
very large object (too big for MATLAB, which I normally use).
When I try to cluster my distance matrix d (obtained using dist on my design
matrix):
hc <-
I need help.
I have very big .csv files with many unnecessary columns. From the original
.csv files I would like to create a new .csv file with just the columns I
need.
For example:
The original column heading are: Date, Time, Location, Sensor Name, Sensor
Serial, Ambient Temp, IR Temp, Sensor
Dear all,
Is there a fairly general R implementation of the delta method that uses
numerical derivatives?
I realise that the delta method has been implemented using symbolic
derivatives (e.g. alr3::delta.method, emdbook::deltamethod,
msm::deltamethod and survey:::nlcon), however possibly non-lin
Hello R users,
I am fitting spatial point process models in spatstat using ppm and my models
actually contain spatial covariates. The results of the models are returned
with some levels of the covariates absent. eg when I fit a model with "aspect"
using:
ppm(points, ~aspect, covariates=list(
Oh. So the %OS only works with format.POSIXct(), format.POXIXlt(),
and strftime(), but NOT strptime()?
> x <- "09:31:29.18761"
>
> y <- strptime(x, format = "%H:%M:%OS");
> y
[1] "2011-02-15 09:31:29"
> format(y, format = "%H:%M:%OS3")
[1] "09:31:29.188"
> strftime(y, format = "%H:%M:%OS3")
[1]
On 15/02/2011 4:55 PM, Julia Jacobson wrote:
Hello R users,
Using R, Sweave and the cmsyase.afm font it is possible to write LaTeX
documents including R figures with text in the Computer Modern Fonts:
This is very unlikely to have anything to do with Sweave, it's a
graphics system problem. Y
According to the documentation, '%OS6' is only for output, not for
conversion on input.
Specific to R is %OSn, which for output gives the seconds to 0 <= n <=
6 decimal places (and if %OS is not followed by a digit, it uses the
setting of getOption("digits.secs"), or if that is unset, n = 3).
Furt
Julia,
While not a direct answer to your question, you may find the
pgfSweave driver/package to be interesting.
http://cran.r-project.org/web/packages/pgfSweave/
Among other things, it uses the tikzDevice package for figures, which
will cause the labels and text to use the same font as in your
Hello R users,
Using R, Sweave and the cmsyase.afm font it is possible to write LaTeX
documents including R figures with text in the Computer Modern Fonts:
\documentclass{article}
\usepackage{Sweave}
\begin{document}
<>=
CM <- Type1Font("CM",
c(file.path("C:/texlive/2009/texmf-dist/font
Packages like Cairo have very little to do with R and everything to do
with the external software (here cairographics), and so do work quite
differently on Ubuntu and Windows (and with lots of font problems on
Windows).
But this example works for me in that exact setup.
On Tue, 15 Feb 2011, B
Dear R-users,
I was wondering if somebody could shed some light on the relationships
existing between the resolution of a png device, the axis.text$cex trellis
setting, and the paddings of the actual graph. In the following code, I
create a custom trellis theme that set (among other thing) axis.te
Ash Pol live.com> writes:
>
>
> Hi All,
> I have been experiencing a strange issue ever since I upgraded my R and the
packages. I cannot plot anything
> to the CairoPNG device.For an example:
Cairo(600, 600, file="plot.png", type="png", bg="white")
plot(1:10)
dev.off()
will create an empty pl
FYI,
you can use the following to troubleshoot what is going on:
library("R.utils");
filename <- "MyFile.csv";
path <- ... # The directory where to store
pathname <- Arguments$getWritablePathname(filename, path=path);
or if you already have the full pathname:
pathname <- Arguments$getWritablePa
Sema, oni mogut ne otvetit' - narod 4asto pro eto sprashivaet. Oni
inogda otve4ayut, inogda net. Tam kakie-to mudrenie ob'yasneniya.
On Tue, Feb 15, 2011 at 11:40 AM, Sam Steingold wrote:
> When I do
>> all(all$X.Time == all$Y.Time);
> [1] TRUE
> as expected, but
>> all.equal(all$X.Time,all$Y.Tim
On Mon, Feb 14, 2011 at 02:45:49PM -0800, David Wolfskill wrote:
> I am acquiring some sampled data that is time-stamped (with a
> POSIXct). Some of the data is in the form of "counters" -- that
> is, what is interesting isn't value of a given counter at a given
> time, but the change in the count
I would use match()
?match
Rich
On Tue, Feb 15, 2011 at 2:11 PM, Francois Rousseu <
francoisrous...@hotmail.com> wrote:
>
> Hello R users
>
> When using the function which to get matches, I usually do
>
> w<-which(x==y)
> length(w)==0
>
> to determine if there are matches or not. Is there a bas
On Tue, Feb 15, 2011 at 09:40:54AM -0800, Alaios wrote:
> Thank you very much for your help again.
> One more question is that after I have that list of matrices what is the
> easiest way to find the minimun and maximum values of ALL the matrices in
> that list?
Try the following.
# get a li
On Tue, Feb 15, 2011 at 11:56 AM, Kevin Wright wrote:
> The original poster did not say what operating system was being used. From
> my own experience on Windows, I always used "/" for reading from the local
> hard drive, but when I started working with Windows network shares/folders,
> I had to
The original poster did not say what operating system was being used. From
my own experience on Windows, I always used "/" for reading from the local
hard drive, but when I started working with Windows network shares/folders,
I had to switch back to "\\" due to an unknown "feature" (bug?).
Kevin
On Tue, 15 Feb 2011, Stuart Jaffe wrote:
> Hi,
> I'm trying to write a file to a shared drive on a network. I use the
> "write.csv" function with the correct path but R doesn't recognize the
> directory. Is there something different I have to do since it's a shared
> drive?
> Thanks.
Check that
Stuart -
In situations like this, I always recommend using file.choose,
so that you can navigate to the appropriate location. For example,
write.csv(mydata,file=file.choose())
will open a file browser so you can make sure the data will get
written to exactly where you want it.
You can also
Francois -
I think you're looking for the any function:
x = c(1,2,3)
y = c(4,5,6)
any(x==y)
[1] FALSE
any(which(x==y))
[1] FALSE
x = c(1,2,3)
y = c(4,2,5)
any(x==y)
[1] TRUE
any(which(x==y))
[1] TRUE
- Phil Spector
Hello. One (of many) solution might be:
require(data.table)
DT = data.table(read.table(textConnection("A B C
1 1 a 1999
2 1 b 1999
3 1 c 1999
4 1 d 1999
5 2 c 2001
6 2 d 2001"),head=TRUE,stringsAsFactors=FALSE))
firststep = DT[,cbind(expand.grid(B,B),v=1/length(B)),by=C][Var1!=
Hello R users
When using the function which to get matches, I usually do
w<-which(x==y)
length(w)==0
to determine if there are matches or not. Is there a base function that can do
the thing more directly by returning a logical value if the result of which is
empty or not?
Thanks
Franco
On Feb 15, 2011, at 11:39 AM, Sam Steingold wrote:
I read a dataset with times in them, e.g., "09:31:29.18761".
I then parse them:
all$X.Time <- strptime(all$X.Time, format = "%H:%M:%OS6");
and get a vector of NAs (how do I check that except for a visual
inspection?)
then I do
options("dig
> You can probably do this by constructing a call to the `names<-` replacement
> function, but it's really bad style. Don't write R code that has external
> side effects if you can avoid it. In this case, you'll almost certainly get
> more maintainable code by writing your function to return a co
When using the windows gui I prefer the winProgressBar to the txtProgressBar.
It works basically the same, but does not put any characters into the terminal.
(there is also tkProgressBar that works on all platforms, but requires the
tcltk package).
--
Gregory (Greg) L. Snow Ph.D.
Statistical
I have set up a postgresql database that I connect to each R startup in
my .Rprofile file.
##relevant lines from .Rprofile
library(RPostgreSQL)
m <- PostgreSQL()
con <- dbConnect(m, user="xxx", password="yyy", dbname="zzz")
##
On 15/02/2011 11:43 AM, John Edwards wrote:
I get the following error when I try to modify the names of the object
returned by get(). Does anybody know how to do so? (I could use as.vector()
to remove the names, but I'm interested in how to modify the object returned
by get().)
You can probably
On 15/02/2011 11:40 AM, Sam Steingold wrote:
what does the output for [[]] mean here:
> all$X.Time[5]
[1] "2011-02-15 09:32:26.37222"
> all$X.Time[[5]]
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
You didn't tell us what X.Time was, but it looks like a POSIXlt object,
which is stored inte
On Feb 15, 2011, at 12:18 PM, mathijsdevaan wrote:
Thanks for your quick response. The solution that you propose comes
close to
what I want, however by using 'FUN = order', the new variable is
based on
its order rather than y< focal y. In the case of two similar rows
(Xrow1=Xrow2 and Yrow
When I do
> all(all$X.Time == all$Y.Time);
[1] TRUE
as expected, but
> all.equal(all$X.Time,all$Y.Time);
Error in target[[i]] : subscript out of bounds
why?
thanks!
--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final)
http://mideasttruth.com http://honestreporting.com http://d
10x Henrique!
it works great bur i need tha same with gsub, i want to replace the matched
string... :/
another idea?
--
View this message in context:
http://r.789695.n4.nabble.com/regex-tp3306635p3307114.html
Sent from the R help mailing list archive at Nabble.com.
__
I read a dataset with times in them, e.g., "09:31:29.18761".
I then parse them:
> all$X.Time <- strptime(all$X.Time, format = "%H:%M:%OS6");
and get a vector of NAs (how do I check that except for a visual inspection?)
then I do
> options("digits.secs"=6);
> all$X.Time <- strptime(all$X.Time, forma
Hi,
I'm trying to write a file to a shared drive on a network. I use the
"write.csv" function with the correct path but R doesn't recognize the
directory. Is there something different I have to do since it's a shared drive?
Thanks.
[[alternative HTML version deleted]]
what does the output for [[]] mean here:
> all$X.Time[5]
[1] "2011-02-15 09:32:26.37222"
> all$X.Time[[5]]
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> all$X.Time[1]
[1] "2011-02-15 09:31:29.18761"
> all$X.Time[[1]]
[1] 29.18761 34.30949 36.38144 12.28500 26.37222 47.00837 40.20271 32.83765
[
Thanks for your quick response. The solution that you propose comes close to
what I want, however by using 'FUN = order', the new variable is based on
its order rather than y< focal y. In the case of two similar rows
(Xrow1=Xrow2 and Yrow1=Yrow2), the value of Zrow1 < Zrow2. Any solutions?
Thanks!
On Tue, Feb 15, 2011 at 12:21:18PM -0500, Robert M. Flight wrote:
> Say I have a tab-delimited table I want to read into R. What should I
> expect to happen if some of the entries contain the character " ' "? I
> thought it would read the file fine, but that is not what happens.
> Instead, all the
On 2011-02-15 09:25, Peter Langfelder wrote:
On Tue, Feb 15, 2011 at 9:21 AM, Robert M. Flight wrote:
Say I have a tab-delimited table I want to read into R. What should I
expect to happen if some of the entries contain the character " ' "? I
thought it would read the file fine, but that is not
Kjetil et al,
Unlike finite sums, infinite sums are not commutative. To have
commutativity, one must have absolute summability, that is, the sum of the
absolute values of the terms must be finite. If one has absolute
summability, the infinite sum exists and is unique. This sum is not
absolutel
Just tried this on ubuntu 10.04 (latest update) with R 2.12.1
NC repository
worked like a charm. Try updating your R version? I didn't see a
R-version depends on the vegetarian CRAN site, but that would be the
first thing that I would do.
On Mon, 2011-02-14 at 14:06 -0800, B77S wrote:
> All:
>
On Tue, Feb 15, 2011 at 9:21 AM, Robert M. Flight wrote:
> Say I have a tab-delimited table I want to read into R. What should I
> expect to happen if some of the entries contain the character " ' "? I
> thought it would read the file fine, but that is not what happens.
> Instead, all the values i
Check out the arguments for read.table especially 'quote'
you probably want quote='' to suppress the special meaning of quote.
You might also need comment.char in the future.
On Tue, Feb 15, 2011 at 12:21 PM, Robert M. Flight wrote:
> Say I have a tab-delimited table I want to read into R. What
Yes, that was it. Thanks a lot.
Best regards,
Eduardo
On Tue, Feb 15, 2011 at 2:34 PM, jim holtman wrote:
> The try this:
>
>> s <- c( 0.2, 0.45, 0.38, 0.9)
>> f <- lapply(1:10, function(i)
> + local({
> + local_s <- s[i]
> + function(x)x^2+local_s
> + }))
Say I have a tab-delimited table I want to read into R. What should I
expect to happen if some of the entries contain the character " ' "? I
thought it would read the file fine, but that is not what happens.
Instead, all the values in between two " ' "s get read into one field,
and things are just
Hi John,
Probably there is a more elegent solution, but I usually do something like
tmp <- get("x")
names(tmp) <- letters[1:10]
assign("x", tmp)
rm("tmp")
HTH,
Ista
On Tue, Feb 15, 2011 at 11:43 AM, John Edwards wrote:
> I get the following error when I try to modify the names of the object
> r
Your example does not seem to accurately mirror your data since there are no
variable column counts.
If the data is not confidential, it might be a good idea to load a sample of it
somewhere were list readers can get it and examine the actual file layout.
[url=http://www.mediafire.com/][b]Medi
Also look at the "flush" and "fill" arguments on read.table to see if
that helps.
On Tue, Feb 15, 2011 at 9:12 AM, Ingo Reinhold wrote:
> Dear all,
>
> I am stuck the reading of a file which has 100s of rows and variable column
> counts.
>
> The tab-limited data file looks something like:
>
> So
On Feb 15, 2011, at 15:17 , David Winsemius wrote:
>
> On Feb 14, 2011, at 7:33 PM, Kjetil Halvorsen wrote:
>
>> or even better:
>>
>> http://mathoverflow.net/
>
> I beg to differ. That is designated in its FAQ as expecting "research level
> questions", while the forum I offered is labeled a
Can you try to change the extention of your file (make it a .txt or
open it in Excel and save it as a .csv file) - and then read it in?
Dimitri
On Tue, Feb 15, 2011 at 9:12 AM, Ingo Reinhold wrote:
> Dear all,
>
> I am stuck the reading of a file which has 100s of rows and variable column
> coun
Try this:
cbind(X, z = ave(X$y, X$x, FUN = order) - 1)
On Tue, Feb 15, 2011 at 12:33 PM, mathijsdevaan wrote:
>
> Hi,
>
> I have a data frame containing two columns:
>
> x<-as.factor(c('a','a','a','a','a','b','b','b','c','d','d','d'))
> y<-c(1,3,6,8,12,3,4,7,5,6,7,10)
> X<-data.frame(x,y)
> X
>
I get the following error when I try to modify the names of the object
returned by get(). Does anybody know how to do so? (I could use as.vector()
to remove the names, but I'm interested in how to modify the object returned
by get().)
$ cat main_get_name_assign.R
x=1:10
names(x)=letters[1:10]
nam
The try this:
> s <- c( 0.2, 0.45, 0.38, 0.9)
> f <- lapply(1:10, function(i)
+ local({
+ local_s <- s[i]
+ function(x)x^2+local_s
+ }))
> rm(s)
> f[[2]](4)
[1] 16.45
>
On Tue, Feb 15, 2011 at 10:53 AM, Eduardo de Oliveira Horta
wrote:
> Thanks... but I g
Try this:
x <- c("AGDHA!jdbsah/dsgadg#dasdwq*dsad", "", "")
grep("<.*>", x, invert = TRUE)
On Tue, Feb 15, 2011 at 12:34 PM, zem wrote:
>
> OK I have strings like these:
>
> AGDHA!jdbsah/dsgadg#dasdwq*dsad
>
> and
>
>
>
> etc.
>
> the first one must be mathced and these in the <> not
> --
> V
Hi All,
I have been experiencing a strange issue ever since I upgraded my R and the
packages. I cannot plot anything to the CairoPNG device.For an example:>
Cairo(600, 600, file="plot.png", type="png", bg="white")> plot(1:10)>
dev.off()will create an empty plot.png file. I am running R 2.12.1 (
Hello,
I'm quite new to R but tried to learn as much as possible in the last
few months.
My problem is that I would like to estimate the model of Leon et al. (2005).
I have shortly summarised the most important equations in the following
pdf file:
http://hannes.fedorapeople.org/leon2005.pdf
Hi,
I have a data frame containing two columns:
x<-as.factor(c('a','a','a','a','a','b','b','b','c','d','d','d'))
y<-c(1,3,6,8,12,3,4,7,5,6,7,10)
X<-data.frame(x,y)
X
x y
1 a 1
2 a 3
3 a 6
4 a 8
5 a 12
6 b 3
7 b 4
8 b 7
9 c 5
10 d 6
11 d 7
12 d 10
I would like to add
OK I have strings like these:
AGDHA!jdbsah/dsgadg#dasdwq*dsad
and
etc.
the first one must be mathced and these in the <> not
--
View this message in context:
http://r.789695.n4.nabble.com/regex-tp3306635p3306858.html
Sent from the R help mailing list archive at Nabble.com.
__
Dear all ,
I would like to use the function randomForest to predict the probability
of relocation failure of a GPS collar as a function of several
environmental variables x (both factor and numeric: slope, vegetation,
etc.) on a given area. The response variable y is thus success
(0)/failure(1
Dear all,
I am stuck the reading of a file which has 100s of rows and variable column
counts.
The tab-limited data file looks something like:
Some_Text 131231534-1191010178
Some_Taxt 131331434-2191010178
Some_Tsxt 132441334
First I have read all the previous post on error bars & segments as well as the
Lattice book by Sarkar.
I am using xyplot, there are 2 panels, each panel displays the measurements
from 5 matrices over time. The matrices are identified by different colors.
My error bars show up in the 1st
Dear Eduardo,
try:
f <- function(x){}
s <- 0.2
body(f) <- substitute({x^2 + s}, list(s = s))
Best,
Matthias
On 15.02.2011 16:53, Eduardo de Oliveira Horta wrote:
Thanks... but I guess I didn't make myself clear. What I was trying to
do was precisely to "store" inside the function the number as
Thanks... but I guess I didn't make myself clear. What I was trying to
do was precisely to "store" inside the function the number associated
to s[i] rather than the call to s[i], such that I wouldn't need to
keep that object in subsequent function calls.
In other words, I wanted to use lapply to g
Colin,
If your propose is to create a ternary plot with points and vectors, I think
easier do this with graphics based plots instead of trellis based plots.
Although, with little work you can do with trellis too. I gave you a
reproducible code to put an arrow in a ternary plot. I use the funct
Hello-
I would appreciate help with some of the features of the poLCA package.
I am validating a mental health screening instrument used in prison settings.
The instrument includes 30 items in 5 categories of psychiatric symptoms. My
plan is to conduct separate latent class analyses (using gend
Hi Michael,
On Tue, Feb 15, 2011 at 7:15 AM, Michael Pearmain
wrote:
> Hi All,
>
> I'm having some trouble assigning arguments inside a function to
> produce a plot from a model
>
> Can anyone help me? Below I've outlined the situation and examples of
> failing and working code.
>
> Regards
>
> M
Dear all ,
I would like to use the function randomForest to predict the probability
of relocation failure of a GPS collar as a function of several
environmental variables x (both factor and numeric: slope, vegetation,
etc.) on a given area. The response variable y is thus success
(0)/failure(1
Hi
I am attempting to convert my simple weighted regressions (produced using the
weights argument in lm) to a constrained regression where the coefficients sum
to 1. I understand that I can do this using solve.qp and I have spent time
reading the archives to understand how this is done, but I
Hi guys,
I have been testing the hypothesis for difference of survival between four
different classes. The p-values provided in coxph output are confusing for me
to interpret.
Here is the output :
sur<-coxph(Surv(SURVIV, status == 1)~factor(A)+cluster(rownames(d)), data = d,
model=TRUE)
Call:
Thank you very much Greg,
This was helpful.
With yaxs="r" I can easily obtain the Y-axis labels with :
rg <- range(y) + 0.04 * diff(range(y)) * c(-1, 1)
pt <- pretty(y)
axTicks(side=2,
usr=c(0, 1, rg),
axp=c(min(pt),
max(pt[pt <= max(rg)
This is handled simply with an AND operator. You use a mask the size
of the counter:
> require(bitops)
> 3 - 14
[1] -11
> bitAnd(3 - 14, 0xF)
[1] 5
>
>
On Mon, Feb 14, 2011 at 5:45 PM, David Wolfskill wrote:
> I am acquiring some sampled data that is time-stamped (with a
> POSIXct). Some of t
Dear Mario,
See: http://www.mail-archive.com/r-help@r-project.org/msg117622.html
This seems to be fixed in version 2.12.1 (at least, I do not get this problem
anymore).
Best,
Wolfgang
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On
On 14.02.2011 16:35, agent dunham wrote:
Hello, I am new with R, and I'm trying to fit a linear model, I did the
following and obtein this result, can anybody help? Thanks,
logdftodos7925vi<- log(dftodos7925vi)
logALTURA7925<- log(dftodos7925$ALTURA7917)
logtodos7925.lm<- lm (logALTURA792
You can also create a local copy of 's' in the function:
> s <- c( 0.2, 0.45, 0.38, 0.9)
> f <- lapply(1:10, function(i)
+ local({ force(i)
+ local_s <- s
+ function(x)x^2+local_s[i]
+ }))
> rm(s)
> f[[2]](4)
[1] 16.45
>
On Tue, Feb 15, 2011 at 12:50 AM, Ed
1 - 100 of 127 matches
Mail list logo