Greetings:
I am forming an R Group on LinkedIn.Com for job seekers and potential
employers. Please consider joining.
http://www.linkedin.com/e/gis/77616/0AEFE3574537
Regards,
Ajit
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/lis
Thanks Christos, for your reply and for sharing how to access the
attributes?, slots? in a shorthand notation with @, but after reading
the help for @, I became even more confused. Is there any place that
has collected wisdom on R indexing?
On Thu, Mar 27, 2008 at 1:35 PM, Christos Hatzis <[EMAIL
I am using the non-linear least squares routine in "R" -- nls. I have a
dataset where the nls routine outputs tight confidence intervals on the
2 parameters I am solving for.
As a check on my results, I used the Python SciPy leastsq module on the
same data set and it yields the same answer as
You need to use the '@' operator to directly access attributes (not
elements) of objects:
> [EMAIL PROTECTED]
[1] "x" "y" "z"
See ?'@' for more details.
-Christos
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Tribo Laboy
> Sent: Thursday, March
Hi !
I am a new user and quite confused by R-indexing.
Make a list and get the attributes
lst <- list(x = 1:3, y = 4:6, z = 7:9)
attributes(lst)
This returns:
$names
[1] "x" "y" "z"
I can easily do:
nm <-names(lst)
or
nm <-attr(lst,"names")
which both return the assigned names of the named
Hi Hadley,
I am surprised you find time to reply to r-help questions despite your
thesis deadline being on Monday. Good luck with it! Yes, I can wait
until the new version is ready!
Regards,
TL
On Thu, Mar 27, 2008 at 12:28 PM, hadley wickham <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 26, 2008 at
On Wed, Mar 26, 2008 at 6:01 AM, Tribo Laboy <[EMAIL PROTECTED]> wrote:
> Apologies! I though that the Orange dataset comes with R, but it is in
> fact in the package "datasets".
>
> So here's another "Orange2" dataset for the example:
>
> Tree_v = rep(c(1:5),each = 5)
> age_v = rep(seq(1,25, b
Have you tried the vignette:
(dse <- vignette("dse-guide"))
Stangle(dse$file)
This should open "dse-guide.pdf" in Acrobat and create a file
"dse-guide.R" in the working directory. The latter file should contain
the R commands used in the vignette.
D
I realized that not everyone has Matlab and that basically the issue
is purely how to deal with the returned data in R, so I have revised
my example code and made it easier to copy-paste and run:
#Make a data frame in R
Maker <- factor(c("HP", "HP", "Sony", "DELL", "whitebox", "whitebox"))
CPUsp
Hans-Joachim Klemmt lrz.tu-muenchen.de> writes:
>
> Hello,
>
> I want to draw 3D cylinder objects in R.
>
> Given is the length and the diameter of the cylinder.
>
> Has anybody an example?
>
> Thank you very much!
>
> Best regards
>
Here's a starting point, if you want to use the
rgl
I find R books to be helpful for beginners. There is a fairly
comprehensive list on the R web site, www.r-project.org.
Is this what you had in mind though? Without example code, it's hard
for me to tell exactly your situation.
test <- list(first = c("string1a", "string2a"), second = c("string1
Is this what you were asking for?
> x <- c('a b', 'c d', 'e f')
> y <- strsplit(x, ' ')
> y
[[1]]
[1] "a" "b"
[[2]]
[1] "c" "d"
[[3]]
[1] "e" "f"
> sapply(y, '[[', 1)
[1] "a" "c" "e"
>
>
On Wed, Mar 26, 2008 at 8:55 PM, <[EMAIL PROTECTED]> wrote:
> Is there an on-line source that explains in
Is there an on-line source that explains index vectors? I used 'strsplit' to
generate a lengthy list of pairs of character vectors. I only want the first
of each pair. Brackets, double brackets, and '$' operator don't work
[[alternative HTML version deleted]]
_
Check out the 'rgl' package for creating 3D objects.
On Wed, Mar 26, 2008 at 3:02 PM, Hans-Joachim Klemmt
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to draw 3D cylinder objects in R.
>
> Given is the length and the diameter of the cylinder.
>
> Has anybody an example?
>
> Thank you very much!
Ala' Jaouni gmail.com> writes:
>
> X1,X2,X3,X4 should have independent distributions. They should be
> between 0 and 1 and all add up to 1. Is this still possible with
> Robert's method?
>
NO.
If they add to 1 they are not independent.
As Ted remarked, the constraints define two simplexes an
>From: "Wang, Xiaojing" <[EMAIL PROTECTED]>
>Date: 2008/03/26 Wed AM 10:08:01 CDT
>To: "'r-help@r-project.org'"
>Subject: [R] pseudo R square and/or C statistic in R logistic regression
The analogue to the regression R rsquared in a GLM
is the deviance. I don't know what C is but hopefully someo
Hi,
I am creating a model with loess but predict complains about missing
variables. This doesn't help with single variable formulas or with lm with
any formula. Looks like a bug to me
# doesn't work
> l = loess(y ~ log(x) + log(z) , data.frame(z = 1:100, x=1:100 +
rnorm(100), y=1:100))
> predict(
This statement:
temp<-lapply(split(DF1,DF1$Trade.Date), function(.df) {
+
data.frame(DATE=.df$Trade.Date,RANGE=max(.df$New.Price)-min(.df$New.Pric
e))
+ })
has many results for DATE and one for RANGE; that is the reason you
are getting multiple copies. Instead you need to write:
temp<-lapply(sp
OOPS! A mistake below. I should have written:
This raises a general question: Does anyone know of
an R function to sample uniformly in the interior
of a general (k-r)-dimensional simplex embedded in
k dimensions, with (k-r+1) given vertices?
On 26-Mar-08 22:06:54, Ted Harding wrote:
> On
Mac OSX 10.4.10 and R 2.6.2
Whenever I resize a quartz window the graph disapears. I have to size
the window and then reprint the graph. Should I report this to the
R-developer's list? Are there any work arounds?
thanks
Stephen Sefick
--
Let's not spend our time and resources thinking about
If you have lots of memory there is an obvious strategy:
d12 <- prod(dim(A)[1:2])
A <- A * array(rep(B, each = d12), dim = dim(A))
I don't really see much wrong with the obvious for() loop, though:
for(b in 1:length(B)) A[,,b] <- A[,,b] * B[b]
Bill Venables
CSIRO Laboratories
PO Box 120, Cleve
Dear all,
I an running R on a Windows 2000 machine (1.5Gb RAM) and am trying to load the
lme4 package, however, whenever I attempt to load the library "lme4" I get the
following error message
I have installed lme4 and Matrix locally from the zip file with no problems.
R version 2.6.2 (2008-0
Hi
When I copy a block of code to R console, the code would be displayed
line by line very slowly.
I am using R version 2.6.2(2008-2-8). Does anybody know what is the
reason for the slow display? It was not like this when I used earlier
versions.
Huilin
__
I did the following
DF<-do.call(rbind, pp2)
DF1=na.omit(DF)
DF1[,2]=as.Date(DF1[,2])
str(DF)
'data.frame': 18660 obs. of 6 variables:
I tried the following code
temp<-lapply(split(DF1,DF1$Trade.Date), function(.df) {
+
data.frame(DATE=.df$Trade.Date,RANGE=max(.df$New.Price)-min(.df$New.Pric
e
Hi,
I've been searching CRAN and the web for a recursive multivariate
filter with time-varying coefficients.
What I mean is the following:
I have a series of square matrices A_t
an initial value vector y_0
and I need to compute
y_t =A_t%*%y_t-1
As these y_t may diverge quickly and/or lead t
In the code of my previous message
the barplot should be:
barplot(apply(sel[,-1],2,mean))
instead of
barplot(sel)
Sorry for the confusion.
Agus
Mensaje original
Asunto: barplot as Trellis graphic
Fecha: Wed, 26 Mar 2008 22:24:04 +0100
De: Agustin Lobo <[EMAIL PROTECTED]>
Respon
On 26-Mar-08 21:26:59, Ala' Jaouni wrote:
> X1,X2,X3,X4 should have independent distributions. They should be
> between 0 and 1 and all add up to 1. Is this still possible with
> Robert's method?
>
> Thanks
I don't think so. A whileago you wrote
"The numbers should be uniformly distributed" (but
Hi,
I need to compute an array from a matrix and an array:
A <- array(1:20,c(2,2,5))
B <- matrix(1:10,5)
And I would like the result to be an array consisting of the following:
rbind(A[1,,1]*B[1,],
A[2,,1]*B[1,])
rbind(A[1,,2]*B[2,],
A[2,,2]*B[2,])
rbind(A[1,,3]*B[2,],
A[2,,3]*B[2,])
etc.
He
Ala' Jaouni wrote:
>
> I am trying to generate a set of random numbers that fulfill the
> following constraints:
>
> X1 + X2 + X3 + X4 = 1
>
> aX1 + bX2 + cX3 + dX4 = n
>
> where a, b, c, d, and n are known.
>
> Any function to do this?
>
You must give more information.
How are those numbers
X1,X2,X3,X4 should have independent distributions. They should be
between 0 and 1 and all add up to 1. Is this still possible with
Robert's method?
Thanks
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read t
Dear list,
Is there any way of making barplots as a Trellis graphic?
Currently I do something like:
class <- unique(mydata[,1])
par(mfrow=c(3,3))
for(i in class){
sel <- mydata[mydata[,1]==i,]
barplot(sel)
title(i)
}
where class would take values between 1 and 9
and the first column of myd
X1,X2,X3,X4 should have independent distributions. They should be
between 0 and 1 and all add up to 1. Is this still possible with
Robert's method?
Thanks
On Wed, Mar 26, 2008 at 12:52 PM, Ted Harding
<[EMAIL PROTECTED]> wrote:
> On 26-Mar-08 20:13:50, Robert A LaBudde wrote:
> > At 01:13 PM 3/2
I think something like this should work. I will give you the range
for each date across all the data:
x <- do.call(rbind, pp2)
tapply(x$New.Price, x$Trade.Date, range)
On 3/26/08, Ravi S. Shankar <[EMAIL PROTECTED]> wrote:
> To add more clarity to my question
>
> My data pp2 is a list
>
> (pp2
To add more clarity to my question
My data pp2 is a list
(pp2[[1]])
RIC Trade.Date Close.Price Currency.Code Convertion.Rate New.Price
ABCD.SZ 2008/02/29 15.30 CNY 0.1408
2.154240
ABCD.SZ 2008/01/31 15.27 CNY 0.1392
2.040048
ABCD.SZ
Can you give a little more detail?
Do you want the nice 3d shading effect? Or is an ellipse, 2 lines and another
ellipse good enough? Does the viewing angle matter (flatness of ellipses). Do
the cylinders need to be placed at certain locations? Or are you trying to do a
barplot with 3d cylind
Not exactly clear what the data in the list looks like. Is it a
dataframe of the format you listed? Do you want just a single range
for the dates? Do you want to create one large dataframe and then
partition it by date to find the range? You can do
"do.call(rbind,pp2)" to create the one large d
http://cran.r-project.org/contrib/extra/dcom/00ReadMe.html
is the easiest way.
On Wed, 26 Mar 2008, [EMAIL PROTECTED] wrote:
> A friend of mine can't send emails to the
> R-list from his work and he had a question that
> he asked me to send because I don't know the answer
> to his question. I di
Hi R,
I have a list
> class(pp2)
[1] "list"
> length(pp2)
[1] 1244
It is in the below format
RIC Trade.Date Close.Price Currency.Code Convertion.Rate New.Price
ABCD.SZ 2008/02/29 15.30CNY 0.1408 2.154240
ABCD.SZ 2008/01/31 15.27CNY 0.1392
A friend of mine can't send emails to the
R-list from his work and he had a question that
he asked me to send because I don't know the answer
to his question. I did suggest the cran packages
list and the search function but I think he wasn't
successful ?
He needs to do a quick prototype in R with
Hello,
I want to draw 3D cylinder objects in R.
Given is the length and the diameter of the cylinder.
Has anybody an example?
Thank you very much!
Best regards
--
--
Dr. Hans-Joachim Klemmt
Forstoberrat
Organisationsprogrammierer IHK
Bayerische Landesanstalt für Wald
On 26-Mar-08 20:13:50, Robert A LaBudde wrote:
> At 01:13 PM 3/26/2008, Ala' Jaouni wrote:
>>I am trying to generate a set of random numbers that fulfill
>>the following constraints:
>>
>>X1 + X2 + X3 + X4 = 1
>>
>>aX1 + bX2 + cX3 + dX4 = n
>>
>>where a, b, c, d, and n are known.
>>
>>Any function
On Wed, Mar 26, 2008 at 7:27 PM, Ala' Jaouni <[EMAIL PROTECTED]> wrote:
> I failed to mention that the X values have to be positive and between 0 and
> 1.
Use Robert's method, and to do his step 1, use runif (?runif) to get
random numbers from the uniform distribution between 0 and 1.
Paul
___
Hi Chaser --
Ask on the Bioconductor mailing list
(http://www.bioconductor.org/docs/mailList.html) to connect with other
Bioconductor users likely to have experience with the package.
Use an informative subject line, so that people able to help can see
that the help they can provide is needed.
You have 4 random variables that satisfy 2 linear constraints, so you
are trying to generate a point in a (4-2) = 2 dimensional linear
(affine, in fact) subspace of R^4.
If you don't have any further requirement for the distribution of the
random points you want to generate, there are infinitely
Hi,
I failed to mention that the X values have to be positive and between 0 and 1.
e.g.
0.1812*X1 + 0.1871*X2 + 0.1847*X3 + 0.2745*X4 + 0.1304*X5 = 0.2
so one possible combination of X values can be:
0.319, 0.201, 0.084, 0.26, 0.136
another possible combination:
0.151, 0.253, 0.197, 0.256, 0.14
At 01:13 PM 3/26/2008, Ala' Jaouni wrote:
>I am trying to generate a set of random numbers that fulfill the following
>constraints:
>
>X1 + X2 + X3 + X4 = 1
>
>aX1 + bX2 + cX3 + dX4 = n
>
>where a, b, c, d, and n are known.
>
>Any function to do this?
1. Generate random variates for X1, X2, based
Hey everyone,
For my research, I needed a peak detector algorithm that can spot peaks in
an intensity graph. The excel
http://www.nabble.com/file/p16313309/sample%2Bdata.xls sample data that
I've attached contains columns of such intensity graphs.
I came found an algorithm developed by the
Apologies for the previous post - sent by mistake. Here is the full post
below:
I have been trying to run this analysis and finally want to ask for help.
I am trying to run a paired t-test in which I have 19 subjects who have
reaction times for 5 different conditions. The data frame has 114 row
I have been trying to run this analysis and finally want to ask for help.
I am trying to run a paired t-test in which I have 19 subjects who have
reaction times for 5 different conditions. The data frame has 114 rows
total (6 rows for each subject representing six average reaction times by
condit
Hi all,
I recently switched to R version 2.6.2 (from 2.5.0 I was using) on Windows XP.
I have a fair amount of previous data saved in the form of "approxfun" objects
created by version 2.5.0, with code basically like this:
> x <- rlnorm(100,10,2)
> f <- approxfun(1:100,x)
> f(5)
[1] 313811.3
> sa
I am trying to generate a set of random numbers that fulfill the
following constraints:
X1 + X2 + X3 + X4 = 1
aX1 + bX2 + cX3 + dX4 = n
where a, b, c, d, and n are known.
Any function to do this?
Thanks,
-Ala'
__
R-help@r-project.org mailing list
ht
I am trying to generate a set of random numbers that fulfill the following
constraints:
X1 + X2 + X3 + X4 = 1
aX1 + bX2 + cX3 + dX4 = n
where a, b, c, d, and n are known.
Any function to do this?
Thanks,
-Ala'
[[alternative HTML version deleted]]
_
On Wed, 26 Mar 2008, Prof Brian Ripley wrote:
> Where did you get that idea from? Not from the help page:
No. From direct observation. Ie. comparing what the function actually
returned vs actual elapsed time. In one case I observed, these two are
dramatically different. It is possible I made
I may have misread your original posting, I thought you were using the boot
package but I don't see any function bootstrap. I also don't see any
documentation for the sampler parameter. What package are you using? If it is
possible, I am sure I will be corrected.
Sorry, I can't be of more h
On 3/26/2008 12:20 PM, Faheem Mitha wrote:
> Hi,
>
> Can anyone point me to documentation of how R objects such as vectors,
> lists, matrices and data frames are laid out in memory? For example, which
> of these are laid out as a 1-d array, 2-d array and so forth?
Vectors, lists and matrices ar
On Wed, Mar 26, 2008 at 11:03 AM, Sebastian Weber
<[EMAIL PROTECTED]> wrote:
> Hello there,
>
> I'm trying to do lots of plots in one for-loop. But somehow ggplot does
> not evaluate arguments as expected. Here is an example:
>
> library(lattice)
> library(ggplot2)
> pl <- list()
> pl2 <- lis
Hi R,
I have a dataframe with
dim(test)
[1] 435150 4
class(test)
[1] "data.frame"
In the third column every time a number with "-" appears I need to
replace with previous value
I am using the following code
s=which(substr(as.character(test[,3]),1,1)=="-")
for(i in 1:length(s)) test[s[i],3] =
Try this. If the format varies you may need to modify it from below. Replace
textConnection(rawLines) with the name of your file. This extracts lines with
a = and rereads them using read.table with = as the separator. It also
gets lines with a number that has spaces on both sides, deletes everyt
Where did you get that idea from? Not from the help page:
'system.time' calls the function 'proc.time', evaluates 'expr',
and then calls 'proc.time' once more, returning the difference
between the two 'proc.time' calls.
'unix.time' is an alias of 'system.time', for compatibi
Hi Thierry
Thanks for replying. I tried your code, but it spit an error on me:
> Orange2 <- data.frame(Tree = as.factor(Tree_v), age = age_v,
+ circumference = circumference_v, Lines =
factor(as.numeric(Orange2$Tree) + %% 4))
Error: unexpected SPECIAL in:
"Orange2 <- data.frame(Tree = as.factor(T
I believe that work is in progress to make odfTable work on tables as
well, in the meantime if you use "unclass" on a table you get back a
matrix that works with odfTable.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 40
Dear helpeR's,
I am estimating a hurdle model with the hurdle function of the pscl package.
(negative binomial for the count data and logit for the hurdle).
I am interested in robust estimates. In stata I can do this with robust
cluster(group). Since R is faster by roughly factor 20 in the mode
see ?system.time
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine
15032 Hunter Court, Westfield, IN 46074
(317) 490-5129 Work, & Mobile & VoiceMail
(317) 204-4202 Home (no voice mail please)
mwkimpelgmailcom
**
Hi R Users:
This package provides two generic functions for performing Markov
chain sampling in a naive way for a user-defined target distribution,
which involves only continuous variables. The function "gibbs_met"
performs Gibbs sampling with each 1-dimensional distribution sampled
with Metropoli
Hi to the list,
I am trying to find a way to painlessly move structured data back and
forth between R and Matlab (also Octave). For this purpose I found the
R.matlab package great help. I wish to use a Matlab -v6 MAT file as an
intermediary format, because it is well read by both Matlab and
Octave
Hi,
I would like to use odfWeave to output some contingency tables (the
output of "table") into OOo. I know I can do this in LaTex (using
"latex" in the Hmisc package), but I was wondering if it is possible in
OdfWeave. My documentation to odfTable says inputs can only be vector,
matrix or dat
On Wed, Mar 26, 2008 at 1:17 PM, Andreas Klein <[EMAIL PROTECTED]> wrote:
> I have some further problems with modelling an
> optimization problem in R:
>
> How can I model some optimization problem in R with a
> linear objective function with subject to some
> nonlinear constraints?
> I would
A new package 'epiR' is available on CRAN. Package description as follows:
Package: epiR
Version: 0.9-3
Date: 2008-03-24
Title: Functions for analysing epidemiological data
Author: Mark Stevenson <[EMAIL PROTECTED]> with contributions
from Telmo Nunes, Javier Sanchez, and Ron Thornton.
Ma
Hi,
Can anyone point me to documentation of how R objects such as vectors,
lists, matrices and data frames are laid out in memory? For example, which
of these are laid out as a 1-d array, 2-d array and so forth?
The R Internals document seems like the natural place to look, but I don't
see it
Hi,
As far as I can tell, The R function unix.time calculates elapsed CPU
time. Is there a command within R to measure actual elapsed time (I think
this is sometimes referred to as wall time)?
For example, the time command from GNU time calculates the actual elapsed
time, as far as I can tell
Hello there,
I'm trying to do lots of plots in one for-loop. But somehow ggplot does
not evaluate arguments as expected. Here is an example:
library(lattice)
library(ggplot2)
pl <- list()
pl2 <- list()
cDat <- as.data.frame(cbind(x1=0:100,x2=0:10,x3=1:20))
for(obs in c("x1", "x2")) {
pl[[obs]]
I have obtained from transfer functions, the state space matrices for the
following state space model.
x* = Ax + Bu
y = Cx + Du
I have A, B, C, and D, now I would like to take the exogenous inputs and
simulate the data using the state space model. I know there is a simulate
function in the
Hi Dan,
Thanks for response yes i do know that bootstrap samples generated by
function boot are of the same size as original dataset but somewhere in the
R-help threads i saw a suggestion that one can control sample size (n) by
using the following command(plz see below) but my pro
Basically you are moving the data up and then incrementing to the next
row. Here is an example; assume that you are at the 2nd entry:
1
2 <== here
3
4
Now your loop index is 2 and you remove the current data ('2') and are
left with:
1
3 <== index of 2 points here
4
Now you increment the inde
It all depends. If your looks like your sample, then you will
probably want to read the data with 'readLine' and bring in the entire
line without trying to parse it. You would then go through the data
with 'grep' to find the lines of interest and then you can use
'strsplit' or regular expressions
Dear all, I have a problem with a loop, if anyone has any knowledge on
these things I would appreciate some comments. The code below is
designed to allow me to extract the top record of the data frame, and
them remove rows from the data frame which have an index close to the
extracted top record.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Zaihra T
> Sent: Wednesday, March 26, 2008 7:57 AM
> To: Jan T. Kim; R-help@r-project.org
> Subject: [R] sample size in bootstrap(boot)
>
>
>Hi,
>
>Can someone tell me how to control sample s
Dear Burak,
Since two of the explanatory variables are quantitative, it is unusual to
call this a three-way ANOVA (as opposed to a dummy-variable regression or
analysis of covariance). I'd also think about fitting the model with lm()
rather than aov(), so that you can more easily see the regressio
Greetings:
If you use LinkedIn please join our R Group.
***http://www.linkedin.com/e/gis/77616/0AEFE3574537*
Regards,
Ajit
--
_
Ajit Gemunu de Silva
Oakland CA 94619
skype: ajit_de_silva
[[alternative HTML version deleted]]
__
Dear all,
I am now doing the logistic regression using R. (glm, family=binomial).
Besides the standardize summary statistics generated from R, I am also
interested in some more informations concerning the model fitting /
prediction etc; Particularly I am interested in "pseudo R squar" and "C
st
Dear all,
I am now doing the logistic regression using R. (glm, family=binomial).
Besides the standardize summary statistics generated from R, I am also
interested in some more informations concerning the model fitting / prediction
etc; Particularly I am interested in "pseudo R squar" and "C s
R 2.6.2 gets hung up when I use the "Save". It saves the R script
document but I must use "Force Quit" (not responding) and reboot after
saving.
I tried updating R and all its packages, ran the Mac Disk Utilities
program.
I hope that the following while help determine the problem.
Any su
Dear Max,
So Rich's guess that you had a factor level with only one observation (and
consequently an empty cell in the two-way table of means) proved correct.
I'll modify the plotMeans() function so that it prints a more informative
message under this circumstance.
Regards,
John
---
Hi,
Can someone tell me how to control sample size (n) in bootstrap function
boot in R. Can we give some option like we give for # of repeated
samples(R=say 100).
Will appreciate any help.
thanks
__
R-help@r-project.org mailing
yet another possibility...
if you look at 'help(package=xlsReadWrite)' you'll find a function
'dateTimeToStr' by which you can convert your date-numbers from column 3
into a string. Something along (untested):
myRead <- function( fn ) {
dat <- read.xls( file = fn, dateTimeAs = "numeric" )
dat
John and Rich,
Thankyou for the suggestion of I've gone over my data and found that
one of the text values had an extra space in it. Error fixed. It's good
to know what the error means, now if I encounter it again I don't need
to ask about it here.
Thanks again!
-Max
It happens that John Fox
Dear all, I have two matrices:
matrix 1: height
23121 2125 25 25 2121
0 21 216767 33 22725
0 1 92 190 7171 192 067
0 00 8671 0 067
0 00 0 0 0 0 67
0
length(dim())?
Amit Soni wrote:
> Hi,
>
> In Mathematica, if we have a 3X3 matrix A, we can get its dimensions by:
> Dimensions[A] = {3,3}
> TensorRank[A] = 2
>
> In R, we have dim() for Dimensions[]. Is there any direct function similar
> to TensorRank in R?
>
> Thank you
>
> [[alternative
Hello, my name is Alfonso, I'm trying to apply bootstrap to a process to
calculate the confidence intervals for a final value. I've revised all whole
process and any mistake has been encuntered in the script. But when I try to
apply boostrap the begining error message appears:
Error in
Hello.
I have some further problems with modelling an
optimization problem in R:
How can I model some optimization problem in R with a
linear objective function with subject to some
nonlinear constraints?
I would like to use "optim" or "constrOptim", maybe
with respect to methods like "Simulated
On Wednesday 26 March 2008 01:31:46 pm Andreas Tille wrote:
AT> reasonable converter that takes over plot commands and initial
AT> settings and put these into R commands
Not that I know. But I doubt that someone would make this effort since the
capabilities of gnuplot and R are quite different.
Hello everone,
I am a computer science researcher in the UK - and have a quick question
regarding importing data into R and more specifically latentnet.
I am trying to import data such as a text file containing: (This is based on
the Sampson data set)
---
Network attributes:
verti
Hi,
In Mathematica, if we have a 3X3 matrix A, we can get its dimensions by:
Dimensions[A] = {3,3}
TensorRank[A] = 2
In R, we have dim() for Dimensions[]. Is there any direct function similar
to TensorRank in R?
Thank you
[[alternative HTML version deleted]]
___
Hi,
I have some scripts creating GNUplot graphs that I would like to
convert to R. It would be a great help if there would be a
reasonable converter that takes over plot commands and initial
settings and put these into R commands (I'm an R beginner and
thus this kind of Kickstart would be helpful
Check this out, this might help
http://arxiv.org/abs/0801.2934
Ben Spycher
PhD student
Division of Clinical Epidemiology & Biostatistics
Institute of Social and Preventive Medicine
University of Berne
Finkenhubelweg 11 - CH-3012 Berne, Switzerland
Tel +41 31 631 35 07 / Fax +41 31
try this:
dat <- matrix(rnorm(20), 10, 2)
dimnames(dat) <- list(1:10, c("sample1", "sample2"))
matplot(dat, pch = 16, xaxt = "n", col = 1:2,
ylab = "Expression Value")
axis(1, at = 1:10, labels = paste("Gene", 1:10), cex.axis = 0.7)
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Hello,
I have a gene expression matrix with columns being samples and rows
being genes. I would like to display the expression values for each
gene. I have two groups which I colour differently. The aim is to see
if there is any difference between the two groups consistently across genes.
So t
Tribo,
It looks like geom_line() accepts only 4 linetypes and you asked for 5.
library(ggplot2)
Tree_v <- rep(c(1:5),each = 5)
age_v <- rep(seq(1,25, by = 5),5) + 10*runif(25)
circumference_v <- rep(seq(21,45, by = 5), 5)*Tree_v + 25*runif(25)
#This will work
Orange2 <- data.frame(Tree = as.fact
Is this what you want? You have to add "na.rm=TRUE" to the calculations:
> week<-c(28,28,28,28,28,28,28,29,29,29,29,29,29,29,30,30,30,30,30,30,30)
> td<-c(0.015,0.012,NA,0.015,NA,0.014,0.014,0.013,0.013,0.013,0.013,NA,0.010,0.013,0.015,0.011,0.014,0.014,0.014,0.014,0.016)
> pd<-c(0,0,NA,80,NA,45,
If you want to read in the numeric values from EXCEL and the use them,
here is a function I use to go the other way -- take a POSIXct value
and convert it to what EXCEL wants. So you can just write the inverse
of this function:
unix2EXCEL <- function (time) time/86400 + 25569
On Tue, Mar 25, 20
1 - 100 of 110 matches
Mail list logo