hi friends,
I am new to R.I would like to know R-PLUS.Does any know where can
I get the free training for R-PLUS.
Regards,
Peng.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http:
On Jan 30, 2010, at 12:46 AM, Abhishek Pratap wrote:
I exactly know my problem. The read.table by default reads my data
from few columns as factors/character type. Can you please give me an
example of how to force it to read these columns as numbers. I dont
see example of how to use (as.is)
On Fri, 29 Jan 2010, Dimitri Shvorob wrote:
I am looking for a function that, when supplied a vector of floats x, an
integer n, and float s, would find me an n-subset of x with the sum closest
to s. Can anyone point me to a package/function that can do the job - better
yet, provide a relevant
I exactly know my problem. The read.table by default reads my data
from few columns as factors/character type. Can you please give me an
example of how to force it to read these columns as numbers. I dont
see example of how to use (as.is)
Thanks!
-Abhi
On Sat, Jan 30, 2010 at 12:34 AM, Abhishek
I see what is happening here. When I am reading the data frame values
from a csv file, they are not read as numerics.
_A
On Sat, Jan 30, 2010 at 12:29 AM, Abhishek Pratap
wrote:
> Hi All
>
> I am seeing quite a silly thing for which I dont have much of
> explanation. I want to take per row mean
Hi All
I am seeing quite a silly thing for which I dont have much of
explanation. I want to take per row mean of 3 columns of a data frame.
What I am getting is all NA in the result. Here is what I am doing
apply(a[,1:3],1,mean)
I get warnings.
In mean.default(newX[, i], ...) :
argument i
On 01/30/2010 10:29 AM, Jose Narillos de Santos wrote:
Hi Jim,
Last question.
I´m using a spanish version (there are some documents on how
constructing good plots and I have found them althought not very
intuitive...) I will read them in a next days.
Only if you know the way.
Imagine I have made
In package tree, users can use predict(model,data,type="where") to find out
which terminal node the observation belongs to. I can't seem to find a similar
function in package rpart. Is there any way to find out the same information
using rpart?
Thanks!
Yin Luo
[[alternative HT
Given vector of numbers x, I wish to select an n-subset with sum closest to
fixed value s. Can anyone advise me how to approach this, in R?
I have considered Rcplex package, which handles integer/binary
linear/quadratic optimization problems, but have difficulty setting up the
quadratic form for
I have a data frame with integers mixed with a lot of NULLs, how do I convert
that to multiple lists of integers with zero (to replace NULL)? I tried the
following, and they failed:
> dim(g2)
[1] 25352 173
> class(g2)
[1] "data.frame"
> class(g2[1,])
[1] "data.frame"
> g2[1,30:40]
30
I am looking for a function that, when supplied a vector of floats x, an
integer n, and float s, would find me an n-subset of x with the sum closest
to s. Can anyone point me to a package/function that can do the job - better
yet, provide a relevant code sample? (There are a few relevant packages
On Fri, 29 Jan 2010, Andrew Rominger wrote:
Being reasonably sure that all valid permutations are equally probable is
important to me. I've played around with search algorithms in permuting
contingency tables and find that possible solutions decrease rapidly once
one starts assigning values, pa
Hello,
I am a new R user and trying to learn how to implement the mahalanobis
function to measure the distance between to 2 population centroids. I
have used STATISTICA to calculate these differences, but was hoping to learn
to do the analysis in R. I have implemented the code as below, but my
re
On Jan 29, 2010, at 6:58 PM, Zoppoli, Gabriele (NIH/NCI) [G] wrote:
Hi all,
if I transpose a matrix with t(data), the newly created colums do
not appear to have the first row as header. How can I do to have all
the newly created columns have their first row as a header?
The term "header"
Being reasonably sure that all valid permutations are equally probable is
important to me. I've played around with search algorithms in permuting
contingency tables and find that possible solutions decrease rapidly once
one starts assigning values, particularly if small values are assigned
first,
Hi all,
if I transpose a matrix with t(data), the newly created colums do not appear to
have the first row as header. How can I do to have all the newly created
columns have their first row as a header?
Thanks
Gabriele Zoppoli, MD
Ph.D. Fellow, Experimental and Clinical Oncology and Hematolog
On Jan 29, 2010, at 6:53 PM, anna wrote:
Well I just tried to convert it with data.frame and then data.matrix
and it
returned me a numeric vector but I am not done yet, let's see if it
works,
if it doesn't I will try sapply. I think I didn't use sapply because
the
vectors I am using in
On Jan 29, 2010, at 6:35 PM, David Winsemius wrote:
On Jan 29, 2010, at 6:16 PM, Cat Morning wrote:
Hi all,
I want to write a function to create multiple lists (over 100
lists). For example:
for(i in 1:5)
pi = c(1:5)
Try:
p <-list()
for(i in 1:5)
p[[i]] = 1:5
You can reference the thi
Well I just tried to convert it with data.frame and then data.matrix and it
returned me a numeric vector but I am not done yet, let's see if it works,
if it doesn't I will try sapply. I think I didn't use sapply because the
vectors I am using in lapply are of different lengths.
-
Anna Lippel
Peter,
I should have added that because I have over dispersion, I am ruining a
quasipoisson regression.
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GR
On Jan 29, 2010, at 6:16 PM, Cat Morning wrote:
Hi all,
I want to write a function to create multiple lists (over 100
lists). For example:
for(i in 1:5)
pi = c(1:5)
Try:
p <-list()
for(i in 1:5)
p[[i]] = 1:5
You can reference the third elements of the first vector as:
p[[1]][3]
but
On Jan 29, 2010, at 6:14 PM, anna wrote:
Bill this is exactly what is happening, by using lapply I am having
a list
and not a numeric vector, I want a numeric vector, is there a way to
convert
that list to a numeric vector?
You could see if substituting sapply would yield a matrix. It w
Hi Jim,
Last question.
I´m using a spanish version (there are some documents on how constructing
good plots and I have found them althought not very intuitive...) I will
read them in a next days.
Only if you know the way.
Imagine I have made a plot like plot(x,y)
and I use labels (on each cros
John Sorkin wrote:
windows XP
R 2.10
When computing the variance of a linear combination of the
coefficients from a Poisson regression (i.e. glm with log link and
offset) should one use the scaled or unscaled covariance matrix? For a
simple linear regression (i.e. lm), I believe we use the u
Hi all,
I want to write a function to create multiple lists (over 100 lists). For
example:
for(i in 1:5)
pi = c(1:5)
but when i type:
p2
i get the error
Error: object 'p2' not found
I want the lists to be numbered in this fashion, because I want to create
another function that goes something
Bill this is exactly what is happening, by using lapply I am having a list
and not a numeric vector, I want a numeric vector, is there a way to convert
that list to a numeric vector?
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Simple-question-on-replace-a-matrix-row-
Dennis, as soon as I do : > mat3[1, ] <- mat1 and class(mat3) I get a list
and not a matrix anymore...So yes you drove me to the problem, mat1 is not
one-row numeric matrix but a list.
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Simple-question-on-replace-a-matrix-
David, I think I am going close to the problem, at the end of the function
ComputeSignalReturns I build the matrix summary with cbind. So when I make
class(summary) I get "matrix" but when I make class(summary[1,]) I get
"list"
Excuse me if I didn't show the problem the right way, I am still new a
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]
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of anna
> Sent: Friday, January 29, 2010 2:46 PM
> To: r-help@r-project.org
> Subject: Re: [R] Simple question on replace
Please read R FAQ 7.37.
You need to escape the backslash:
> z<- as.character("`X^`R\\`S")
> z
[1] "`X^`R\\`S"
> cat(z)
`X^`R\`S
Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of mary guo
On Jan 29, 2010, at 4:54 PM, anna wrote:
I was trying to avoid the code because I wanted to simplify it but
here we
go:
mat2<- matrix(nrow = 30, ncol = 7)
colnames(mat2) <-c( "A", "B", "C", "D", "E", "F", "G")
mat1<-mainMat[1,]
I get mainMat[1,] from the following function:
Comput
What I did now is that I checked the class of both matrix before assigning
the first row of mat2:
class(mainMat) --> "matrix"
class(mainMat[1,]) --> "list"
class(mat2) --> "matrix"
mat2[1,]<-mainMat[1,]
class(mat2) --> "list"
I think the problem comes from mainMat[1,] that should be of class "mat
Inline below...
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Friday, January 29, 2010 2:12 PM
To: Bert Gunter
Cc: Jennifer Young; r-help@r-project.org
Subject: Re: [R] evaluating expressions with sub expressions
If its good enough to have one level o
Hi,
I've lost my mind on it... I have to scatterplot two vectors, grouped by a
third variable, with two different dimensions according to whether each cell
line in the plot is sensitive or resistant to a given drug, and with a
different color for each of 9 tissues of origin.
Here's what I've
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
If its good enough to have one level of substitution then esub in my
post (originally due to Tony Plate -- see reference in my post) is all
that is needed:
esub(mat[[2]], list(g1 = g1[[1]]))
but I think the real problem could require multiple levels of
substitution in which case repeated applicat
Hi All,
I am working on an example where the electric utility is investigating the
effect of size of household and the type of air conditioning on electricity
consumption. I fit a multiple linear regression
Electricity consumption=size of the house hold + air conditioning type
There are 3 air
Hello,
I am pretty new to R. I am working on neural network classifiers and I am
feeding the nnet input from different regions of interest (fMRI data). The
script that I am using is this:
library (MASS)
heap_lda <-
data.frame(as.matrix(t(read.table(file="R_10_5runs_matrix9.txt")))*10,syll
=
You asked
And is there a yet simpler and more
straightforward way to do the
above than what I proposed?
You could use S+, whose substitute() function
(a) descends into expressions and functions
(b) has an argument (evaluate=TRUE) so you
don't need to use do.call when the fir
Hi,
For those who are interested in the solution to this problem, I modified
the cairoDevice driver (version 2.10) so that it is now
resolution-aware. The owner of the package will probably include my
changes in his next release, but if in the meantime you would like to
use the modified vers
Hi,
On 1/29/10 12:58 PM, Murat Tasan wrote:
problem is, i haven't been able to do this yet.
my workaround is to constantly swap into myRPackage/libs/ directory a
version of the shared object library called myRPackage.so, and load it
via the useDynLib(...) directive in the NAMESPACE file of the
I was trying to avoid the code because I wanted to simplify it but here we
go:
mat2<- matrix(nrow = 30, ncol = 7)
colnames(mat2) <-c( "A", "B", "C", "D", "E", "F", "G")
mat1<-mainMat[1,]
I get mainMat[1,] from the following function:
ComputeSignalReturns <- function(vec1
__
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.
Hi:
Check the class and dimensions of your objects. If mat1 is either
an eight element numeric vector or a one-row matrix, you should
have no problem:
> mat1 <- 1:8 # vector
> mat2 <- matrix(rnorm(240), nrow =30)
> class(mat1)
[1] "integer"
> class(mat2)
[1] "matrix"
> mat3 <- mat2
> mat3
Folks:
Stripped to its essentials, Jennifer's request seemed simple: substitute a
subexpression as a named variable for a variable name in an expression, also
expressed as a named variable. A simple example is:
> e <- expression(0,a*b)
> z1 <- quote(1/t) ## explained below
The task is to "substi
On Jan 29, 2010, at 4:33 PM, anna wrote:
Here is how I get mat1: I have a matrix mainMat of 4 rows and 8
columns, I
take the first row of it to build mat1. The problem might come from
how I
build mainMat --> each column comes from an lapply function which
returns a
list but I convert i
Here is how I get mat1: I have a matrix mainMat of 4 rows and 8 columns, I
take the first row of it to build mat1. The problem might come from how I
build mainMat --> each column comes from an lapply function which returns a
list but I convert it to a matrix [4,1]...
-
Anna Lippel
--
View t
I convert them both before making matrix() on them. Let me try to send you
more details
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Simple-question-on-replace-a-matrix-row-tp1427857p1430130.html
Sent from the R help mailing list archive at Nabble.com.
__
windows XP
R 2.10
When computing the variance of a linear combination of the coefficients from a
Poisson regression (i.e. glm with log link and offset) should one use the
scaled or unscaled covariance matrix? For a simple linear regression (i.e. lm),
I believe we use the unscaled matrix; for Po
A example:
set.seed(123)
m <- matrix(rnorm(12), 3)
myParam <- rowMeans(m)
sweep(m, 1, myParam, FUN = "-")
This subtracts the myParam value in each column.
On Fri, Jan 29, 2010 at 6:59 PM, anna wrote:
>
> I had a quick look at the sweep function but didn't find a solution in it, I
> am going to
On Jan 29, 2010, at 3:55 PM, anna wrote:
Hello, I have a matrix mat1 of dim [1,8] and mat2 of dim[30,8], I
want to
replace the first row of mat2 with mat1, this is what I do:
mat2[1,]<-mat1 but it transforms mat2 in a list I don't understand,
I want
it to stay a matrix...
What makes yo
Try this also:
pmin(data.set[,1:100], data.set[,101:200])/colSums(data.set[,101:200])
On Fri, Jan 29, 2010 at 2:25 PM, Thiem Alrik wrote:
> Dear Mailing List Members,
>
> the problem I've been grappling with für quite some time now is the following:
>
> I have a 100 rows x 200 columns matrix.
I had a quick look at the sweep function but didn't find a solution in it, I
am going to look at it again then.
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Applying-a-function-on-each-columns-of-a-matrix-tp1415660p1428193.html
Sent from the R help mailing list archiv
hi all, i posted a question before about this, but i may have been too
cryptic to understand.
in short, there exists an R package that someone is writing. this
package depends on a custom library (written in C,), compiled as a
shared, and called by the package's functions via the .Call(...)
metho
Hello, I have a matrix mat1 of dim [1,8] and mat2 of dim[30,8], I want to
replace the first row of mat2 with mat1, this is what I do:
mat2[1,]<-mat1 but it transforms mat2 in a list I don't understand, I want
it to stay a matrix...
-
Anna Lippel
--
View this message in context:
http://n4.na
On Jan 29, 2010, at 11:25 AM, Thiem Alrik wrote:
Dear Mailing List Members,
the problem I've been grappling with für quite some time now is the
following:
I have a 100 rows x 200 columns matrix.
data.set <- matrix(rnorm(2, 100, 200))
I am guessing that you wanted to type:
data.set <
Hi:
Using an inelegant loop...
df <- matrix(rnorm(2), 100, 200)
res <- numeric(100)
for (i in 1:100)
res[i] <- sum(pmin(df[, i], df[, 100 +i]))/sum(df[, 100 + i])
res
HTH,
Dennis
On Fri, Jan 29, 2010 at 8:25 AM, Thiem Alrik wrote:
> Dear Mailing List Members,
>
> the problem I've been gr
Here is one approach:
library(MASS)
cor1 <- diag(2)
cor1[1,2] <- cor1[2,1] <- 0.5
cor2 <- cor1
cor2[1,2] <- cor2[2,1] <- 0.9
sd <- c(5,20)
mns <- c(50, 100)
cov1 <- diag(sd) %*% cor1 %*% diag(sd)
cov2 <- diag(sd) %*% cor2 %*% diag(sd)
one <- mvrnorm(100, mns, cov1, empirical=TRUE)
two <- mvrn
The problem there is that the function he is interested in (HWidentify) was
added in version 2.5 of TeachingDemos, so going back to 2.4 does not give the
help he wants.
Another option for getting help is to download the pdf file from your local
CRAN mirror. It has the help pages for all the fu
Hi,
I developed my program using SVM from R language and using some datasets from
machine learning repository (UCI).
Can anyone please tell me how I can get the results of any other machine
learning algorithm that uses the same datasets in order to compare these
results with my results?
Thanks again, Dennis and Petr!
The solution using the plyr package was perfect:
ddply(data, .(id, mod1), summarize, es = mean(es), mod2 = head(mod2, 1))
Take care,
AC
On Thu, Jan 28, 2010 at 11:26 PM, Petr PIKAL wrote:
> Hi
>
> r-help-boun...@r-project.org napsal dne 28.01.2010 17:40:01:
>
>
On Fri, Jan 29, 2010 at 10:04 AM, Craig P. Pyrame wrote:
> Dear R-ers,
>
> I am using getGEO to download expression data from the Gene Expression
> Omnibus. With default settings, when a file is downloaded and parsed, lots
> of dotted lines are printed in the terminal, like this:
>
> .. ..
Dear Mailing List Members,
the problem I've been grappling with für quite some time now is the following:
I have a 100 rows x 200 columns matrix.
data.set <- matrix(rnorm(2, 100, 200))
Now I would like to get a vector of length 100 which collects the values from
the following procedure:
T
Hi
I am working with spgrass6 package and GRASS v.6.2. Everything was
fine until I tryed to read a vector file with readVECT6 (and other
related vector commands, like vInfo). When I ran these commands, the
problem immediately appeared (" Sorry, is not a valid flag" ).
Ok, the solution
Thank you, that worked great!
Sean
Peter Alspach wrote:
Tena koe Sean
I suspect the apply() and merge() functions are working, but they may
not be doing what you expect :-) You could try rbind() and aggregate():
data.frame1$HAD <- as.numeric(NA)
data.both <- rbind(data.frame1, data.fram
Hi,
what I would need are 2 vector pairs (x,y) and (x1,y1). x and x1 must have
the same sd. y and y1 should also exhibit the same sd's but different ones
as x and x1. Plotting x,y and x1,y1 should produce a plot with 2 vectors
having a different slope. Plotting both vector pairs in one plot with
Loris Bennett writes:
> Hi,
>
> I have a list of dates like this:
>
> date
> 2009-12-03
> 2009-12-11
> 2009-10-07
> 2010-01-25
> 2010-01-05
> 2009-09-09
> 2010-01-19
> 2010-01-25
> 2009-02-05
> 2010-01-25
> 2010-01-27
> 2010-01-27
> ...
>
> and am creating a histogram
Dear All,
I have been attempting to save the output from xpose.VPC as a windows
metafile. When I ran vpc on PSN I had 6 groups and would like to output
a single wmf for each graph. When I set max.plots.per.page=1, xpose
turns on recording (page# in top right corner of output) and prints one
grap
Hello,
Im trying to combine 3 affybatches (1x hgu133+2 array and 2x hgu133a array)
Im useing this script:
library(matchprobes)
library(affy)
library(AnnotationDbi)
library(hgu133plus2probe)
library(hgu133aprobe)
library(hgu133a.db)
u133p2 = ReadAffy() # reading hgu133 +2 cel file into affybatch
Dear All,
I am intending to build a package (pksmooth) on Linux to work on
Windows. Some c++ functions need c++ libraries (numerical recipes)
from a static library "libNR.a".
Building the package on Linux for Linux is allright. However, when
sending the 'pksmooth_1.0.tar.gz' to the online Windows
On Jan 29, 2010, at 1:28 PM, Paul wrote:
> I'm currently using r scripts in sweave to grab some data via ODBC, process
> it then generate some tables. I'd like to be able to give someone the files
> and let them reproduce what I've done. Is there some way to store the data
> that is gathered
On 1/29/10 11:45 AM, Duncan Murdoch wrote:
On 29/01/2010 2:28 PM, Paul wrote:
I'm currently using r scripts in sweave to grab some data via ODBC,
process it then generate some tables. I'd like to be able to give
someone the files and let them reproduce what I've done. Is there some
way to store
Duncan Murdoch wrote:
On 29/01/2010 2:28 PM, Paul wrote:
I'm currently using r scripts in sweave to grab some data via ODBC,
process it then generate some tables. I'd like to be able to give
someone the files and let them reproduce what I've done. Is there
some way to store the data that is
On 29/01/2010 2:55 PM, Tobias Verbeke wrote:
Duncan Murdoch wrote:
> On 29/01/2010 2:28 PM, Paul wrote:
>> I'm currently using r scripts in sweave to grab some data via ODBC,
>> process it then generate some tables. I'd like to be able to give
>> someone the files and let them reproduce what I
Dear Michael,
the help system has been rearranged considerably. It is not possible to
use binary packages prepared under R-2.10.x with earlier versions of R.
The other way round is also not a really good idea.
Note also that the most recent version of TeachingDemos (2.5) uses help
markup tha
On 29/01/2010 2:34 PM, Michael Friendly wrote:
[Env: Win Xp]
Is there any options() setting or call to help() or help.start() that
will allow me to view a help file for
a package built under R 2.10.x under R 2.9.2?
I'm using both R 2.9.2 and R 2.10.1, but prefer the former because the
CHM he
On 29/01/2010 2:28 PM, Paul wrote:
I'm currently using r scripts in sweave to grab some data via ODBC,
process it then generate some tables. I'd like to be able to give
someone the files and let them reproduce what I've done. Is there some
way to store the data that is gathered by ODBC so tha
[Env: Win Xp]
Is there any options() setting or call to help() or help.start() that
will allow me to view a help file for
a package built under R 2.10.x under R 2.9.2?
I'm using both R 2.9.2 and R 2.10.1, but prefer the former because the
CHM help is so much easier
to use. Yet, if I install a
Hello -- I posted this question yesterday and for some reason the post seems to
be attached to the wrong thread. Also, I extended my test a little and it seems
to indicate the problem is with spm. I would appreciate any help. Thanks.
==
lib
I'm currently using r scripts in sweave to grab some data via ODBC,
process it then generate some tables. I'd like to be able to give
someone the files and let them reproduce what I've done. Is there some
way to store the data that is gathered by ODBC so that the second person
can recreate th
On 29/01/2010 2:03 PM, Saptarshi Guha wrote:
Dear R Users,
Using codetools I obtained the text representation of the parse tree for this
snippet
z=quote({x[1]<-2})
showTree(z)
> ("{" (<- ([ x 1) 2)) (A)
If I understand correctly, x[1]<-2 ought to be "[<-"(x,1,2), so shouldn't i see
("{"
Dear list members,
I'm tryng to write the code in order to calculate the index (expression 2)
published in Ricotta & Burrascano 2008 (Preslia 80, pp 61-71).
Specifically, I'm having some problems in extending the index for more than
two observations. Does anyone already write a function for such
Dear R Users,
Using codetools I obtained the text representation of the parse tree for this
snippet
z=quote({x[1]<-2})
showTree(z)
> ("{" (<- ([ x 1) 2)) (A)
If I understand correctly, x[1]<-2 ought to be "[<-"(x,1,2), so shouldn't i see
("{" ( [<- x 1 2 ) )
If indeed the parse tree in
The following recursively walks the expression tree. The esub
function is from this page (you may wish to read that entire thread):
http://tolstoy.newcastle.edu.au/R/help/04/03/1245.html
esub <- function(expr, sublist) do.call("substitute", list(expr, sublist))
proc <- function(e, env = parent.f
See sweep function
On Fri, Jan 29, 2010 at 2:32 PM, anna wrote:
>
> Hello everyone, I have the following matrix
> [,1] [,2] [,3] [,4]
> [1,] 0.002809706 0.0063856960 0.0063856960 0.011749681
> [2,] 0.004893124 0.0023118418 -0.0005122951 -0.014646465
>
On Jan 29, 2010, at 1:07 PM, Muhammad Rahiz wrote:
OK, I've got this. The output prints what I want, but I'm not sure
if there will be problems in further analysis because the main idea
is to convert the data from list to matrix. I'm quite concerned with
how I define xx2.
xx <- unlist(
OK, I've got this. The output prints what I want, but I'm not sure if
there will be problems in further analysis because the main idea is to
convert the data from list to matrix. I'm quite concerned with how I
define xx2.
xx <- unlist(x) # Unlist from lapply + read.table
a <- seq(1,1
On Jan 29, 2010, at 12:43 PM, Muhammad Rahiz wrote:
Thanks David & Dennis,
I may have found something.
Given that the object xx is the product of unlist(x), to create a
2x2 matrix with subsets, I could do,
> y <- matrix(xx[c(1:4)], 2, 2).
This returns,
[,1] [,2]
[1,] -27.3 14.4
[2
Thanks David & Dennis,
I may have found something.
Given that the object xx is the product of unlist(x), to create a 2x2
matrix with subsets, I could do,
> y <- matrix(xx[c(1:4)], 2, 2).
This returns,
[,1] [,2]
[1,] -27.3 14.4
[2,] 29.0 -38.1
If I do,
> y2 <- matrix(xx[c(5:8)],2,2
But then I would have to make a loop right?
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Applying-a-function-on-each-columns-of-a-matrix-tp1415660p1415743.html
Sent from the R help mailing list archive at Nabble.com.
__
R-h
On Fri, 29 Jan 2010, Ashta wrote:
Hi All,
Does the step function work in this model? I tried to run the
following model but no result obtained. The computer is hanging and I
killed the job several times. Below is the code.
library(survival)
m.fit=clogit(y~x1+x2+x3+x4, data=ftest)
summary(m.f
Hello,
You may problably need to create the lagged vars yourself and use them
as input for the NN.
Best regards,
Carlos J. Gil Bellosta
http://www.datanalytics.com
http://datanalytics.wordpress.com
CJ Rubio wrote:
For example I have a time series
Q(t) ~ Q(t-1) + Q(t-2) + Q(t-3)
meaning t
Hmm
I *think* this will work, but may break in a further sub routine.
It certainly works in this example, but my expression vector is used in
many scenarios and it will take a while to check them all.
For instance, I take the derivative of each element with respect to each
variable using
sapply(
Hello,
You could do something along the following lines:
sapply( 1:ncol( my.matrix ),
function( i )
my.foo( my.matrix[,i], my.parm[i]
)
Best regards,
Carlos J. Gil Bellosta
http://www.datanalytics.com
anna wrote:
Hello everyone, I have the following matrix
Hi,
Would this do as an alternative syntax?
g1 <- quote(1/Tm)
mat <- list(0, bquote(f1*s1*.(g1)))
vals <- data.frame(f1=1, s1=.5, Tm=2)
sapply(mat, eval, vals)
HTH,
baptiste
On 29 January 2010 17:51, Jennifer Young
wrote:
> Hallo
>
> I'm having trouble figuring out how to evaluate an expres
Hallo
I'm having trouble figuring out how to evaluate an expression when one of
the variables in the expression is defined separately as a sub expression.
Here's a simplified example
mat <- expression(0, f1*s1*g1) # vector of formulae
g1 <- expression(1/Tm) # expansion of the definition
There is a col2grey (and col2gray) function in the TeachingDemos package that
use a common algorithm to convert colors to grey based on perceived lightness,
that may work for you on deciding the color.
For placing text on colored backgrounds, look at the shadowtext function (also
in TeachingDem
On Jan 29, 2010, at 11:11 AM, eric lee wrote:
Hello,
Can you tell me what R function to use to do a two-sample chi-squared
test? I want to see if two distributions are significantly different
from each other, and I don't specify the theoretical distribution of
either. For example, I have the
Hi everybody,
To run some statistical tests from the package WRS (from Rand R Wilcox),
I need to store my data in a list, which fac2list() from this package
does very well.
But I would like to do it in a loop for each numerical variable. It
would be easier!
For now, I have the loop with the
1 - 100 of 163 matches
Mail list logo