Graham
Â
I have installed rattle and is pretty intuitive and friendly. However, I miss
some features of the original packages which cannot be invoked from rattle. For
example, 'randomForest' package is used but random forests cannot be used in
one of  -in my opinion- most powerful aspects
Hi all,
The new version of STAR (0.2-2) is now available on CRAN.
* An error in function varianceTime has been corrected (thanks to Chong Gu).
* The vignette has been updated.
* A new vignette is available on STAR web sire:
http://sites.google.com/site/spiketrainanalysiswithr/
* The new
Dear all,
I've got many responses to my initial question, which is stated below.
However, from those responses it has become clear that I need to
rephrase my problem. All responses dealt with subscripting the data
matrix before 'apply' is run on it. But this is not want I wanted to do.
Hello.
How can I compute the Bootstrap p-value for a two-sided test problem like H_0:
beta=0 vs. H_1: beta!=0 ?
Example for the sample mean:
x - rnorm(100)
bootsample - numeric(1000)
for(i in 1:1000) {
idx - sample(1:100,100,replace=TRUE)
bootsample[i] - mean(x[idx])
}
How can I
you can use something like the following:
# your matrix
mat - matrix(rnorm(20), 5, 4)
# an indicator matrix specifying which columns
# you want to exclude each time
ind - matrix(sample(1:3, 18, TRUE), ncol = 3)
apply(ind, 1, function (i) mean(mat[, -i]))
where you may change mean() with
A new package ConvCalendars is on CRAN, in response to requests earlier this
week.
It performs conversions between the Gregorian calendar and other calendars
including the Persian (Jalali) calendar used in Iran and Afghanistan and the
Hebrew calendar used in Israel.
All the heavy lifting is
Thanks a lot Duncan
Sorry to insist with my questions but I am very lost with these Rcurl
commands...
could you point out the few ones I need to set up an ftp connection
and just upload a file ?
Greatly appreciated
Thomas
2009/1/8 Duncan Temple Lang dun...@wald.ucdavis.edu:
Prof Brian
On Fri, 2009-01-09 at 00:22 -0500, stephen sefick wrote:
library(StreamMetabolism)
snip /
plot.e - function(b, w, x, y, z){
a - window.chron(b, w, x, y, z)
low - min(b*0.98)+5
high - max(b*1.02)+5
plot(a, ylim=c(low, high))
lines(a*0.98, col=blue)
lines(a*1.02, col=red)
}
plot.e(day,
Thank you! It's what I want :)
But I can't make it work. I'm working with R version 2.7.1 under Debian
GNU/Linux. Let me paste my results:
pairwise.wilcox.test(SAND,Organ,p.adj=bonf) - a
Pairwise comparisons using Wilcoxon rank sum test
data: SAND and Organ
FlowerA FlowerB
G'day all,
On Fri, 9 Jan 2009 08:12:18 -0200
Henrique Dallazuanna www...@gmail.com wrote:
Try this also:
substr(basename(myfile), 1, nchar(basename(myfile)) - 4)
Or, in case that the extension has more than three letters or myfile
is a vector of names:
R myfile - path1/path2/myoutput.txt
R
Received Fri 09 Jan 2009 7:49pm +1100 from Gabriel Ibarra:
[...]
I have installed rattle and is pretty intuitive and
friendly. However, I miss some features of the original packages
which cannot be invoked from rattle. For example, 'randomForest'
package is??used but random??forests cannot
Received Fri 09 Jan 2009 5:08pm +1100 from Dr Eberhard W Lisse:
Graham,
[...]
Three Requests for Features for rattle(): would it not be nice to also
have direct
PostgreSQL (RdbiPgSQL) and MySQL (RMySQL) support and support for a
SELECT statement?
In other words, sometimes the database
Berwin A Turlach wrote:
G'day all,
On Fri, 9 Jan 2009 08:12:18 -0200
Henrique Dallazuanna www...@gmail.com wrote:
Try this also:
substr(basename(myfile), 1, nchar(basename(myfile)) - 4)
Or, in case that the extension has more than three letters or myfile
is a vector of names:
Is it possible to save plots as byte streams? For example, if I want the
bytes for a PNG plot, I could use
#Write the plot to a PNG file
png(test.png)
plot(1:10)
dev.off()
#Read the bytes back in from the file
plotbytes - readBin(test.png, raw, n=2000)
Ideally, I'd like to avoid having to
On Fri, Jan 9, 2009 at 6:52 AM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Berwin A Turlach wrote:
G'day all,
On Fri, 9 Jan 2009 08:12:18 -0200
Henrique Dallazuanna www...@gmail.com wrote:
Try this also:
substr(basename(myfile), 1, nchar(basename(myfile)) - 4)
Or,
Thank you again for your response.
This worked great.
Quick question about the legend for qplot. Instead of being outside the plot,
is it possible to move the location of the legend to the upper left or right
corner of the plot? Could you possibly provide an example.
Thank you again
Gabor Grothendieck wrote:
On Fri, Jan 9, 2009 at 6:52 AM, Wacek Kusnierczyk
or have sub do the job for you:
filenames.ext = c(foo.bar, basename(foo/bar/hello.dolly))
(filenames.noext = sub([.][^.]*$, , filenames.ext, perl=TRUE))
We can omit perl = TRUE here.
or maybe not,
On Fri, 9 Jan 2009, richard.cot...@hsl.gov.uk wrote:
Is it possible to save plots as byte streams?
You mean bitmap plots? E.g. PDF plots are not even written
sequentially.
For example, if I want the
bytes for a PNG plot, I could use
#Write the plot to a PNG file
png(test.png)
plot(1:10)
I agree, that there are better plattforms.
I'd love to see something like Stack Overflow:
http://stackoverflow.com/
When you type your question, it compares it to previously answered
questions. Answers can get voted up and down. Answers AND questions can be
edited!
Regards
Roland Studer
On
No problem, easy peasy, just hack it together and put all the old
archives on so the subscribers can vote.
greetings, el
On 09 Jan 2009, at 14:45 , Roland Studer wrote:
I agree, that there are better plattforms.
I'd love to see something like Stack Overflow:
http://stackoverflow.com/
When
G'day Wacek,
On Fri, 09 Jan 2009 12:52:46 +0100
Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Berwin A Turlach wrote:
G'day all,
On Fri, 9 Jan 2009 08:12:18 -0200
Henrique Dallazuanna www...@gmail.com wrote:
Try this also:
substr(basename(myfile), 1,
Berwin A Turlach wrote:
G'day Wacek,
Or, in case that the extension has more than three letters or
myfile is a vector of names:
R myfile - path1/path2/myoutput.txt
R sapply(strsplit(basename(myfile),\\.), function(x)
R paste(x[1:(length(x)-1)], collapse=.))
[1] myoutput
R myfile2 -
G'day Wacek,
On Fri, 09 Jan 2009 14:22:19 +0100
Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Apparently also a possibility, I guess it can be made to work with
the original example and my extensions.
i guess it does work with the original example and your
Hi Everyone,
This example code results in R 'crashing'; that is the R application closes
with no warnings or error messages.
#---
myD - read.table(stdin(), header=TRUE, nrows=20)
Broth Salt pH TempN Y Growth
13109.0 2.92 10 90.0 NA0
2
Dear list,
I'm having second thoughts after solving a very trivial problem: I
want to extend the relevel() function to reorder an arbitrary number
of levels of a factor in one go. I could not find a trivial way of
using the code obtained by getS3method(relevel,factor). Instead, I
thought
Berwin A Turlach wrote:
G'day Wacek,
On Fri, 09 Jan 2009 14:22:19 +0100
Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Apparently also a possibility, I guess it can be made to work with
the original example and my extensions.
i guess it does work with the
Howdy Gurus
I 'd like to ask a question about how to build TermDocMatrix in tm text
mining package.
It is not clear about importing a plain text file, and them converting that
text file into TermDocMatrix file, etc to me.
How can I build a TermDocMatrix of a plain text document file for text
Prof Brian Ripley wrote:
Actually, that's a valid regex in any of the variants offered. A more
conventional writing of it is the second of
f - 'foo.bar.R'
sub([.][^.]*$, , f)
[1] foo.bar
sub(\\.[^.]*$, , f)
[1] foo.bar
more conventional in r, perhaps. it's not portable, due to the
G'day Wacek,
On Fri, 09 Jan 2009 15:19:46 +0100
Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
i think i did not suggest the original poster to learn perl.
As I see it, you didn't suggest anything to the original poster, at
least not directly. But, since these days you have to
I think that you can still use to core of stats:::relevel.factor; the
only thing that needs to be changed is the controls for bad values of
the 'ref' argument, i.e.,
relevelNew - function (x, ref, ...) {
lev - levels(x)
if (is.character(ref))
ref - match(ref, lev)
if
Dear Luke and others,
I have many R versions on my machine and want to start a particular
one when snow builds its cluster. (The same version I start snow
from.) It seems that everything is set up correctly in
defaultClusterOptions:
mget(ls(defaultClusterOptions), defaultClusterOptions)
On 9 Jan 2009, at 15:26, Dimitris Rizopoulos wrote:
I think that you can still use to core of stats:::relevel.factor; the
only thing that needs to be changed is the controls for bad values of
the 'ref' argument, i.e.,
relevelNew - function (x, ref, ...) {
lev - levels(x)
if
Dear Baptiste,
You can avoid the recursive stuff. And it will run about twice as fast.
order.factor - function (x, ref)
+ {
+ last.index - length(ref) # convenience for matlab's end keyword
+ if(last.index == 1) return(relevel(x, ref)) # end case, normal case
+ my.new.list -
WOW, I am not going to post after midnight. Thank you for your
response, and this is what I settled on.
`plot.e` - function(b, w, x, y, z){
a - window.chron(b, w, x, y, z)
low - min(a*0.98)-(min(a)*0.04)
high - max(a*1.02)+(max(a)*0.04)
plot(a, ylim=c(low, high))
lines(a*0.98, col=blue)
On Fri, Jan 9, 2009 at 1:45 PM, Roland Studer roland.stu...@gmail.com wrote:
I agree, that there are better plattforms.
I'd love to see something like Stack Overflow:
http://stackoverflow.com/
Why, you cannot see it now? You can start posting your R questions and
answers to it right away if
Right,
Other option is:
substr(nameFile, 1, tail(unlist(gregexpr(\\., nameFile)), 1) - 1)
On Fri, Jan 9, 2009 at 1:23 PM, Rau, Roland r...@demogr.mpg.de wrote:
Hi,
[mailto:r-help-boun...@r-project.org] On Behalf Of Henrique
Dallazuanna
Try this also:
substr(basename(myfile), 1,
On 1/8/2009 9:10 PM, Gundala Viswanath wrote:
Dear all,
The basename() function returns the extension also:
myfile - path1/path2/myoutput.txt
basename(myfile)
[1] myoutput.txt
Is there any other function where it just returns
plain base:
myoutput
i.e. without 'txt'
I'm curious about
Hi,
[mailto:r-help-boun...@r-project.org] On Behalf Of Henrique
Dallazuanna
Try this also:
substr(basename(myfile), 1, nchar(basename(myfile)) - 4)
This, of course, assumes that the extensions are always 3 characters.
Sometimes there might be more (index.html), sometimes less
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
grep(-, c(/3, 2*3, 4-4))
[1] 3
grep(/, c(/3, 2*3, 4-4))
[1] 1
grep(*, c(/3, 2*3, 4-4))
Erreur dans grep(*, c(/3, 2*3, 4-4)) :
expression régulière incorrecte '*'
De plus : Warning
On 1/9/2009 10:38 AM, David Hajage wrote:
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
You use a backslash to escape the *. Unfortunately, to enter a
backslash in an R string, you need to escape it. So the pattern is \\*.
R would have truly arrived if the Wall Street Journal mentions it as an
alternative to SAS or Excel...but that is some years away...
Ajay
www.decisionstats.com
On Fri, Jan 9, 2009 at 7:28 AM, Robert Wilkins irishhac...@gmail.comwrote:
Is anyone in the leadership of the R-project going to
Dear all,
Does R has any function/package that can pack
and unpack string into bit size?
The reason I want to do this in R is that R
has much more native statistical function than Perl.
Yet the data I need to process is so large that it
required me to compress it into smaller unit - process it
Use double backslashes:
grep(\\*, c(/3, 2*3, 4-4))
2009/1/9 David Hajage dhajag...@gmail.com
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
grep(-, c(/3, 2*3, 4-4))
[1] 3
grep(/, c(/3, 2*3, 4-4))
[1] 1
grep(*, c(/3,
On Fri, Jan 9, 2009 at 10:23 AM, Rau, Roland r...@demogr.mpg.de wrote:
Hi,
[mailto:r-help-boun...@r-project.org] On Behalf Of Henrique
Dallazuanna
Try this also:
substr(basename(myfile), 1, nchar(basename(myfile)) - 4)
This, of course, assumes that the extensions are always 3
Use fixed = TRUE argument to grep.
2009/1/9 David Hajage dhajag...@gmail.com:
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
grep(-, c(/3, 2*3, 4-4))
[1] 3
grep(/, c(/3, 2*3, 4-4))
[1] 1
grep(*, c(/3, 2*3, 4-4))
Erreur
* must be escaped for grep with \ and \ must be escaped for R itself
with another \, so you need
grep(\\*, c(/3, 2*3, 4-4))
Gabor
2009/1/9 David Hajage dhajag...@gmail.com:
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
Hi there, you probably want something like:
# R
grep(\\*, c(/3, 2*3, 4-4))
hope that helps a little,
Tony Breyal
On 9 Jan, 15:38, David Hajage dhajag...@gmail.com wrote:
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
Thanks Thierry,
A quick test shows almost equivalent timing with the modification of
relevel() suggested earlier:
relevel -
function (x, ref, ...)
{
lev - levels(x)
if (is.character(ref))
ref - match(ref, lev)
if (any(is.na(ref)))
stop('ref' must be an existing
oooups. Thank you very much.
2009/1/9 Duncan Murdoch murd...@stats.uwo.ca
On 1/9/2009 10:38 AM, David Hajage wrote:
Dear R useRs,
Sorry for this foolish question, but I can't find how to escape the *
character when using grep :
You use a backslash to escape the *. Unfortunately, to
This is what I got.
\documentclass[11pt]{article}
\usepackage{longtable,lscape}
\usepackage{accents}
\usepackage[usenames,dvipsnames]{color} % load all the colors
\title{\color{Blue}How to transfer column names and add captions to pages in
document}
\begin{document}
\maketitle
I am using Sweave
Graham: OK. Just give me a few days and I will be sending you some simple RVM
code lines. However, you have the Kernlab help with some nice examples
Â
Best regards
Â
Dr. Gabriel Ibarra-Berastegi
University of the Basque Country
SPAIN
--- El vie, 9/1/09, Graham Williams
Hi there, I think something like the following is what you want:
### R start...
# if you put your plain text files in a folder like this
my.path - 'C:\\Documents and Settings\\tony\\Desktop\\texts\\'
# then you can construct a simple tdm like this
library(tm)
my.corpus -
Try this:
## 1
map - list(A = '00', C = '01', G = '10', T = '11')
myStr - 'GATTA'
paste(map[unlist(strsplit(myStr, NULL))], collapse = )
## 2
cod - 100000
library(gsubfn)
strapply(cod, '[0-9]{2}')
names(map)[match(unlist(strapply(cod, '[0-9]{2}')), map)]
On Fri, Jan 9, 2009 at 1:50 PM,
On Thu, Jan 8, 2009 at 5:58 PM, Robert Wilkins irishhac...@gmail.comwrote:
Is anyone in the leadership of the R-project going to contact the New
York Times and clarify that the article gave remarkably short shrift
to the people who designed the user interface for R, to a large extent
ATT
Gundala --
Gundala Viswanath wrote:
Dear all,
Does R has any function/package that can pack
and unpack string into bit size?
All of your questions relate to DNA strings. The R/Bioconductor package
Biostrings is designed to manipulate such objects. It does not
necessarily address this
Duncan Murdoch wrote:
On 1/8/2009 9:10 PM, Gundala Viswanath wrote:
Dear all,
The basename() function returns the extension also:
myfile - path1/path2/myoutput.txt
basename(myfile)
[1] myoutput.txt
Is there any other function where it just returns
plain base:
myoutput
i.e. without
on 01/09/2009 09:00 AM Duncan Murdoch wrote:
On 1/8/2009 9:10 PM, Gundala Viswanath wrote:
Dear all,
The basename() function returns the extension also:
myfile - path1/path2/myoutput.txt
basename(myfile)
[1] myoutput.txt
Is there any other function where it just returns
plain base:
The R Inferno is now on the Burns Statistics website at
http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
Abstract: If you are using R and you think you're in hell,
this is a map for you.
Also, I've expanded the outline concerning R on the
Burns Statistics 'Links' page. Suggestions
see:
http://www.nabble.com/Compressing-String-in-R-td21160453.html
On Fri, Jan 9, 2009 at 10:50 AM, Gundala Viswanath gunda...@gmail.com wrote:
Dear all,
Does R has any function/package that can pack
and unpack string into bit size?
The reason I want to do this in R is that R
has much
Hi -
If I have a hypothetical distribution as an array
distribution-c(0,1,2,3,4,5,6,7,8,9)
and I want to find the probability there is a value smaller than a new
value.
new_value-4
(such that I'd get this type of output)
new_value p-value
4 0.5
3.4 0.4
3 0.4
0
excellent adaptation of Dante and R with real common sense tips to help
beginners especially ..goes to the blogroll..
now if only i could get tips to sort a 5 column * 1 million rows dataset in
less than ..eternity
Ajay
www.decisionstats.com
On Fri, Jan 9, 2009 at 9:44 PM, Patrick Burns
All-
Thanks in advance for your help.
I'm trying to call R function using Python in a windows environment and have
downloaded the Rpy library however it doesn't appear to work with R 2.7.2.
Does anyone know if a new version of Rpy exists for windows that will work
with R
Ajay ohri wrote:
excellent adaptation of Dante and R with real common sense tips to help
beginners especially ..goes to the blogroll..
now if only i could get tips to sort a 5 column * 1 million rows dataset in
less than ..eternity
Er, that's a fairly short eternity:
x -
Do you really need the p-value or do you want to test at one
of the socially acceptable levels (i.e. .05 or .01). If all you want
is the test, use:
quantile(bootsample,c(0.025,0.975))
If the quantile range includes 0 then you decide there is no evidence
that the mean is different from zero, at
now if only i could get tips to sort a 5 column * 1 million rows dataset in
less than ..eternity
May I suggest mySQL, postgreSQL, etc.? If what you need to do is a basic
sort, a database is going to be faster than R.
--
Insert something humorous here. :-)
Felipe Carrillo wrote:
This is what I got.
\documentclass[11pt]{article}
\usepackage{longtable,lscape}
\usepackage{accents}
\usepackage[usenames,dvipsnames]{color} % load all the colors
\title{\color{Blue}How to transfer column names and add captions to pages
in document}
...
The
In newest version of R2WinBUGS, the default directory is changed to
working.directory, but never changed back once finished bugs call.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Is there any way to maintain spaces, slashes, and parentheses in variable
names when reading these into R?
Of course, read.table converts these to periods. However, I know that it's
not strictly illegal to have these characters in variable names as I am able
to add them using the variable
Try this:
read.table(, check.names = FALSE)
On Fri, Jan 9, 2009 at 3:56 PM, Cloudy56 clough.jonat...@gmail.com wrote:
Is there any way to maintain spaces, slashes, and parentheses in variable
names when reading these into R?
Of course, read.table converts these to periods. However, I
I think that this continuation constitutes what Pat calls hijacking
the thread
at the end of his new and magnificent opus. The original thread
should be
reserved for kudos to Pat.
url:www.econ.uiuc.edu/~rogerRoger Koenker
emailrkoen...@uiuc.eduDepartment of
Thanks Dieter:
It's exactly what I want. Thanks a lot for you help. One thing that I noticed
though, when I generated my pdf all the pages had different numbers of rows,
for example page 1 had 24 rows,second page 15 rows,third page 2 rows of data.
Is that something that can be controlled with
Felipe Carrillo mazatlanmexico at yahoo.com writes:
One thing that I noticed though, when I generated my pdf
all the pages had different numbers of rows, for example page 1 had 24
rows,second page 15 rows,third page 2
rows of data. Is that something that can be controlled with pagebreaks?
I
stephen sefick ssef...@gmail.com wrote:
low - min(a*0.98)-(min(a)*0.04)
high - max(a*1.02)+(max(a)*0.04)
plot(a, ylim=c(low, high))
Unless I am misreading your example, this can be done a little
more compactly as:
plot(a, ylim = range(a * 0.94, a * 1.06))
--
Mike Prager, NOAA, Beaufort, NC
Hello Ryan,
I have good and bad news for you.
The good one is that there is a new rpy in active development. The bad one
is that you should compile it yourself.
You can get it here
http://rpy.sourceforge.net/rpy2.html
I use the regular distro of rpy under Linux x86_64. It works. I hope you
Or even:
plot(a, ylim = range(a) + 0.06 * c(-1, 1))
On Fri, Jan 9, 2009 at 2:07 PM, Mike Prager mike.pra...@noaa.gov wrote:
stephen sefick ssef...@gmail.com wrote:
low - min(a*0.98)-(min(a)*0.04)
high - max(a*1.02)+(max(a)*0.04)
plot(a, ylim=c(low, high))
Unless I am misreading your
Hello,
Sorry to ask this question, I have been searching quite a lot but I could
not find an answer.
I have seen one post about this subject but I did not really understand the
answer.
I have a linear regression with 95% confidence interval.
I would like to find the x-absciss of the intersection
Thank you very much. That certainly worked. Somehow I did not see that when
reading the help file, nor could I find it via Google search so I appreciate
your help! -- JC
Henrique Dallazuanna wrote:
Try this:
read.table(, check.names = FALSE)
On Fri, Jan 9, 2009 at 3:56 PM,
Hi
I am reading the source code of the ridge regression of the MASS package,
and I found the following piece of code
X - model.matrix(Terms, m, contrasts)
n - nrow(X); p - ncol(X)
offset - model.offset(m)
if(!is.null(offset)) Y - Y - offset
if(Inter - attr(Terms, intercept))
WOW, Gabor, that is fancy. I have gotten better at this R thing, but
have far to go. That is a neat solution.
thanks
Stephen
On Fri, Jan 9, 2009 at 2:22 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
Or even:
plot(a, ylim = range(a) + 0.06 * c(-1, 1))
On Fri, Jan 9, 2009 at 2:07
On Thu, 08-Jan-2009 at 01:26AM -0500, Robert Wilkins wrote:
[]
| Some R promoters point out that R has lexical scope and lots of
| Scheme goodness. ( and what widespread programming language today
| does not have lexical scope? ). But other R promoters point out
| that programs in S-Plus
On 1/9/2009 1:27 PM, roger koenker wrote:
I think that this continuation constitutes what Pat calls hijacking
the thread
at the end of his new and magnificent opus. The original thread
should be
reserved for kudos to Pat.
Which he well deserves -- it's good advice, and a fun read too.
2009/1/9 Duncan Murdoch murd...@stats.uwo.ca:
Which he well deserves -- it's good advice, and a fun read too.
I'm looking forward to the sequel - Shakespeare perhaps?
as.YouLike(it)? Much Ado About NULL? Night[12] | What(You.Will)?
Barry
__
hi all,
how can I create sequences that start from a known vector, say x1 and end
with another say x2- also suppose all the sequences will be the same length.
I don't want to use a for loop
x1-c(1,2,3,4); x2-(3,4,5,6);
what I want is
1 2 3 4
2 3 4 5
3 4 5 6
Thanks
-
Yasir H. Kaheil
one way is using mapply(), e.g.,
mapply(:, 1:4, 3:6)
I hope it helps.
Best,
Dimitris
Yasir Kaheil wrote:
hi all,
how can I create sequences that start from a known vector, say x1 and end
with another say x2- also suppose all the sequences will be the same length.
I don't want to use a for
on 01/09/2009 02:42 PM Yasir Kaheil wrote:
hi all,
how can I create sequences that start from a known vector, say x1 and end
with another say x2- also suppose all the sequences will be the same length.
I don't want to use a for loop
x1-c(1,2,3,4); x2-(3,4,5,6);
what I want is
1 2 3 4
2 3
Great! thank you so much!
Dimitris Rizopoulos-4 wrote:
one way is using mapply(), e.g.,
mapply(:, 1:4, 3:6)
I hope it helps.
Best,
Dimitris
Yasir Kaheil wrote:
hi all,
how can I create sequences that start from a known vector, say x1 and end
with another say x2- also
Duncan Murdoch wrote:
I'm curious about something: does file extension have a standard
definition? Most (all? I haven't tried them all) of the solutions
presented in this thread would return an empty string for the plain
base if given the filename .bashrc.
right; there's a
Rau, Roland wrote:
P.S. Any suggestions how to become more proficient with regular
expressions? The O'Reilly book (Mastering...)? Whenever I tried
anything more complicated than basic usage (things like ^ $ * . ) in R,
I was way faster to write a new function (like above) instead of finding
Hi Thomas
Rather than getting into the details of libcurl options
which are quite general and very flexible, I thought
it was easier to write an explicit ftpUpload() function
that takes care of the details.
You need a new version of the package (as it contains the function and
a small change
Dear Barry,
In Dante's Divine Comedy the sequels were the Purgatorio and the Paradiso;
the analogy suggests that there may be a way out of R Hell (and actually
Patrick provides the way out right in his Inferno -- thanks Patrick!).
Regards,
John
-Original Message-
From:
On Fri, Jan 9, 2009 at 4:20 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Duncan Murdoch wrote:
I'm curious about something: does file extension have a standard
definition? Most (all? I haven't tried them all) of the solutions
presented in this thread would return an
Hi,
Subsequent calls to:
conn - dbConnect(PgSQL(), host=localhost, dbname=xxx, user=xxx)
query - dbSendQuery(conn, query_text)
res - dbGetResult(query)
are resulting in this:
*** glibc detected *** /usr/local/lib/R/bin/exec/R: realloc(): invalid
pointer: 0x0a605de4 ***
=== Backtrace:
On Fri, Jan 9, 2009 at 4:28 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Rau, Roland wrote:
P.S. Any suggestions how to become more proficient with regular
expressions? The O'Reilly book (Mastering...)? Whenever I tried
anything more complicated than basic usage (things
Hi,
Can any one please explain why the following code doesn't work? Or can anyone
suggest an alternative.
Suppose
x-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)
mat-0;
for(j in 1:length(x))
{
for(i in 1:p)
mat[i,j]-x[j]^i;
}
Try this (replace the 0:9 with your values):
distfun - approxfun( c(-Inf,0:9), seq(0,1,length=length(0:9)+1),
method='constant', rule=2)
distfun( c(-1,0,3,3.4,4,12) )
Does that do what you want?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
You may also want to look at the label function (and friends) from the Hmisc
package. This gives a way to use short, correct names for the variables, but
have a longer, more descriptive label to use in plots.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
Try:
mapply( seq, from=1:4, to=7:10 )
[,1] [,2] [,3] [,4]
[1,]1234
[2,]2345
[3,]3456
[4,]4567
[5,]5678
[6,]6789
[7,]789 10
Is that what you want?
--
Gregory (Greg) L. Snow Ph.D.
Very simple questions if anyone can help:
(1) what is the value in saving workspaces, which is offered at every close?
I thought it might save the set up of the GUI but I cant work out what it
does I run a script that loads the packages I need at the start of every
session.
(2) mathematica has
Well, mat doesn't have any dimensions / isn't a matrix, and we don't
know what p is supposed to be. But leaving aside those little details,
do you perhaps want something like this:
x-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)
p - 5
mat- matrix(0, nrow=p, ncol=length(x))
for(j
Hi Glenn,
On Fri, Jan 9, 2009 at 7:20 PM, glenn g1enn.robe...@btinternet.com wrote:
Very simple questions if anyone can help:
(1) what is the value in saving workspaces, which is offered at every close?
I thought it might save the set up of the GUI but I cant work out what it
does I run a
1 - 100 of 113 matches
Mail list logo