Hi
Dear R-users,
I'm using lattice package and function xyplot for the first time so
you will excuse me for my inexperience. I'm facing quite a simple
problem but I'm having troubles on how to solve it, I've read tons of
old mails in the archives and looked at some slides from Deepayan
I am having a problem with extra digits being added to my data which I think
is a result of how I am converting my data.frame data to xts.
I see the same issue in R v2.13.1 and RStudio version 0.94.106.
I am loading historical foreign exchange data in via csv files or from a sql
server database.
As another followup, given that you are doing numerous regression
models and (I presume) working with finance/stock data that is
strictly numeric (no need for special contrast coding, etc.), you can
substantially reduce the time spent estimating the coefficients. A
simple way is to use lm.fit
Dear all,
I can't get the labels slot in ICLUST to accept a character vector.
library(psych)
test.data - Harman74.cor$cov
ic.out - ICLUST(test.data,nclusters
=4,labels=letters[1:ncol(test.data)]) ## Error in !labels : invalid
argument type
ic.out - ICLUST(test.data,nclusters
dear r-users,
i have got a problem which i am trying to solve:
i have got the following commands:
Mymatrix - matrix(1:9,ncol=3)
Z -
list(V1=c(a,,),V2=c(b,,),V3=c(c,,),V4=c(d,,))
Mymatrix - rbind(Mymatrix,Z[[1]],Z[[2]],Z[[3]],Z[[4]])
now this is working, but i would like to substitute
Marion,
try
rbind( Mymatrix, do.call( rbind, Z))
Hth -- Gerrit
On Tue, 11 Oct 2011, Marion Wenty wrote:
dear r-users,
i have got a problem which i am trying to solve:
i have got the following commands:
Mymatrix - matrix(1:9,ncol=3)
Z -
list(V1=c(a,,),V2=c(b,,),V3=c(c,,),V4=c(d,,))
Hi there,
Does someone know a package/function for blending two pictures or to add
transparency..
Thanks in advance,
KC
-
Kay Cichini
Postgraduate student
Institute of Botany
Univ. of Innsbruck
--
View this message in context:
Dear r user,
please find my attached sample of the dataset i am using to create a
crosstable and eventually plot a histogram from the output.
I am using the cut2 function to create bins, about 7 of them using the code
after reading the data:
cluster - cut2(cross_val$value, g=7)
I get the
On Oct 11, 2011, at 2:47 AM, Marion Wenty wrote:
dear r-users,
i have got a problem which i am trying to solve:
i have got the following commands:
Mymatrix - matrix(1:9,ncol=3)
Z -
list
(V1
=c(a,,),V2=c(b,,),V3=c(c,,),V4=c(d,,))
rbind(Mymatrix, t(as.data.frame(Z)))
The next method could
Hello,
I am attempting to use the ANOVA.CCA function with the by=margin option.
The process works fine using the by=terms option and I note in the Vegan
manual that Jari suggests that an error may occur if the anova does not have
access to the data on the original constraints.
This is the error
Hi
I want to add a double quote to a string
eg
Expected output = DROP TABLE IF EXISTS abc
My code
tab=c(abc)
query = paste(DROP TABLE IF EXISTS ,tab,sep=)
Please help me to solve this problem
--
View this message in context:
On 11-Oct-11 09:23, arunkumar wrote:
Hi
I want to add a double quote to a string
eg
Expected output = DROP TABLE IF EXISTS abc
My code
tab=c(abc)
query = paste(DROP TABLE IF EXISTS ,tab,sep=)
query = paste(DROP TABLE IF EXISTS \,tab,\, sep=)
or
query = paste('DROP TABLE IF EXISTS
On 10/10/2011 09:49 PM, Jurgens de Bruin wrote:
Hi,
Please advice on what type of graph can be used to display the following
data set.
I have the following:
NameClass
a Class 1
a Class4
b Class2
b Class1
d Class3
d
Hi Guys,
I have about 20 continous predictors and I want to do one-way anova to check
the significance of each variable against the dependent variable.
Apart from doing running the anova 20 times, is there a faster way?
Thanks,
Joshua
[[alternative HTML version deleted]]
Hi Yujie,
there is still a lot of work in progress, I think. As
http://faculty.washington.edu/heagerty/Software/SurvROC/RisksetROC/risksetROCdiscuss.pdf
states: [...] for inference and variance estimation, we now suggest
bootstrapping [...].
Recently I catched a glimpse on roc.test from the pROC
FAQ 7.31
Sent from my iPad
On Oct 11, 2011, at 1:07, Mark Harrison harrisonma...@gmail.com wrote:
I am having a problem with extra digits being added to my data which I think
is a result of how I am converting my data.frame data to xts.
I see the same issue in R v2.13.1 and RStudio version
Hi,
I have one doubt about one of the parameter of 'read.spss()' from
'foreign' package.
Here is the syntax :-
read.spss ( file,
use.value.labels = TRUE,
to.data.frame = FALSE,
max.value.labels = Inf,
trim.factor.names = FALSE,
trim_values = TRUE,
reencode = NA,
Dear all,
I am facing the problem that comes up when an ExpressionSet object is intended
to be created parsing a matrix expression data with duplicate row names:
try(myExpressionSet - new(ExpressionSet, exprs = myexprsunique, phenoData
= myphenoData, annotation = myannotation,
On Tue, Oct 11, 2011 at 1:21 AM, David Winsemius dwinsem...@comcast.netwrote:
On Oct 10, 2011, at 4:48 PM, Gustaf Rydevik wrote:
Hi all,
some years ago, I sent a question to the mailing list regarding the WHO
anthro macros. Since I've now received three mails asking how I solved it,
I
Hi,
if you specify to.data.frame=T, then use.missings is implictly set to
T as well, which causes different results for (user-defined) missing values.
cheers.
Am 11.10.2011 12:07, schrieb Smart Guy:
Hi,
I have one doubt about one of the parameter of 'read.spss()' from
'foreign' package.
Hi Patrick,
Thanks for the detailed report. See comments below.
On 11 October 2011 05:57, Patrick McCann patmmcc...@gmail.com wrote:
[...]
I am having some trouble using R 2.13.1 for generating a pmml object
of class c('randomForest.formula', 'randomForest')
[...]
Random Forest (and
Not possible (at least with the pmml package) at this time. There is
some experimental code for reading PMML (and converting into
standalone executable C code) but importing into an R object needs
quite a bit of work to re-create the kmeans object before it would be
worth releasing.
Regards,
nqueralt at clinic.ub.es writes:
I am facing the problem that comes up when an ExpressionSet
object is intended to be created parsing a matrix
expression data with duplicate row names:
You might have more luck with this question on the BioConductor mailing
list ...
adad adad at gmx.at writes:
Working example:
--
library(emdbook)
fn - function()
{
browser()
y - 2
print(deltavar(y*b2, meanval=c(b2=3), Sigma=1) )
}
x - 2
print(deltavar(x*b1, meanval=c(b1=3), Sigma=1) )
y-3
fn()
running this
On Mon, 2011-10-10 at 23:51 -0700, Steve Pawson wrote:
Hello,
I am attempting to use the ANOVA.CCA function with the by=margin option.
The process works fine using the by=terms option and I note in the Vegan
manual that Jari suggests that an error may occur if the anova does not have
access
The following code will get me a curve plot:
cutoff - seq(1,7,0.25)
Sensitivity - 1 - pnorm(cutoff, 5, 0.8)
Specificity - pnorm(cutoff, 3, 1.2)
plot(1-Specificity,Sensitivity,main = ROC curve,type = o)
How do I get a gradient of a particular point on that curve?
Any packages/functions allow me to
I have an R script that consists of a for loop
that repeats a process for many different files.
I want to process this parallely on machine with
multiple cores, is there any package for it ?
Thanks
--
Sandeep R Patil
[[alternative HTML version deleted]]
I've installed Rcmdr package and it doesn't run
Here is the error message:
R version 2.9.2 (2009-08-24)
[R.app GUI 1.29 (5464) powerpc-apple-darwin8.11.1]
[Workspace restored from /Users/jfc/Documents/TravauxFR/.RData]
Le chargement a nécessité le package : tcltk
Chargement de Tcl/Tk...
Hi every one
i have problem in R program to import the data from excel ,
I have done the following:
1. install.packages(xlsReadWrite)
2. library(xlsReadWrite)
3. z- read.xls(ReadXls,LTS,colNames=FALSE,sheet,type,form,rowNames=FALSE)
and i got on the result:
Error in read.xls(ReadXls,
hi,
see here
http://r.789695.n4.nabble.com/Create-a-map-td3689877.html#a3893581
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-map-current-Europe-tp3715709p3893588.html
Sent from the R help mailing list archive at Nabble.com.
hi,
I've just figured out how to plot (more) up-to-date poilitical borders in R
in an easy way:
You can get the outline file Borders_MWDB3 from the NASA panoply site
http://www.giss.nasa.gov/tools/panoply/overlays/
Then read it into R, get the indices with a jump over the -180/180 E line,
Dear R experts,
I have a large database made up of mixed data types (numeric,
character, factor, ordinal factor) with missing values, and I am
looking for a package that would help me impute the missing values
using either the mean if numerical or the mode if character/factor.
I maybe could use
maybe this helps:
http://r.789695.n4.nabble.com/Create-a-map-td3689877.html#a3893581
--
View this message in context:
http://r.789695.n4.nabble.com/map-question-tp795873p3893593.html
Sent from the R help mailing list archive at Nabble.com.
__
Dear all,
I am struggling to align textentry fields in a Tcl/Tk widget. In the
example below, I'd like to have the boxes aligned.
library(rpanel)
panel - rp.control(title=title,size=c(100,100))
rp.textentry(panel,var=a,labels=Variable A,
initval=1,pos=list(row=0,column=0))
?Hmisc::rcorrp.cens
-Alan
-Original Message-
From: Eik Vettorazzi [mailto:e.vettora...@uke.de]
Sent: Tue 10/11/2011 2:25 AM
To: Yujie Wang
Cc: r-help@r-project.org
Subject: Re: [R] How to test if two C statistics are significantly different?
Hi Yujie,
there is still a lot of work in
Thanks for mentioning rcorrp.cens which is much more powerful than testing
for differences in C. Likelihood ratio tests would be even more powerful.
Ordinary differences in C index yields a test with power that is too low.
Frank
alanm (Alan Mitchell) wrote:
?Hmisc::rcorrp.cens
-Alan
In your case, it may not be sensible to simply fill missing values by
mean or mode as multiple imputation becomes the norm this day. For
your specific question, na.roughfix in randomForest package would do
the work.
Weidong Gu
On Tue, Oct 11, 2011 at 8:11 AM, francesca casalino
Hello All,
I have a series of steps that needs to be run many times. Hence I put them
all into a function. There is no problem in function creation, but when I
call the function, the steps are not getting executed or only the first step
gets executed. What possibly could be the reason?
Sample
Hi R-helpers!
Here is my problem:
I have a graph with 3 different facets where there are 3 different
regression line. My goal is to mention separately in each facet each
equation that describes my lines.
So far, I managed to add a line and the same equation to all my facets but
that's not
Thank you all for your suggestions.
Sharad
--
View this message in context:
http://r.789695.n4.nabble.com/correlation-matrix-tp3891085p3894329.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Sounds like what you were hoping for does happen in the function environment
but isn't returned to the global environment. The proper fix is to put the
values in a list and return() them as the function output.
Michael
On Oct 11, 2011, at 9:21 AM, Divyam divyamural...@gmail.com wrote:
Hello
Hi everyone,
I've got two data sets as below. My question now is: how can I use Dataset2
as a filter for Dataset1? My goal is just to keep the rows of Dataset1 where
the first column (Date) matches the Dates in Dataset2.
I would appreciate any solutions to this issue.
Many thanks!
Hi Kenneth
First off, you probably don't need to use xmlParseDoc(), but rather
xmlParse(). (Both are fine, but xmlParseDoc() allows you to control many of
the options in the libxml2 parser, which you don't need here.)
xmlParse() has some capabilities to fetch the content of URLs.
Yes thank you Gu…
I am just trying to do this as a rough step and will try other
imputation methods which are more appropriate later.
I am just learning R, and was trying to do the for loop and
f-statement by hand but something is going wrong…
This is what I have until now:
*fake array:
age-
Thanks for the quick response.
Read the FAQ. If i want to keep the values in R the same as when inputed
should i be converting the data to a different type - i.e. Not numeric?
Sent from my iPhone
On Oct 11, 2011, at 4:46 AM, Jim Holtman jholt...@gmail.com wrote:
FAQ 7.31
Sent from my
Hi R-Help -
If I make a plot:
numYears = 500
plot(x = c(1,numYears), y = c(200,300), xlab = Time, ylab = Vegetation
Class, xlim = c(100,600), ylim = c(200,300), type=n)
Is there a way to make different parts of the background for the plot
different colors?
For example, I'd like to have the
thanks, josh. in my posting example, I did not need anything except
coefficients. (when this is the case, I usually do not even use
lm.fit, but I eliminate all missing obs first and then use solve
crossprod(y,cbind(1,x)) crossprod(cbind(1,x)).) this is pretty fast.)
alas, I will need to figure
Hello,
There has to be a more R'ish way to do this. I have two matrices, one has
the values I want, but I want to NA some of them. The other matrix has
binary values that tell me if I want to NA the values in the other matrix. I
produce a third matrix based on this. I've also tried apply()
Hi,
On Tue, Oct 11, 2011 at 12:08 PM, Ben qant ccqu...@gmail.com wrote:
Hello,
There has to be a more R'ish way to do this. I have two matrices, one has
the values I want, but I want to NA some of them. The other matrix has
binary values that tell me if I want to NA the values in the other
Thanks guys, that's a great help.
Nellie
--
View this message in context:
http://r.789695.n4.nabble.com/question-about-string-to-boor-tp3890983p3894996.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
In the help for get(), the following example is given:
a - 1:4
assign(a[1], 2)
a[1] == 2 #FALSE
get(a[1]) == 2 #TRUE
However, executing that last line for me gives
Error in get(a[1]) : object 'a[1]' not found
__
R-help@r-project.org
Dear R-users,
I wanted to inform you that a new package called R2STATS is available,
as a graphical front-end for the glm() and glmer() functions.
The GUI is based on the RGTk2 and gWidgets packages by Michael Lawrence
and John Verzani, and so requires that the GTK+ library be installed
Hi,
On Tue, Oct 11, 2011 at 12:31 PM, Timothy Bates
timothy.c.ba...@gmail.com wrote:
In the help for get(), the following example is given:
a - 1:4
assign(a[1], 2)
a[1] == 2 #FALSE
get(a[1]) == 2 #TRUE
However, executing that last line for me gives
Error in get(a[1]) : object
Hi,
I want to do a visualisation of a matrix plot made up of several plots of
correlation matrices (using corrplot()). My data is in csv format. Here's an
example:
id,category,attribute1,attribute2,attribute3,attribute4
661,SCHS,43.2,0,56.5,1
12202,SCHS,161.7,5.7,155,16
1182,SCHS,21.4,0,29,0
On 11/10/2011 12:31 PM, Timothy Bates wrote:
In the help for get(), the following example is given:
a- 1:4
assign(a[1], 2)
a[1] == 2 #FALSE
get(a[1]) == 2 #TRUE
However, executing that last line for me gives
Error in get(a[1]) : object 'a[1]' not found
What did the second line
On Oct 11, 2011, at 6:02 AM, luke1022 wrote:
The following code will get me a curve plot:
cutoff - seq(1,7,0.25)
Sensitivity - 1 - pnorm(cutoff, 5, 0.8)
Specificity - pnorm(cutoff, 3, 1.2)
plot(1-Specificity,Sensitivity,main = ROC curve,type = o)
How do I get a gradient of a particular point
On Oct 11, 2011, at 11:18 AM, Samir Benzerfa wrote:
Hi everyone,
I've got two data sets as below. My question now is: how can I use
Dataset2
as a filter for Dataset1? My goal is just to keep the rows of
Dataset1 where
the first column (Date) matches the Dates in Dataset2.
Perhaps:
Dear all:
I am having some problems to use the function sink(). Basically I am doing
a loop over two files which contain unit-root variables. Then on a loop, I
extract every i element of both files to create an object called z. If z
meets some requirements, then I perform a unit root test (ADF
Hello,
does anyone have an example on how to use restricted cubic
splines function rcs within survfit.cph, if cph (Cox Proportional Hazard
Regression) was done with restricted cubic
splines (which I made to work)?
Thank you.
[[alternative HTML version deleted]]
Dear R Fundation,
I am a post-doc researcher at the University of Pisa, Italy.
I apologize for my english and I have to tell you in advance that I
am a very beginner with R.
I used R for fitting dose-response curves (drc package) and for an
ordinary ANOVA (one, two or three factors),
Hi,
Yes, one way to do that is by using function polygon().
Regards,
Carlos Ortega
www.qualityexcellence.es
2011/10/11 Gabriel Yospin yosp...@gmail.com
Hi R-Help -
If I make a plot:
numYears = 500
plot(x = c(1,numYears), y = c(200,300), xlab = Time, ylab = Vegetation
Class, xlim =
Hi,
Inside a loop, you must explicitly wrap your summary() command and anything
else from which you expect output in a print() command.
Sarah
2011/10/11 Sergio René Araujo Enciso araujo.enc...@gmail.com:
Dear all:
I am having some problems to use the function sink(). Basically I am doing
a
Untested, does adding a print() around summary() get it done?
Michael
On Oct 11, 2011, at 1:03 PM, Sergio René Araujo Enciso
araujo.enc...@gmail.com wrote:
Dear all:
I am having some problems to use the function sink(). Basically I am doing
a loop over two files which contain unit-root
On Oct 11, 2011, at 1:03 PM, Sergio René Araujo Enciso wrote:
Dear all:
I am having some problems to use the function sink(). Basically I
am doing
a loop over two files which contain unit-root variables. Then on a
loop, I
extract every i element of both files to create an object called z.
On 11/10/2011 1:03 PM, Sergio René Araujo Enciso wrote:
Dear all:
I am having some problems to use the function sink(). Basically I am doing
a loop over two files which contain unit-root variables. Then on a loop, I
extract every i element of both files to create an object called z. If z
meets
so… cleared out, and now it’s working: Must have been an obscure workspace
conflict. Thanks for quick helpful replies
a - 1:4
assign(a[1], 2)
a[1] == 2
[1] FALSE
get(a[1]) == 2
[1] TRUE
On 11 Oct 2011, at 5:45 PM, Duncan Murdoch wrote:
On 11/10/2011 12:31 PM, Timothy Bates wrote:
In the
Ok, I see my mistake, just did as you suggest and works. Thanks for the
answer people
Best,
Sergio Rné
El 11 de octubre de 2011 19:03, Sergio René Araujo Enciso
araujo.enc...@gmail.com escribió:
Dear all:
I am having some problems to use the function sink(). Basically I am
doing a loop
Suppose I have a function, such as the toy example below:
myFun - function(x, max.iter = 5) {
for(i in 1:10){
result - x + i
iter - i
if(iter == max.iter) stop('Max reached')
}
result
}
I can
You could use return(), e.g.,
myFun - function (x, max.iter = 5) {
for (i in 1:10) {
result - x + i
iter - i
if (iter == max.iter) {
return(result)
}
}
result
}
myFun(10, max.iter = 4)
I hope it helps.
Best,
Dimitris
On 10/11/2011
Thanks, Dimitris. Very helpful on something I *should* know by now.
-Original Message-
From: Dimitris Rizopoulos [mailto:d.rizopou...@erasmusmc.nl]
Sent: Tuesday, October 11, 2011 1:43 PM
To: Doran, Harold
Cc: r-help@r-project.org
Subject: Re: [R] stop()
You could use return(),
Sarah_R_edu wrote on 10/11/2011 04:57:08 AM:
Hi every one
i have problem in R program to import the data from excel ,
I have done the following:
1. install.packages(xlsReadWrite)
2. library(xlsReadWrite)
3. z-
I do not know if stripping down functions is generally recommended,
but it is not too difficult to do if you know that you can make
assumptions. Here is an example (I also found a fast way to convert
the data table to a matrix, again if some assumptions can be made).
Using the stripped down
Carlos Ortega wrote on 10/11/2011 11:30:46 AM:
Hi,
Yes, one way to do that is by using function polygon().
Regards,
Carlos Ortega
www.qualityexcellence.es
2011/10/11 Gabriel Yospin yosp...@gmail.com
Hi R-Help -
If I make a plot:
numYears = 500
plot(x = c(1,numYears), y
I am trying to fit a nonlinear regression to infiltration data in order to
determine saturated hydraulic conductivity and matric pressure. The
original equation can be found in Bagarello et al. 2004 SSSAJ (green-ampt
equation for falling head including gravity). I am also VERY new to R and
to
I am a novice in R but using R 2.13.1 in Windows I wish to be able to
calculate the percentage variation in a
zero-inflated negative binomial regression model that is explained by the
two predictors in my model. My response variable was no. of dung-piles per
km and the predictor of excess
Dear all,
I wanted to create the mean using a algebra matrix.
so I tried this one:
meanAnimals - new3%*%factorial
(Calculates the matrix multiplication of the new3 * factorial).
But I get the following error message:
Error in new3 %*% factorial : non-conformable arguments
These are my
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Dimitris Rizopoulos
Sent: Tuesday, October 11, 2011 10:43 AM
To: Doran, Harold
Cc: r-help@r-project.org
Subject: Re: [R] stop()
You could use return(), e.g.,
myFun -
On Wed, Oct 12, 2011 at 4:56 AM, ivo welch ivo.we...@gmail.com wrote:
thanks, josh. in my posting example, I did not need anything except
coefficients. (when this is the case, I usually do not even use
lm.fit, but I eliminate all missing obs first and then use solve
crossprod(y,cbind(1,x))
On Oct 11, 2011, at 1:45 PM, flokke wrote:
Dear all,
I wanted to create the mean using a algebra matrix.
so I tried this one:
meanAnimals - new3%*%factorial
(Calculates the matrix multiplication of the new3 * factorial).
But I get the following error message:
Error in new3 %*% factorial
To do matrix multiplication: m x n, the Rows and columns of m must be equal to
the columns and rows of n, respectively.
Sent from my iPhone
On 11 Oct 2011, at 06:45 PM, flokke ingaschw...@gmail.com wrote:
Dear all,
I wanted to create the mean using a algebra matrix.
so I tried this
The integration of plot methods for various outputs from rms packages is
a great appreciated aspect of the rms package.
I particularly like to use:
plot(summary(model))
for my own purposes, but... for publication/presentation I need to
modify details like variable names, or the number of
Katie:
I would say that this is not an R question, so I would suggest that either
a) You ask it on a statistics help website like stats.stackexchange.com or
b) You consult with someone locally who knows about nonlinear regression
(possibly a statistician, but not necessarily so).
-- Bert
On
Hello,
I'm looking to get the values, row names and column names of the largest and
smallest values in a matrix.
Example (except is does not include the names):
x - swiss$Education[1:25]
dat = matrix(x,5,5)
colnames(dat) = c('a','b','c','d','c')
rownames(dat) = c('z','y','x','w','v')
dat
Hi,
is there a way to replicate a data.frame like you can replicate the entries of
a vector (with the repeat-function)?
I want to do this:
x - data.frame(x, x)
(where x is a data.frame).
but n times.
And it should be as cpu / memory efficient as possible, since n is pretty big
in my
It may be best to either write to the package maintainer (me, as you did) or
post to the group but not both.
Frank
Stan Maydan-2 wrote:
Hello,
does anyone have an example on how to use restricted cubic
splines function rcs within survfit.cph, if cph (Cox Proportional Hazard
Regression)
Your question as answered by Timothy in your previous thread
http://r.789695.n4.nabble.com/Re-Creating-the-mean-using-algebra-matrix-td3895689.html
flokke wrote:
Dear all,
Sorry to bother you with such a stupid question, but I just cannot find
the solution to my problem.
I'd like to
Hi,
One way to do that is this (avoiding the use of a for loop):
l.txt- id category attribute1 attribute2 attribute3 attribute4
661 SCHS 43.2 0 56.5 1
12202 SCHS 161.7 5.7 155 16
1182 SCHS 21.4 0 29 0
1356 SSS 8.8182 0.1818 10.6667 0.6667
1864 SCHS 443.7273 9.9091 537 46
12360 SOA 6.6364 0 10
Replace stop() with break to see if that does what you want. (you may also
want to include cat() or warn() to indicate the early stopping.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Replicate the row indices?
x[rep(seq_len(nrow(x)), k), ]
-- Bert
On Tue, Oct 11, 2011 at 12:55 PM, Martin Batholdy
batho...@googlemail.comwrote:
Hi,
is there a way to replicate a data.frame like you can replicate the entries
of a vector (with the repeat-function)?
I want to do this:
x
Hi,
One way to do that is this (avoiding the use of a for loop):
l.txt- id category attribute1 attribute2 attribute3 attribute4
661 SCHS 43.2 0 56.5 1
12202 SCHS 161.7 5.7 155 16
1182 SCHS 21.4 0 29 0
1356 SSS 8.8182 0.1818 10.6667 0.6667
1864 SCHS 443.7273 9.9091 537 46
12360 SOA
check the version of libcurl you have installed. If you have an older
version some of the
options may not be present.
On Sun, Oct 9, 2011 at 10:39 AM, Steven Oliver s1oli...@ucsd.edu wrote:
Hey Guys,
I just started fooling around with the twitteR package in order to get a
record of all
On Oct 11, 2011, at 3:20 PM, Rob James wrote:
The integration of plot methods for various outputs from rms
packages is a great appreciated aspect of the rms package.
I particularly like to use:
plot(summary(model))
for my own purposes, but... for publication/presentation I need to
In the absence of a reproducible example, a general question induces a
general response. I'd suggest creating a small data frame that
contains the x and y coordinates, a third variable consisting of
expressions representing each fitted model and an indicator of the
group to which the expression is
Hi,
With this code you can find row and col names for the largest value applied
to your example:
r.m.tmp-apply(dat,1,max)
r.max-names(r.m.tmp)[r.m.tmp==max(r.m.tmp)]
c.m.tmp-apply(dat,2,max)
c.max-names(c.m.tmp)[c.m.tmp==max(c.m.tmp)]
It's inmediate how to get the same for the smallest and
But it's simpler and probably faster to use R's built-in capabilities.
?which ## note the arr.ind argument!)
As an example:
test - matrix(rnorm(24), nr = 4)
which(test==max(test), arr.ind=TRUE)
row col
[1,] 2 6
So this gives the row and column indices of the max, from which row and
On 12/10/11 08:31, Timothy Bates wrote:
To do matrix multiplication: m x n, the Rows and columns of m must be equal to
the columns and rows of n, respectively.
No. The number of columns of m must equal the number of rows of n,
that's all. The number of *rows* of m and the number of
On 11/10/11 08:17, Michael Friendly wrote:
On 10/9/2011 6:18 AM, Prof Brian Ripley wrote:
Sometimes it is better not to document things than try to give precise
details which may get changed *and* there will be useRs who misread (and
maybe even file bug reports on their misreadings). The
On 11-10-11 7:14 PM, Rolf Turner wrote:
On 11/10/11 08:17, Michael Friendly wrote:
On 10/9/2011 6:18 AM, Prof Brian Ripley wrote:
Sometimes it is better not to document things than try to give precise
details which may get changed *and* there will be useRs who misread (and
maybe even file bug
which.max is even faster:
dims - c(1000,1000)
tt - array(rnorm(prod(dims)),dims)
# which
system.time(
replicate(100, which(tt==max(tt), arr.ind=TRUE))
)
# which.max ( arrayInd)
system.time(
replicate(100, arrayInd(which.max(tt), dims))
)
Best,
Denes
But it's simpler and probably faster to use
Colleagues,
I am fitting an Emax model using nls. The code is:
START - list(EMAX=INITEMAX, EFFECT=INITEFFECT,
C50=INITC50)
CONTROL - list(maxiter=1000, warnOnly=T)
#FORMULA- as.formula(YVAR ~ EMAX - EFFECT * XVAR^GAMMA
/
1 - 100 of 116 matches
Mail list logo