Hi,
you can try close R and run R again for getting and saving another csv.
Or if your max(x) is too big, try split into 4, or 5 or even more like:
1:(max(x)/4)
and next run:
(max(x)/4+1) : (max(x)/2) etc
hope this helps,
JL
--
View this message in context:
http://r.789695.n4.nabble.com/
When I fit a logistic regression with 5 predictors (all of them are coded) i
get the standard error almost zero for the estimated coeffts. I request the
members to offer comments / suggestions / diagnostics?
[[alternative HTML version deleted]]
_
Hi,
I think you can try the function rep().
Example:
# this means rep 1 once, 2 twice and 3 three times
> rep(c(1,2,3), c(1,2,3))
[1] 1 2 2 3 3 3
# this means rep "A", "B", "C", until it reaches length of 10
> rep(c("A","B","C"), length.out = 10)
[1] "A" "B" "C" "A" "B" "C" "A" "B" "C" "A"
you
Hi,
I am wondering how I should interpreate the output of optFederov() in AlgDesign.
Specially I want to know what is $D, $A, $Ge and $Dea, which one I can use as
an efficiency to say how good the optimal design is.
I only know when a orthogonal design comes, $D = 1.
I red the pdf document
And thanks fo rthe pointer to the R introduction book as well
On Thu, Nov 24, 2011 at 11:00 AM, Mark Murphy wrote:
> Thank you
>
>
> On Thu, Nov 24, 2011 at 7:31 AM, B77S [via R] <
> ml-node+s789695n4102066...@n4.nabble.com> wrote:
>
>> out <- vector("list")
>> Ylab <- for(i in 1:length(BndY))
>
On 11/24/2011 02:50 AM, scriptham2 wrote:
Hi
I would like to plot bar charts in a particular way. The intervals are not
evenly distributed and are in a data frame column called size and the
relative frequencies are in a second column called mass. Both size and mass
are continuous ratio data to a
hi,
you may want to try the following, see whether you want this:
plot(NULL, xlim = c(0, 10), ylim = c(0, 8), xaxt = "n", yaxt = "n",
main = "The Demand Curve", xlab = "", ylab = "", bty = "n")
lines(x = c(1, 8), y = c(1, 1))
lines(x = c(1, 1), y = c(1, 8))
lines(x = c(1, 7), y = c(7, 1))
li
Thank you
On Thu, Nov 24, 2011 at 7:31 AM, B77S [via R] <
ml-node+s789695n4102066...@n4.nabble.com> wrote:
> out <- vector("list")
> Ylab <- for(i in 1:length(BndY))
> {
> out[i] <- paste(BndY[i]," to ",BndY[i],"mN")
> }
>
> Ylab <- do.call(c, out)
>
>
>
>
>
> markm0705 wrote
> Dear R helpers
>
Here is an example with what I've been able to manage for a vertical
colorkey:
library(lattice)# make levelplot available
library(openair) # make drawOpenKey available
# construct data
x = 1:10
y = rep(x,rep(10,10))
x = rep(x,rep(10))
z = x+y # in centimeters
# try work-around, at
Hi Sarah,
Thanks a lot! You are right, my data is not over a regular grid cell
locations.
One advantage of image() is that it can produce continuous color change for
the data value.
When the data value is over a large range, this will make it more
convenient.
Thanks!
Jeff
--
View this message in
Hello all
I'm running da.norm function in R for climate data
rngseed(1234567)
theta1=da.norm(mydata, thetahat, steps=1000,showits=T)
param1=getparam.norm(mydata,theta1)
As I understand the 1000 steps represent the markov chain values. Is there
a way to plot them? Something like plot(1:1000, para
Looking over the code below, I think this patched version might return
a better answer:
spec.cor <- function(dat, r, ...) {
x <- cor(dat, ...)
x[upper.tri(x, TRUE)] <- NA
i <- which(abs(x) >= r, arr.ind = TRUE)
data.frame(V1 = rownames(x)[i[,1]], V2 = colnames(x)[i[,2]], Value = x[
There have been two threads dealing with this in the last few weeks:
please search the recent archives for those threads for a good
discussion -- end result: Josh Wiley provided a useful little function
to do so that I'll copy below. RSeek.org is a good place to do your
searching.
spec.cor <- func
Try this for the given data: you'll have to modify the group label
trick a bit if row-numbers aren't even for each element of L, but it's
not hard.
L <- list(`0` = matrix(rnorm(6), ncol = 2), `1` = matrix(rnorm(6),
ncol = 2), `2` = matrix(rnorm(6), ncol = 2))
# Generally it's bad form to use numbe
Try this instead:
Ylab <- paste(BndY, BndY+50, "mN")
Michael
On Wed, Nov 23, 2011 at 5:26 PM, markm0705 wrote:
> Dear R helpers
>
> I'm trying to make up some labels for plot from this vector
>
> BndY<-seq(from = 18900,to= 19700, by = 50)
>
> using
>
> Ylab<-for(i in BndY) {c((paste(i," to ",i+
I think something like this is what you are looking for, but to be
honest, I don't quite understand what you are looking for: can you
actually write out the desired result:
tapply(df$x, df$Var, table)
where df is the name of your data.
df <- structure(list(Var = c(201L, 201L, 201L, 201L, 202L, 2
On Nov 23, 2011, at 8:23 PM, Duncan Murdoch wrote:
On 11-11-23 4:30 PM, Windows 7 Download wrote:
Dear R Development Core Team
R for Windows has been reviewed by Windows 7 Download and got 5
stars award:
snipped
Draw attention to your product by making it visible on website that
is use
On Nov 23, 2011, at 3:28 PM, avanz wrote:
How do I graph something simple like
http://sapedia.gosaints.org/images/1/13/Consumer_Surplus.gif
?plot
?polygon
with no numbers?
It may depend on what you mean by that last bit.
--
View this message in context:
http://r.789695.n4.nabbl
As the Kroger Data Munger Guru would say, "What is the problem you
are trying to solve?"
The datasets look just fine from a structural point of view. What do you
want to do and what is wrong with the results you get?
From: Kaiyin Zhong
Date: Thu, 24 Nov 2011 09:39:20 +0800
> d = data.fr
On 24/11/11 09:23, matric wrote:
Thanks Duncan,
I knew it. But if I use the complete variable name, I'll have far too
many arguments for my function
Did you understand Duncan's post? He told you that
df[,var]
would work, whereas df$var doesn't. So he gave you a solution
to the probl
> d = data.frame(gender=rep(c('f','m'), 5), pos=rep(c('worker', 'manager',
'speaker', 'sales', 'investor'), 2), lot1=rnorm(10), lot2=rnorm(10))
> d
gender pos lot1 lot2
1 f worker 1.1035316 0.8710510
2 m manager -0.4824027 -0.2595865
3 f speaker 0.893358
hi duncan: I ( possibly mistakenly ) let that through the mailman by
clicking on accept so I don't know
if it's just spam or real. my bad if i shouldn't have.
mark
On Wed, Nov 23, 2011 at 8:23 PM, Duncan Murdoch wrote:
> On 11-11-23 4:30 PM, Windows 7 Download wrote:
>
>> Dear R Development
On 11-11-23 4:30 PM, Windows 7 Download wrote:
Dear R Development Core Team
R for Windows has been reviewed by Windows 7 Download and got 5 stars award:
http://www.windows7download.com/win7-r-for-windows/snvrckjh.html
Draw attention to your product by making it visible on website that is used
On 11-11-23 3:23 PM, matric wrote:
Thanks Duncan,
I knew it. But if I use the complete variable name, I'll have far too
many arguments for my function
Maybe a new design is in order.
Duncan Murdoch
On 23 November 2011 20:59, Duncan Murdoch-2 [via R]
wrote:
On 23/11/2011 2:29 PM, matr
Hello all,
I'm trying to use the user-created multinomRob to make some models for my
data. While documentation for that function is fine and I think I'm using
it correctly, I'm getting the following error when I try to use my lists of
variables.
data <- read.csv("data.csv", header=FALSE)
subj1 <
Dear R helpers
I'm trying to make up some labels for plot from this vector
BndY<-seq(from = 18900,to= 19700, by = 50)
using
Ylab<-for(i in BndY) {c((paste(i," to ",i+50,"mN")))}
but the vector created is NULL
However if i use
for(i in BndY) {print(c(paste(i," to ",i+50,"mN")))}
I can see th
Hello,
I have this list of 2-d arrays:
$`0`
kd
[1,] 0.2011962 4.019537
[2,] 0.2020706 5.722719
[3,] 0.2029451 7.959612
$`1`
kd
[1,] 0.3148325 2.606903
[2,] 0.3160287 3.806665
[3,] 0.3172249 5.419222
$`2`
kd
[1,] 0.2332536 4.949390
[
Hello everybody
I am new on R
I have some problem when i try to obtain frequency table
which script do I need to write in R in order to obtain the frecuency of a
value per repetition
You could see my example
Var. rep x I need to obtain these
2011
Thanks Duncan,
I knew it. But if I use the complete variable name, I'll have far too
many arguments for my function
On 23 November 2011 20:59, Duncan Murdoch-2 [via R]
wrote:
> On 23/11/2011 2:29 PM, matric wrote:
>> Hi,
>> I'd like to create a function that accepts as arguments a string that
How do I graph something simple like
http://sapedia.gosaints.org/images/1/13/Consumer_Surplus.gif with no
numbers?
--
View this message in context:
http://r.789695.n4.nabble.com/simple-graph-for-economics-tp4101460p4101460.html
Sent from the R help mailing list archive at Nabble.com.
___
... and you can of course do the assignment:
Bndy <- paste (BndY,"to",50+seq_len(BndY), "mN", sep = " ")
"An Introduction to R" tells you about such fundamentals and should be
a first read for anyone learning R.
--- Bert
On Wed, Nov 23, 2011 at 4:10 PM, Bert Gunter wrote:
> Don't do this! pa
Don't do this! paste() is vectorized.
paste (BndY,"to",50+seq_len(BndY), "mN", sep = " ")
Cheers,
Bert
On Wed, Nov 23, 2011 at 3:31 PM, B77S wrote:
> out <- vector("list")
> Ylab <- for(i in 1:length(BndY))
> {
> out[i] <- paste(BndY[i]," to ",BndY[i],"mN")
> }
>
> Ylab <- do.call(c, out)
>
>
out <- vector("list")
Ylab <- for(i in 1:length(BndY))
{
out[i] <- paste(BndY[i]," to ",BndY[i],"mN")
}
Ylab <- do.call(c, out)
markm0705 wrote
>
> Dear R helpers
>
> I'm trying to make up some labels for plot from this vector
>
> BndY<-seq(from = 18900,to= 19700, by = 50)
>
> using
>
The function crossing.psp() in the spatstat package might be of use.
Here's an excerpt from its help page:
crossing.psp package:spatstat R Documentation
Crossing Points of Two Line Segment PatternsDescription:
Finds any crossing points between two line segment patterns.
Us
Matrix multiplication, maybe?
> all_data %*% iu
a b c
[1,] 1 4 0
[2,] 2 5 0
[3,] 3 6 0
I have no idea if this is a general solution or not, but it works in
this case. If you need something else, perhaps a more realistic
example would help.
Dennis
On Wed, Nov 23, 2011 at 11:41 AM, Ben quant
Hi:
Try this:
library('lattice')
xyplot(y ~ x,
type = c('g', 'p'),
panel = function(x, y, ...){
panel.xyplot(x, y, ...)
panel.lines(x, predict(fm), col = 'black', lwd = 2)
}
)
HTH,
Dennis
On Wed, Nov 23, 2011 at 9:18
Hi,
The significant interaction between A (continous) and B (categorical)
means that the slopes of Y in relation to A are different for classes
of B. Since your categorical B was binary, the default reference class
(B2) was intecept, and the slope of A for (B2) was 0.0017799. However,
the slope of
On Nov 23, 2011, at 2:56 PM, Kevin E. Thorpe wrote:
On 11/23/2011 02:01 PM, sarah44 wrote:
Dear all,
I am currently working on a function in which I would like to avoid
using
the command sample().
Therefore, I am now trying to make a for loop that does the same
thing as
the in built fu
I don't know what "Calc" is, but I think the duplicated() command will
work for what you need.
Michael
On Wed, Nov 23, 2011 at 1:37 PM, lunarossa wrote:
> I have a great dataset like this:
>
> name colour ... ... ...
> jerry red
> pippo red
> tom red
> tom y
On 23/11/2011 2:29 PM, matric wrote:
Hi,
I'd like to create a function that accepts as arguments a string that is to
be substituted within a variable name. For instance, suppose I have a data
frame df:
df<-data.frame(x_narrow=c(rnorm(100,0,1)),x_wide=c(rnorm(100,0,10)))
What I have in mind is s
On 11/23/2011 02:01 PM, sarah44 wrote:
Dear all,
I am currently working on a function in which I would like to avoid using
the command sample().
Therefore, I am now trying to make a for loop that does the same thing as
the in built function sample
does: Rearranging the items of a object randoml
Why would you want to avoid sample()? It's a perfectly wonderful function.
Michael
On Wed, Nov 23, 2011 at 2:01 PM, sarah44 wrote:
> Dear all,
>
> I am currently working on a function in which I would like to avoid using
> the command sample().
>
> Therefore, I am now trying to make a for loop t
Hello R community,
I have recorded online/offline timestamps per user that looks like this:
username,online_time,offline_time
a,2011-11-01 16:16:56.692572+01,2011-11-01 21:06:16.388903+01
a,2011-11-01 21:07:14.204367+01,2011-11-01 21:34:21.47081+01
a,2011-11-01 21:38:09.501356+01,2011-11-01 21:53
I have a great dataset like this:
name colour ... ... ...
jerry red
pippo red
tom red
tom yellow
tom green
jessie orange
jessie red
bill yellow
kate red
henry green
..
..
I want to find out, in this great dat
Hi,
I'd like to create a function that accepts as arguments a string that is to
be substituted within a variable name. For instance, suppose I have a data
frame df:
df<-data.frame(x_narrow=c(rnorm(100,0,1)),x_wide=c(rnorm(100,0,10)))
What I have in mind is something like:
f <- function(string){
Turns out it was really easy since your lines converted my data in POSIXct.
Thanks again for your time.
--
View this message in context:
http://r.789695.n4.nabble.com/Splitting-row-in-function-of-time-tp4077622p4101192.html
Sent from the R help mailing list archive at Nabble.com.
_
Dear all,
I am currently working on a function in which I would like to avoid using
the command sample().
Therefore, I am now trying to make a for loop that does the same thing as
the in built function sample
does: Rearranging the items of a object randomly.
So, the output I want to you get is
Hi Ben,
Try
all_data[, colSums(iu) == 0] <- NA
all_data
HTH,
Jorge.-
On Wed, Nov 23, 2011 at 2:41 PM, Ben quant <> wrote:
> Hello,
>
> Is there a faster way to do this? Basically, I'd like to NA all values in
> all_data if there are no 1's in the same column of the other matrix, iu.
> Put ano
Hello,
Is there a faster way to do this? Basically, I'd like to NA all values in
all_data if there are no 1's in the same column of the other matrix, iu.
Put another way, I want to replace values in the all_data columns if values
in the same column in iu are all 0. This is pretty slow for me, but
It's the first subroutine defined in ds11.f
Hope this helps,
Michael
On Wed, Nov 23, 2011 at 11:37 AM, kv wrote:
> Dear all,
>
> Would anyone know where is the file rlds.f called
> by rrcov::CovSde ? I can't find it in the sources,
>
> Thanks in advance,
>
> --
> View this message in context:
Thanks, Mark. These pages are kind of outdated. I guess I should be
able to make the materials in these blog posts into LyX 2.0.3. If
anybody is interested in testing, please contact me offline.
Regards,
Yihui
--
Yihui Xie
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa
On 23/11/2011 11:16 AM, alonso_canada wrote:
Hello, Rlisters
I have to compute p-values that are on the tail of the distribution,
P-values< 10^-20.
However, my current implementations enable one to estimate P-values up to
10^-12, or so.
A typical example is found below, where t is my critical
Dear List,
I can'f figure how to add point labels in the next plot (example from
?taxondive help page):
library(vegan)
data(dune)
data(dune.taxon)
taxdis <- taxa2dist(dune.taxon, varstep=TRUE)
mod <- taxondive(dune, taxdis)
plot(mod)
The points in this plot are diversity values of single sites,
Type help.start() in your terminal and read the provided introductory
materials.
Michael
On Nov 23, 2011, at 1:51 PM, Assieh Rashidi wrote:
>
>
> Hi everyone,
> I want to generate data by using mean, min, max. Is it�possible that i can
> write R code?
> How�can i do it?
> thanks,
> R.N
>
Hi everyone,
I want to generate data by using mean, min, max. Is it possible that i can
write R code?
How can i do it?
thanks,
R.N
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
Probably
?anova
?add1
?drop1
are what you're looking for.
-- Bert
On Wed, Nov 23, 2011 at 6:07 AM, Christopher Desjardins
wrote:
> Hi,
>
> I am wondering if anyone knows how to perform an F-test on the change in R
> square between hierarchical models in R? SPSS provides this information and
>
Hello everyone,
Recently, I faced a problem on explanatory of *Interaction variable* in
Linear Regression, could anyone give me some help on how to explain that?
the response variable Y is significantly correlated with *Interaction
variable X* which is consisted of Continuous predictor A and Cate
On Wed, Nov 23, 2011 at 10:48 PM, Doran, Harold wrote:
> Given the following data, I want a scatterplot with the data points and the
> predictions from the regression.
>
> Sigma <- matrix(c(1,.6,1,.6), 2)
> mu <- c(0,0)
> dat <- mvrnorm(5000, mu, Sigma)
>
> x <- dat[,1] * 50 + 200
> y <- dat[,2]
Stewart,
I am replying to the graphical part of your query.
## This was constructed with
## dump("scriptham2","")
## sso it can be copied directly from the email into an R session.
scriptham2 <-
structure(list(size = c(2500, 2000, 1700, 1400, 1000, 800, 600,
300, 180, 100), mass = c(0, 0.
Given the following data, I want a scatterplot with the data points and the
predictions from the regression.
Sigma <- matrix(c(1,.6,1,.6), 2)
mu <- c(0,0)
dat <- mvrnorm(5000, mu, Sigma)
x <- dat[,1] * 50 + 200
y <- dat[,2] * 50 + 200
fm <- lm(y ~ x)
### This gives the regression line, but not
You may want to enable garbage collection on
gctorture(on = TRUE)
see: ?gctorture
?gcinfo
?object.size
>-Original Message-
>From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org]
>On Behalf Of Marc Jekel
>Sent: 23 November 2011 15:42
>To: R-help@r-project.org
Hello all,
Yesterday I wrote Michael Weylandt to ask for some help in understanding
a line of code he used responding to SarahH's query about controlling
colours in scatter plots. He wrote an excellent explanation that
deserves to be shared here. Below I include the code I wrote while
experim
try this: if line locations are not fixed, then use grepl to find the
matching line -
> x <- readLines(textConnection("# using minimal fraction of valid points 30.00
+ # tas [K] from bcc-csm1-1 model output prepared for CMIP5 RCP8.5
+ # cutting out region lon=0.000 360.000, lat= -90.000 9
On Wed, Nov 23, 2011 at 10:17 AM, aa99 wrote:
> hey ;
>
> i would like to sum the following table by row and col. Appreciate your
> help.
?rowSums
?colSums
HTH
James
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
P
Dear all,
Would anyone know where is the file rlds.f called
by rrcov::CovSde ? I can't find it in the sources,
Thanks in advance,
--
View this message in context:
http://r.789695.n4.nabble.com/CovSde-F-sources-tp4100374p4100374.html
Sent from the R help mailing list archive at Nabble.com.
___
Thank you for the quick and precise answer.
I am sorry for the very slow reply. I've been really busy lately.
The lines you sent me work pretty well although my graphs still seem to
consider periods that end with 00:00:00 as part of another day, probably
because of the date. I'm currently trying
many thanks Michael, that works nice!
and Sry. I do read a lot of helme-files,
but just don´t always get it.
--
View this message in context:
http://r.789695.n4.nabble.com/Continuously-compounded-Returns-with-quantmod-data-tp4090014p4100141.html
Sent from the R help mailing list archive at Nabb
Hi,
I have recorded online/offline timestamps per user that looks like this:
username,online_time,offline_time
a,2011-11-01 16:16:56.692572+01,2011-11-01 21:06:16.388903+01
a,2011-11-01 21:07:14.204367+01,2011-11-01 21:34:21.47081+01
a,2011-11-01 21:38:09.501356+01,2011-11-01 21:53:45.272321+
I use pgfSweave so that I can embed R code and output in LaTeX;
pgfSweave depends on the formatR package to format the code, and the highlight
package to highlight R code; graphics are based on tikzDevice, which has better
quality than R's PDF or postscript output, in my opinion.
Check out the de
I had the same problem while doing classification using rpart. The mistake I
had made was that the column names in the data frames had spaces and other
special characters. I got the output when I changed this. Hope this helps.
--
View this message in context:
http://r.789695.n4.nabble.com/lme-con
Hi R users,
Do you have an idea on how to use R language in Time Series with
intervention?
I'm very confused in how to use it for my undergrad thesis "Intervention
Analysis of Fisheries Production".
Hoping for your response.
Thanks,
Wil
[[alternative HTML version deleted]]
_
Dear R community,
I was observing a memory issue in R (latest 64bit R version running on a
win 7 64 bit system) that made me curious.
I kept track of the memory f my PC allocated to R to calculate + keep
several objects in the workspace. If I then save the workspace, close R,
and open the wo
I've manged this way:
df2 <- df1[-match(784, row.names(df1)), ]
Isn't there any other way?? How can I retrieve/delete three rows with the
same command line?u...@host.com
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-keep-row-name-if-there-is-only-one-row-selected-from
Dear R,
The glmulti package no longer loads through the library() command, apparently
because of a problem with rJava.
I have today reinstalled R from scratch (updated to v2.14.0) and reinstalled
all packages from scratch and updated them all too. The problem is the same as
I found on v2.13.2.
Hi,
I am wondering if anyone knows how to perform an F-test on the change in R
square between hierarchical models in R? SPSS provides this information and
a researcher that I am working with is interested in getting this
information. Alternatively, if someone knows how I can calculate the test
sta
Nov 23, 2011 at 1:27am Andreas wrote:
> I would like to do multiple comparisons for treatment levels within day
> (i.e. across treatments
> for each day in turn)
Andreas,
The following does what you want. To see how/why it works, look at the
vignette to package multcomp, where there is an exampl
Dear R-help guys,
I am trying to extract two particular words from different files but I am
struggling with the code. The first theree lines of each folder are as
follows:
# using minimal fraction of valid points 30.00
# tas [K] from bcc-csm1-1 model output prepared for CMIP5 RCP8.5
# cutting ou
Hello.
I have a large dataset with sales pr month for 56 products with 10 months
and i have tried to see how the sales are correlated using
cor()
This has given me a 56X56 matrix with the R value for each product pair.
Most of these correlations are insignificant, and i want only to retain the
i
Hello, Rlisters
I have to compute p-values that are on the tail of the distribution,
P-values < 10^-20.
However, my current implementations enable one to estimate P-values up to
10^-12, or so.
A typical example is found below, where t is my critical value.
### example - code adapted fro
Thanks.
On 11/23/11 2:20 AM, Deepayan Sarkar wrote:
On Tue, Nov 15, 2011 at 6:53 PM, Carlisle Thacker
wrote:
Sorry that I was not clear. I was asking how to add annotation to
levelplot's colorkey, not the levelplot itself. The only entry I can
find from the help pages is via its labels.
Go
I want to confirm that it worked (took some time though to find the needed
libraries!)
now I get from the readGal the following struct
> str(store)
Formal class 'SpatialGridDataFrame' [package "sp"] with 6 slots
..@ data :'data.frame': 65536 obs. of 1 variable:
.. ..$ band1: int [1:655
hey ;
i would like to sum the following table by row and col. Appreciate your
help.
BrandName Segment Retail QSlod
Oral B Whitening 10 2
Colgate Sensitive 20 4
Colgate Sensitive 30 6
Oral B Whitening 40 8
Close UpW
On Nov 23, 2011, at 00:24 , Rolf Turner wrote:
>>
>> library(fortunes)
>> fortune("parse()")
> The fortune notwithstanding I find this *specific* use of parse() to be
> very, uh, useful! :-)
The fortune does say "usually", and there certainly are exceptions, for
instance the use in Rcmdr where
Depending upon what you are trying to do with them, how about storing the
dataframes as a multidimensional array of size 4x3x3 in the case below. After
that you can use the sapply function with the
appropriate MARGIN argument specified:
For example
mydfs <- as.array(list(df1, df2, df3))
sa
Whenever similar objects are to be handled with similar code, having the data
frames stored in lists or even as one big data frame is preferred. If you can
load them as such, half the complexity is addressed right there.
The for loop processing is usually wrapped up using base apply functions or
Gianni,
You should not "tune" ntree in cross-validation or other validation methods,
and especially should not be using OOB MSE to do so.
1. At ntree=1, you are using only about 36% of the data to assess the
performance of a single random tree. This number can vary wildly. I'd say
don't both
Hi
I would like to plot bar charts in a particular way. The intervals are not
evenly distributed and are in a data frame column called size and the
relative frequencies are in a second column called mass. Both size and mass
are continuous ratio data to all intents and purposes. The data actually
r
On Nov 23, 2011, at 10:19 AM, Smart Guy wrote:
Hi Eric,
Thanks for the reply.
Actually, I am looking for a way so that my custom attributes are
not lost
after the row insert operation. It can be rbind() or some other way.
dfm <- dfm[c(1,1:nrow(dfm), ]
dfm[ 1, ] <- c(age=16, weight= 4
Hey
I am trying to run /coeftest()/ using a heteroskedasticity-consistent
estimation of the covariance matrix and i get this error:
# packages
>library(lmtest)
>library(sandwich)
#test
> coeftest(*GSm_inc.pool*, vcov = vcovHC(*GSm_inc.pool*, method="arellano",
> type="HC3"))
/Fehler in 1 - diagh
Just for the records, the solution was to make the matrix 'dgCmatrix"
instead of 'dsCmatrix', 'dgCmatrix' works and 'dsCmatrix' does not. I
suspect that this has to do something with the S4 class hierarchy in
Matrix, but I am not sure.
This is a quite ugly workaround, since it depends on some inte
> for (d in paste('df', 1:3, sep='')) {
+ assign(d, as.data.frame(replicate(3, rnorm(4
+ }
> dats = list(df1,df2,df3)
> for (i in 1:length(dats)) {
+ names(dats[[i]]) = c('w', 'l', 'h')
+ }
> dats
[[1]]
w l h
1 1.24319239 -0.05543649 0.05409178
2 0.05124331
On Nov 22, 2011, at 5:13 PM, David Winsemius wrote:
On Nov 22, 2011, at 4:58 PM, Szymek Drobniak wrote:
Dear R users,
do you know an easy way (other than star plot) of making several
points
laying one over another visible? Is it any simple way of increasing
such
"multipoint" symbols - o
Hi Eric,
Thanks for the reply.
Actually, I am looking for a way so that my custom attributes are not lost
after the row insert operation. It can be rbind() or some other way.
Regards,
SG
On 23 November 2011 18:07, Eric Lecoutre wrote:
>
> I guess rbind takes attributes from the first dat
Tanja
Your TSdata object dfdata as printed in your email looks a bit funny. It should
be a list with a matrix of numeric data in the element named output:
> dfdata <- TSdata(output=matrix(rnorm(200), 100,2))
> dfdata
output data:
Series 1 Series 2
10.01905979 -0.096441240
20.
Hi,
I've not come across "Royston's measure of prognostic separation"
before, so I might be completely off the mark, but it is likely that by
"invnormal" it is meant the inverse of a standard normal distribution,
i.e. one with a mean of 0 and standard deviation of 1. Which is what
qnorm gives by d
You probably mean this:
df1[!(rownames(df1) %in% c("2098","2970","784")), ]
Remember, row names are strings: if you give R an integer, it will
interpret it as a row index.
Michael
On Wed, Nov 23, 2011 at 5:37 AM, agent dunham wrote:
> Dear Community,
>
> I'm having a similar problem. I'm worki
Dear all,
I am using R 2.9.2 on Windows XP.
I am undertaking a simulation study to consider methods of external validation
in the context of missing covariates in the validation data set. I would like
to use Royston's measure of prognostic separation as a method of external
validation. Alth
Hi everybody,
Thank you so much for your answers. The easiest and most straight forward
solution is using the function segm_dist from package "pracma" as suggested by
Hans Borchers.
Thanks again and Happy Thanksgiving for those who celebrate!
Monica
Message: 99
Hello,
Can anyone provide or point me to a good setup for the listings latex package
that would produce nice R-syntax highlighting?
I am using an example I found in internet for setting up listings like this:
\lstset{
language=R,
basicstyle=\scriptsize\ttfamily,
commentstyle=\ttfamily\color{gray
If it's working you are just getting lucky: this is the syntax you want/need:
if(any(rowSums(m) == N.1s)) flag <- TRUE
You test each of the rowSums and then you check if any of the results are true.
That warning came up because R has a way to convert numbers to T/F values but
it hesitates bec
1 - 100 of 128 matches
Mail list logo