Hi KZ,
I don't think that I can answer what I think is the precise question - how
to run the R file from VBA but without using RExcel.
However with RExcel installed, I have found it very straightforward to run R
code from within VBA (thanks Erich Neuwirth - RExcel is great). The VBA
code is:
I have an R file R_test.R saved in C:\R_test folder. The R_test.R looks like
this:
setwd(C:/R_test)
rnorm(100)
write(rnorm(100),data.txt)
q(save=no, runLast = F)
Next I would like use an Excel VBA/macro Shell() function to call R and
execute R_test.R file. The syntax is
Hello all ,
Does any one know how to use the neural networks package for time series
prediction ? Have you a similar example in R language ?
thanks in advance
David
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi James,
I don't know how to solve it with tapply (something with split I
think..), but you could use plyr (from Hadley Wickham).
library(plyr)
# Generate some data
set.seed(321)
myD - data.frame(
Place = sample(c(AWQ,DFR, WEQ), 10, replace=T),
Light = sample(LETTERS[1:2], 15,
On Thu, 8 Apr 2010, James Rome wrote:
I am trying to calculate quantiles of a data frame column split up by
two factors:
# Calculate the quantiles
quarts = tapply(gdf$tt, list(gdf$Runway, gdf$OnHour), FUN=quantile,
na.rm = TRUE)
This does not work:
It seems like it did work. It returned a
I am trying to calculate quantiles of a data frame column split up by
two factors:
# Calculate the quantiles
quarts = tapply(gdf$tt, list(gdf$Runway, gdf$OnHour), FUN=quantile,
na.rm = TRUE)
This does not work:
quarts
04L 04R 15R 22L 22R 2732
33L
Thank you very much for the solutions! :-)
It's my fault, but I forgot to mention that at the end of the loop, I
would like to give
Data back to data1, data2, data3, data4
The eval formula only seems to work in one direction (it's the same with
the get function)
for (i in 1:4) {
Perfekt!
So, the code below does, what I want it does.
for (m in 1:AnzRat) {
Daten_akt - eval(parse(text=paste(Daten,m,_akt,sep=)))
...
...
assign(paste(Daten,m,_akt,sep=),Daten_akt)
}
Patrick Burns schrieb:
I think you are looking for 'assign'.
On 25/03/2010 09:40,
quot;Biedermann, Jürgenquot; wrote:
Perfekt!
So, the code below does, what I want it does.
for (m in 1:AnzRat) {
Daten_akt - eval(parse(text=paste(Daten,m,_akt,sep=)))
...
...
assign(paste(Daten,m,_akt,sep=),Daten_akt)
}
You may want to consider replacing
Hi there,
I have the following problem
Four data frames exist:
data1
data2
data3
data4
Now I want to write a loop and temporarily store the data1, data2,
data3, data4 in a variable called data.
I tried the following...
for (i in 1:4) {
Data - paste(data,i,sep=)
...
..
}
but it doesn't
Try:
for (i in 1:4) {
Data - eval(parse(text = paste(data,i,sep=)))
...
..
}
(and if there are other solutions - I would love to know)
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me:
On Mar 24, 2010, at 9:25 AM, Tal Galili wrote:
Try:
for (i in 1:4) {
Data - eval(parse(text = paste(data,i,sep=)))
...
..
}
(and if there are other solutions - I would love to know)
Well, it's not actually a solution since the first three fetched
values would have been overwritten.
On 24/03/2010 9:25 AM, Tal Galili wrote:
Try:
for (i in 1:4) {
Data - eval(parse(text = paste(data,i,sep=)))
...
..
}
(and if there are other solutions - I would love to know)
The get() function is simpler if you're just retrieving a variable:
Data - get(paste(data, i, sep=))
Duncan
Try this:
Data - lapply(ls(pattern = 'data[0-9]'), get)
Data[[1]] is data1
Data[[2]] is data2
etc.
2010/3/24 Biedermann, Jürgen juergen.biederm...@charite.de:
Hi there,
I have the following problem
Four data frames exist:
data1
data2
data3
data4
Now I want to write a loop and
I am working on rpart, mars and earth.
they all work fine individually.
but i want to use node information generated by rpart in earth or mars.
(mars is sensitive to outliers. CART deals effectively with outliers.)
is there any way to perform this?
Thanks.
[[alternative HTML version
I am working on rpart, mars and earth.
they all work fine individually.
but i want to use node information generated by rpart in earth or mars.
(mars is sensitive to outliers. CART deals effectively with outliers.)
is there any way to perform this?
Thanks.
[[alternative HTML version
I need use different parameters of distribution for different case to
generate random value, but I use ifelse, the generated value is fixed
without change.
Here is example
data1
y x
1 1 2
2 2 1
3 3 2
4 4 3
5 5 3
6 6 1
7 7 2
8 8 1
9 9 1
10 10 3
11 11 3
12 12 2
I think I figure it out.
ifelse(data1$x==1,rnorm(12,2,1),ifelse(data1$x==2,rnorm(12,-2,1),rnorm(12,110,1)))
Please correct me if I am wrong. Thanks
--
View this message in context:
http://n4.nabble.com/How-to-use-ifelse-to-generate-random-value-from-a-distribution-tp1597064p1597102.html
alex46015 wrote:
I think I figure it out.
ifelse(data1$x==1,rnorm(12,2,1),ifelse(data1$x==2,rnorm(12,-2,1),rnorm(12,110,1)))
Where is the number 12 coming from? Is that the length of data1$x?
Here is a sample using the fact that rnorm can accept vectors of means
and sds. My x is
Thanks for all you guys' help above.
Â
Actually my question is for Multivariate Normal
Â
m1-c(2.5,3.5,4.5)
m2-c(-3,-4,-5)
m3-c(100,120,130)
n1-length(data$x)
sigma1-matrix(c(1,0.3,0.4,0.3,1,0.2,0.4,0.2,1),nrow=3,byrow=T)
Â
I would like to be able to use two functions; qansari and pansari
which are found in the
function ansari.test. How can I evaluate these functions
independently? Thanks. --Dale
For example, when I load the function ...
qansari - function(p, m, n) {
.C(R_qansari,
Dale Steele wrote:
I would like to be able to use two functions; qansari and pansari
which are found in the
function ansari.test. How can I evaluate these functions
independently? Thanks. --Dale
For example, when I load the function ...
qansari - function(p, m, n) {
Dale Steele wrote:
methods(ansari.test)
stats:::ansari.test.default
the two functions that are part of ansari.test.default:
qansari - function(p, m, n) {
.C(R_qansari, as.integer(length(p)), q = as.double(p),
as.integer(m), as.integer(n))$q
Thanks, when I modify the function as I think you suggest, I get the
following error:
qansari - function(p, m, n) {
.C(R_qansari, as.integer(length(p)), q = as.double(p),
as.integer(m), as.integer(n))$q
}
qansari( 0.025, 5, 5)
Error in
Try: stats:::R_pansari
Hadley
On Wed, Feb 24, 2010 at 7:55 PM, Dale Steele dale.w.ste...@gmail.com wrote:
Thanks, when I modify the function as I think you suggest, I get the
following error:
qansari - function(p, m, n) {
.C(R_qansari, as.integer(length(p)), q =
Dear R helpers
I have written some function (the actual code I have pasted at the end of mail)
like say
indiv_rate = function(n, rate_name, rate, rate_rf1, rate_rf2, rate_rf3,
rateprob1, rateprob2, rateprob3)
{
some R commands
return(data.frame(rate_name, rates = round(rate_data,
On Fri, Feb 19, 2010 at 8:20 AM, Madhavi Bhave madhavi_bh...@yahoo.com wrote:
rates = indiv_rate(n = read.csv('number.csv')$n, rate_name =
read.csv('rate.csv')$rate_name, rate = read.csv('rate.csv')$rate, rate_rf1 =
read.csv('rate_rf.csv')$rate_rf1,
rate_rf2 =
f=function(){ print('in f')}
attr(f, 'source')
[1] function(){ print('in f')}
I have the above simple function. I can use the variable f to refer to
the function and get the function source.
Suppose that I have 'f' as a string (say I get it from ls()), could
somebody let me know how to get the
Hint:
somebody let me know how to get the function from
the name 'f'?
__
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
See the FAQ for your question. In addition make sure you read about
the keep.source option on the ?options page to find out the
situation in which attr(f, source) will or will not work.
On Thu, Feb 11, 2010 at 5:26 PM, blue sky bluesky...@gmail.com wrote:
f=function(){ print('in f')}
attr(f,
Don't really understand what you have in mind, but maybe this will do it.
f - function(x=3) x^2
Now, if I want to get the function f, given that I only know its
name f, I can do this:
getf - get('f')
getf(4)
Or even:
get('f')(5)
[1] 25
Also,
attributes(getf)
$source
[1]
Dear all,
I just know how to solve an eaquation by using optim() or nlm(). But, now, I
have three nonlinear equations,
how could we use optim() or nlm() to solve a system of nonlinear equations in
R? Thank you so much.
Sincerely,
Joe
___
Nai-Wei Chen wrote:
I just know how to solve an eaquation by using optim() or nlm(). But, now,
I have three nonlinear equations,
how could we use optim() or nlm() to solve a system of nonlinear
equations in R? Thank you so much.
You don't use general optimize routines to solve a
Hi,
I want to use a character as below in R,
as.character(`X^`R\`S)
[1] `X^`R`S
Warning messages:
1: '\`' is an unrecognized escape in a character string
2: unrecognized escape removed from `X^`R\`S
But I found errors.
Can I use some option in as.character() to change this?
Thanks
Mary
: Friday, January 29, 2010 1:58 PM
To: r-help@r-project.org
Subject: [R] How to use escape characters in a string
Hi,
I want to use a character as below in R,
as.character(`X^`R\`S)
[1] `X^`R`S
Warning messages:
1: '\`' is an unrecognized escape in a character string
2: unrecognized escape removed
On Jan 29, 2010, at 4:58 PM, mary guo wrote:
Hi,
I want to use a character as below in R,
What character?
as.character(`X^`R\`S)
[1] `X^`R`S
Warning messages:
1: '\`' is an unrecognized escape in a character string
2: unrecognized escape removed from `X^`R\`S
nchar(`X^`R\`S)
[1] 7
Hi David, Jorge and everyone else.
I tried loading the file (with the Hebrew columns) on two machines.
On one of them if loaded fine, and on the other it didn't.
I also see a difference with the sessionInfo() of the two machines.
You're advice would be most welcomed.
On both machines I tried the
Hi David,
Thank you for responding, but it didn't work.
I get the following error:
[1] X.
0 rows (or 0-length row.names)
Warning messages:
1: In read.table(http://www.talgalili.com/files/aa.txt;, header = T, :
invalid input found on input connection '
Hello dear R help group,
I am trying to read a .txt file, with Hebrew column names, while keeping the
column names looking well in R - but without success.
I uploaded an example file to:
http://www.talgalili.com/files/aa.txt
And am trying the command:
Hi Tal,
You want the colnames in hebrew? Case not, may be you
can use colnames() to attrib new colnames.
bests
milton
On Fri, Jan 1, 2010 at 4:47 PM, Tal Galili tal.gal...@gmail.com wrote:
Hello dear R help group,
I am trying to read a .txt file, with Hebrew column names, while keeping
Thanks Milton,
But your solution would work for a one time problem, but in case I'd have a
variable with Hebrew in it, or many files to process then your solution
wouldn't scale up.
Thanks anyway :)
Tal
Contact
Details:---
Hi Jorge,
Thank you for the answer, it is a lead.
Though I am unsure as to what to do next with it :)
Here is my session info:
sessionInfo()
R version 2.9.1 (2009-06-26)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
On Jan 1, 2010, at 4:47 PM, Tal Galili wrote:
Hello dear R help group,
I am trying to read a .txt file, with Hebrew column names, while
keeping the
column names looking well in R - but without success.
I uploaded an example file to:
http://www.talgalili.com/files/aa.txt
And am trying the
You might try:
read.table(http://www.talgalili.com/files/aa.txt;, header = T,
fileEncoding = UTF-8, sep = \t)
--
David.
On Jan 1, 2010, at 5:37 PM, Tal Galili wrote:
Hi Jorge,
Thank you for the answer, it is a lead.
Though I am unsure as to what to do next with it :)
Here is my session
Hi hobartlul,
The R-devel mailing list is more appropriate for this sort of
question. You'll probably get the best response there if you include
your own code (that I assume is not running correctly) and ask about
specific errors you're getting---I don't know that anyone has their
own small,
On 12/14/2009 01:35 PM, Gray Calhoun wrote:
Hi hobartlul,
The R-devel mailing list is more appropriate for this sort of
question.
Slightly, but the one mailing list where the question actually fits is
this one :
http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel
Hello everyone
I am currently developing a web based R script editor. My idea is to pass
the R script command as a string into the backend , then use the Rengine
instance to parse the R script command and get the resutls. Do anyone know
how to use Rengine instance to parse a R script String? if
A colleague is interested in modifying the ylim definition for individual
panels of a common bwplot plotting statement.
Is there an approach to modifying the bwplot function to allow for a
dynamic ylim range given different panel factors ?
He is using R 2.6.2 on a Linux distribution running
You can define a custom prepanel function: see the entry for
'prepanel' in ?xyplot
If you just want to set specified ylims in each panel, you can do that
by passing a list to 'ylim'.
2009/12/4 steve_fried...@nps.gov:
A colleague is interested in modifying the ylim definition for individual
On Thu, Dec 3, 2009 at 2:32 PM, Felix Andrews fe...@nfrac.org wrote:
You can define a custom prepanel function: see the entry for
'prepanel' in ?xyplot
If you just want to set specified ylims in each panel, you can do that
by passing a list to 'ylim'.
All this assuming, of course, that
This is probably simple, but I have a hard time finding the solution. Any help
greatly appreciated.
I would like to use the results of
fitdistr(z,densfun=dweibull,start=list(scale=1,shape=1)) for further
processing. How do I assign the values of scale and shape to b and a without
manually
Raymond Wong wrote:
This is probably simple, but I have a hard time finding the solution. Any help
greatly appreciated.
I would like to use the results of fitdistr(z,densfun=dweibull,start=list(scale=1,shape=1)) for further processing. How do I assign the values of scale and shape to b and
On Nov 20, 2009, at 1:47 PM, Peter Ehlers wrote:
Raymond Wong wrote:
This is probably simple, but I have a hard time finding the
solution. Any help greatly appreciated.
I would like to use the results of
fitdistr(z,densfun=dweibull,start=list(scale=1,shape=1)) for
further processing.
Quite right, David. I forgot to indicate that MASS needs of course
to be loaded. It's such a useful package that I usually have it
loaded.
Raymond:
When you ask for help with a function in an add-on package
you should indicate that package in your query.
-Peter Ehlers
David Winsemius wrote:
Le lundi 16 novembre 2009 à 13:14 +0800, sdlywjl666 a écrit :
Dear All,
How to use SQL code in R?
Depends on what you mean by using SQL code in R...
If you mean Query, update or otherwise mess with an existing database,
look at the RODBC packages and/or various RDBI-related packages (hint :
Dear All,
How to use SQL code in R?
Thanks!
[[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
I am writing a rd doc, and need to use # in a url adress. This would make:
\url{http://www..org/myfolder/#myanchor}
Of course, I suppose this will not work because # is a special character
starting a comment line in the rd dialect. I did not found a similar
example in Writing R exentions.
von Patrick Giraudoux
Gesendet: Wednesday, November 11, 2009 12:15 PM
An: r-help@r-project.org
Betreff: [R] how to use # in a rd doc in url address
I am writing a rd doc, and need to use # in a url adress. This would make:
\url{http://www..org/myfolder/#myanchor}
Of course, I suppose
Betreff: [R] how to use # in a rd doc in url address
I am writing a rd doc, and need to use # in a url adress. This would make:
\url{http://www..org/myfolder/#myanchor}
Of course, I suppose this will not work because # is a special character
starting a comment line in the rd dialect. I did
On 11/11/2009 12:15 PM, Patrick Giraudoux wrote:
I am writing a rd doc, and need to use # in a url adress. This would make:
\url{http://www..org/myfolder/#myanchor}
That should work.
Of course, I suppose this will not work because # is a special character
starting a comment line in the
Duncan Murdoch a écrit :
On 11/11/2009 12:15 PM, Patrick Giraudoux wrote:
I am writing a rd doc, and need to use # in a url adress. This
would make:
\url{http://www..org/myfolder/#myanchor}
That should work.
Of course, I suppose this will not work because # is a special
character
Patrick Giraudoux a écrit :
Duncan Murdoch a écrit :
On 11/11/2009 12:15 PM, Patrick Giraudoux wrote:
I am writing a rd doc, and need to use # in a url adress. This
would make:
\url{http://www..org/myfolder/#myanchor}
That should work.
Of course, I suppose this will not work because #
Hi guys,
I am a totally begginer with R. I am planning to use R to design and
optimize my experiment. The experiment includes 4 factors, and three of the
fators have 3 levels, and the last factor has 6 levels. I am having a really
hard time to learn this program on my own and didn't find
Dear All,
I have temperature series for 10 different sea levels, where there are 3000
observations for each level. I am planning to use multiple time
series modelling on these series, with/ without correlation structure for the
residuals.
Is there any package that can be used to do this
On Fri, 2009-10-02 at 00:42 +, KABELI MEFANE wrote:
Thanks
But it seems like you don't get my problem.Do you mean that there is
something wrong with the code as it seems like what you are doing is
suggesting different ways to write a code.
Will i get to use the variable that have
to shorten this code.
Thanks once again you really helped a lot.Thanks
--- On Fri, 2/10/09, Bernardo Rangel Tura t...@centroin.com.br wrote:
From: Bernardo Rangel Tura t...@centroin.com.br
Subject: Re: [R] How to use Subpopulation data?
To: KABELI MEFANE kabelimef...@yahoo.co.uk
Cc: R-help@r
On Oct 1, 2009, at 6:06 AM, KABELI MEFANE wrote:
Dear Helpers
I have a sample frame and i have sampled from it using three methods
and now i want to calculate the statistics but i only get the
population parameters.
H - matrix(rnorm(100, mean=5, sd=5000))
)
sample.strat
Thanks for the input. Once again sorry for wasting your time.
Best Regards
--- On Fri, 2/10/09, David Winsemius dwinsem...@comcast.net wrote:
From: David Winsemius dwinsem...@comcast.net
Subject: Re: [R] How to use Subpopulation data?
To: KABELI MEFANE kabelimef...@yahoo.co.uk
Cc: R
)
sample.strat-getdata(sampleframe,str)
sample.strat
Thanks for the input. Once again sorry for wasting your time.
Best Regards
--- On Fri, 2/10/09, David Winsemius dwinsem...@comcast.net wrote:
From: David Winsemius dwinsem...@comcast.net
Subject: Re: [R] How to use Subpopulation data
] How to use Subpopulation data?
To: KABELI MEFANE kabelimef...@yahoo.co.uk
Cc: R-help@r-project.org
Date: Friday, 2 October, 2009, 3:38 PM
On Oct 1, 2009, at 6:06 AM, KABELI MEFANE wrote:
Dear Helpers
I have a sample frame and i have sampled from it using three
methods and now i want
Dear Helpers
I have a sample frame and i have sampled from it using three methods and now i
want to calculate the statistics but i only get the population parameters.
H - matrix(rnorm(100, mean=5, sd=5000))
sampleframe=data.frame(type=c(rep(H,100)),value=c(H))
sampleframe
On Thu, 2009-10-01 at 10:06 +, KABELI MEFANE wrote:
Dear Helpers
I have a sample frame and i have sampled from it using three methods and now
i want to calculate the statistics but i only get the population parameters.
H - matrix(rnorm(100, mean=5, sd=5000))
, 1/10/09, Bernardo Rangel Tura t...@centroin.com.br wrote:
From: Bernardo Rangel Tura t...@centroin.com.br
Subject: Re: [R] How to use Subpopulation data?
To: KABELI MEFANE kabelimef...@yahoo.co.uk
Cc: R-help@r-project.org
Date: Thursday, 1 October, 2009, 11:24 AM
On Thu, 2009-10-01 at 10:06
?
--- On Thu, 1/10/09, Bernardo Rangel Tura t...@centroin.com.br wrote:
From: Bernardo Rangel Tura t...@centroin.com.br
Subject: Re: [R] How to use Subpopulation data?
To: KABELI MEFANE kabelimef...@yahoo.co.uk
Cc: R-help@r-project.org
Date: Thursday, 1 October, 2009, 11:24 AM
On Thu, 2009-10-01
Thanks
i was not aware of str, i have a very large code since i am new to r.
I forgot to mention that the package is sampling. Actually i have this
simulated code:
n - c(100,400,1000,1500,2000)
x - c(2,3,3,3,5)
y - c(7,7,9,10,10)
s - function(mn, mx, n) {sample(mn:mx, n, replace=TRUE)}
: Re: [R] How to use Subpopulation data?
To: Peter Ehlers ehl...@ucalgary.ca
Cc: R-help@r-project.org, Bernardo Rangel Tura t...@centroin.com.br
Date: Thursday, 1 October, 2009, 2:34 PM
Thanks
i was not aware of str, i have a very large code since i am new to r.
I forgot to mention
On Thu, 2009-10-01 at 13:34 +, KABELI MEFANE wrote:
## package sampling
stra=strata(sampleframe,c(type,value,rating),size=c(20,80,200,300,400),
method=srswor)
sample.strat-getdata(sampleframe,stra)
sample.strat
Try:
stra-strata(sampleframe,size=c(20,80,200,300,400),method=srswor)
t...@centroin.com.br wrote:
From: Bernardo Rangel Tura t...@centroin.com.br
Subject: Re: [R] How to use Subpopulation data?
To: r-help r-h...@stat.math.ethz.ch
Date: Thursday, 1 October, 2009, 10:18 PM
On Thu, 2009-10-01 at 13:34 +, KABELI MEFANE wrote:
## package sampling
stra=strata
Thanks Gabor, but my problem isn't finding reasonable starting parameter
values, it's preventing nls giving up when it tries parameter values
resulting in NA or Inf.
I know queries are often over-specific and the appropriate response is
don't start there, so I'm trying to balance between
With good starting values it often won't need to try anything outside
feasible region.
If after trying better starting values you find that that it is still
attempting to move outsie the feasible region then another approach is
to use the boundary value plus some monotonic function of the
Hi Everyone,
I posted this a couple of weeks ago with no responses. My interface (via
gmane) seemed a bit flakey at the time, so I'm venturing to repost with some
additional information.
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of
With a small number of parameters just use brute force on grid
to calculate starting values. See nls2 package.
On Mon, Sep 21, 2009 at 12:17 PM, Keith Jewell k.jew...@campden.co.uk wrote:
Hi Everyone,
I posted this a couple of weeks ago with no responses. My interface (via
gmane) seemed a
Thanks that makes sense. Just a newby to spatial data in R. Thanks.
Roger Bivand wrote:
First re-read the definition of what a SpatialPixels object is -
?SpatialPixels-class - note that it says: class for defining a pixels,
forming a possibly incomplete rectangular grid of arbitrary
Please read the last line to every message on r-help and note the
request to provide reproducible code.
Anyways, try this:
Lines - Field1 Field2 Field3 Field4 ResultField
1231CA TRUE443TRUE
23231 NC TRUE123FALSE
1231CAFALSE243
Thank you very much, it works cool!
On Tue, Aug 18, 2009 at 9:38 AM, Gabor
Grothendieckggrothendi...@gmail.com wrote:
Please read the last line to every message on r-help and note the
request to provide reproducible code.
Anyways, try this:
Lines - Field1 Field2 Field3 Field4
This seems pretty basic, but I can't get any data to work except for the
documented examples. When the goal is to get to SpatialPixels, here is what
I see...
x - runif(10,1,10)
y - runif(10,1,10)
z - rnorm(10,0,1)
MyData - as.data.frame(cbind(x,y,z))
library(gstat)
coordinates(MyData) -
Say I have a csv file, each row contains several fields, one of them
are whether the row is success.
In history data, I have all the fields including the result of whether
it is success. In future data, I only have fields without the result.
For example:
history data:
Field1 Field2 Field3
@r-project.org
Betreff: [R] How to use R to perform prediction based on history data
Say I have a csv file, each row contains several fields, one of them are
whether the row is success.
In history data, I have all the fields including the result of whether it is
success. In future data, I only
Dear R-helpers:
I have a question related to using do.call to call cbind and get.
#the following works
vec1 - c(1,2)
vec2 - c(3,4)
ColNameVec - c('vec1','vec2')
mat - do.call(cbind,lapply(ColNameVec,get))
mat
#put code above into a function then it does not work
#before doing so, first remove
Use lapply(ColNameVec, get, environment())
so that it gets the objects from the current
environment. See: ?get ?environment
On Sun, Jul 26, 2009 at 11:16 PM, Sean Zhangseane...@gmail.com wrote:
Dear R-helpers:
I have a question related to using do.call to call cbind and get.
#the following
I want to use read.table to input many files, each for a different year. I
would like to use the macro variable 't' to refer to the exact file that I
would like to input the data using read.table. How could I do this? Thank
you!
for (t in 1970:2005)
{ edge - read.table(file=edge_t.csv,
Hi,
On Jul 22, 2009, at 5:46 PM, kxk wrote:
I want to use read.table to input many files, each for a different
year. I
would like to use the macro variable 't' to refer to the exact file
that I
would like to input the data using read.table. How could I do
this? Thank
you!
for (t in
On Jul 22, 2009, at 5:46 PM, kxk wrote:
I want to use read.table to input many files, each for a different
year. I
would like to use the macro variable 't' to refer to the exact file
that I
would like to input the data using read.table. How could I do
this? Thank
you!
for (t in
Dear kxk,
Here are a couple of options:
# Option 1 -- sapply
mydata - sapply(1970:2005, function(i){
mydata - read.table(file = paste(edge_, i, .csv,
sep=), header=TRUE)
# more code goes here
}
)
Please note that
I issued the following command to obtain the std dev for each month.
psd-numSummary(Sal, groups=month, statistics=c(sd))
which resulted in
psd
sd n NA
1 6.930340 9367 2319
2 7.847003
Graves, Gregory wrote:
I issued the following command to obtain the std dev for each month.
psd-numSummary(Sal, groups=month, statistics=c(sd))
numSummary is not in base R, is it? If not, which package? Please read
the posting guide! Please provide reproducible code (we do not have
Hi
r-help-boun...@r-project.org napsal dne 21.07.2009 14:37:35:
Graves, Gregory wrote:
I issued the following command to obtain the std dev for each month.
psd-numSummary(Sal, groups=month, statistics=c(sd))
numSummary is not in base R, is it? If not, which package? Please
to the data.frame and then plotting
psd - xx
psd[,4] - 1:12
names(psd)[4] - months
plot(sd~months, data=psd)
--- On Tue, 7/21/09, Graves, Gregory ggra...@sfwmd.gov wrote:
From: Graves, Gregory ggra...@sfwmd.gov
Subject: [R] how to use a list to create a plot
To: r-help@r-project.org
Received
It looks like Biostrings function writeFASTA overwrites the output file at
each run.
It seems it does not support the append parameter.
I have to generate one big file gathering a miRNA identifier and relative
sequence followd by a variable number of dara records pertaining such a miRNA
2009/7/2 Peter Dalgaard p.dalga...@biostat.ku.dk:
Mark Wardle wrote:
[...]
Otherwise, it sounds like a recipe for obfuscation! What are you
trying to do really?
Not really obfuscation, there are legitimate reasons to want this sort of
behaviour. See demo(scoping) for a related example
401 - 500 of 564 matches
Mail list logo