Hi Axel,
I do not have a nice explanation why the results differ off the top of
my head. I can say I can replicate what you get on 32/64 (both
Windows 7) bit with the development version of R and gbm_1.6-3.1.
Here is an even simpler example that shows the difference:
gbmfit <- gbm(1:50 ~ I(50:1
Dear all:
I have used the cph function in the rms package.
log10 was used to transform the variables, as follows:
fit<-cph(pfsurv~log10(x1)+log10(x2),x=T,y=T,surv=T)
after I run the nomogram function.
I found "variable limits and transformations are such that an infinite axis
value has resulted."
Dear List,
The gbm package on Win 7 produces different results for the
relative importance of input variables in R 32-bit relative to R 64-bit. Any
idea why? Any idea which one is correct?
Based on this example, it looks like the relative importance of 2 perfectly
correlated predictors is "dilute
I do not know exactly about Sun Sparc but I use some *nix and readline is a
library available and is used by the operating system to recall lines of
previously typed input. So I suggest to search readline package for Sun
Sparc.
Good luck
Caveman
On Sat, Feb 26, 2011 at 2:18 AM, wrote:
> Dear
On Feb 25, 2011, at 8:28 PM, zem wrote:
hi all,
i have a little problem, i have some code writen, but it is to slow...
i have a dataframe with a column of time series and a grouping column,
really there is no metter if in the first col what kind of data is,
it can
be a random number like
hi all,
i have a little problem, i have some code writen, but it is to slow...
i have a dataframe with a column of time series and a grouping column,
really there is no metter if in the first col what kind of data is, it can
be a random number like this
x<-rnorm(10)
gr<-c(1,3,1,2,2,4,2,3,3,3)
x
Hi,
I have two questions:
1) Since I switched to Windows 2007 and downloaded the current R version
(2.12.1; 2010-12-16) for Windows 7 a month ago, I cannot down load packages
through the GUI drop down menu. I get: Warning: unable to access index for
repository http://cran.cnr.Berkeley.edu
Dear R-HELP,
We are compiling R-2.12.1 for 64 bits onto a Sun Sparc machine below:
SunOS 5.10 Generic_142900-13 sun4u sparc SUNW,Netra-T12
The source was compiled successfully with "gcc version 3.4.6" by using the
default configuration and has produced R-2.12.1 in 32 bits.
Compiling R-2.12.1 fo
Hi 1Rnwb,
I am a technical support for Hitachi Solutions and I saw your post regarding
ELISA analysis. When I opened up your .csv file, I noticed it was a Luminex
file from the Data Collector 1.7 software. My company developed a multiplex
data analysis software for the Luminex platform called
Hello fellow R programmers,
I'm trying to use package e1071's naiveBayes function to create a model with
weighted data. See example below, variable "d" is a count variable that
provides the # of records for the given observation combination. Is anyone
aware of a "weight" argument to this method?
Hi,
I have what I think is some kind of linear programming question.
Basically, what I want to figure out is if I have a vector of numbers,
> x <- rnorm(10)
> x
[1] -0.44305959 -0.26707077 0.07121266 0.44123714 -1.10323616
-0.19712807 0.20679494 -0.98629992 0.97191659 -0.77561593
> mean(x)
On 25/02/2011 12:48 PM, Noah Silverman wrote:
Hi,
I'm trying to install a module - gputools - and keep getting compile
time errors about missing R.h
Does anyone know where this file can be found?
It's in the "include" subdirectory in an installed R, and in src/include
in the source. It shou
On 25/02/2011 11:24 AM, Jannis wrote:
Dear R list,
I get a strange error in R:
*** caught segfault ***
address 0x6951c20, cause 'memory not mapped'
Traceback:
1: .C("spline_eval", z$method, nu = as.integer(n), x = as.double(xout), y =
double(n), z$n, z$x, z$y, z$b, z$c, z$d, PACKAGE
Thanks to all for clarifications. So I'm off base, but whether waaay
off base depends on whether there is a reasonably well defined optimum
to converge to. Which begs the question, I suppose: How does one know
whether one has converged to such an optimum? This is always an
issue, of course, even f
You'll want to use the .packages option to foreach to ensure that the
appropriate packages are also loaded in the child instances of R. There's an
example of its use in Section 5.1 "Parallel Random Forest" of the foreach
reference manual:
http://cran.r-project.org/web/packages/foreach/vignettes/fo
Dear expeRts,
I would like to use LaTeX-like symbols in keys via plotmath. Below is a minimal
example. I get:
Error in fun(key = list(x = 0.5, y = 0.8, text =
list(list(expression(paste("(", :
first component of text must be vector of labels
What's wrong? How can I create the required vector
I have worked on a 2D image reconstruction problem in PET (positron emission
tomography) using a Poisson model. Here, each pixel intensity is an unknown
parameter. I have solved problems of size 128 x 128 using an accelerated EM
algorithm. Ken Lange has shown that you can achieve term by term se
On Fri, Feb 25, 2011 at 5:21 PM, Dimitri Liakhovitski
wrote:
> Hello!
>
> s<-"start"; e<-"end"
> middle<-as.character(c(1,2,3))
>
> I would like to get the following result:
> "start 123 end" or "start 1 2 3 end" or "start 1,2,3 end"
>
> How can I avoide this (undesired) result:
> paste(s,middle,e
For functions that have a reasonable structure i.e., 1 or at most a few optima,
it is
certainly a sensible task. Separable functions are certainly nicer (10K 1D
minimizations),
but it is pretty easy to devise functions e.g., generalizations of Rosenbrock,
Chebyquad
and other functions that are h
On Feb 25, 2011, at 4:28 PM, Carl Witthoft wrote:
Just wondering: it appears that "srt" does not accept a vector of
values, just a single value. I ended up using tapply() as the
following code snippet shows, so it's not a major problem. I was
justa little surprised that this argument
Thanks a lot, everyone!
collapse it is!
Dimitri
On Fri, Feb 25, 2011 at 5:42 PM, wrote:
>> s<-"start"; e<-"end"
>> middle<-as.character(c(1,2,3))
>>
>> I would like to get the following result:
>> "start 123 end" or "start 1 2 3 end" or "start 1,2,3 end"
>>
>> How can I avoide this (undesired) r
Hi Dimitri,
You can do it like this:
paste(s,paste(middle, collapse=""),e,sep=" ")
Best,
Ista
On Fri, Feb 25, 2011 at 5:21 PM, Dimitri Liakhovitski
wrote:
> Hello!
>
> s<-"start"; e<-"end"
> middle<-as.character(c(1,2,3))
>
> I would like to get the following result:
> "start 123 end" or "start
> s<-"start"; e<-"end"
> middle<-as.character(c(1,2,3))
>
> I would like to get the following result:
> "start 123 end" or "start 1 2 3 end" or "start 1,2,3 end"
>
> How can I avoide this (undesired) result:
> paste(s,middle,e,sep=" ")
Sometimes you just have to do something more than once:
past
The easiest thing to do is add a second paste
statement:
> paste(s, paste(middle, collapse=" "), e, sep=" ")
[1] "start 1 2 3 end"
> paste(s, paste(middle, collapse=","), e, sep=" ")
[1] "start 1,2,3 end"
> paste(s, paste(middle, collapse=", "), e, sep=" ")
[1] "start 1, 2, 3 end"
On Fri, Feb 25
paste(s,paste(middle,collapse=""),e,collapse=" ")
On Fri, Feb 25, 2011 at 4:21 PM, Dimitri Liakhovitski <
dimitri.liakhovit...@gmail.com> wrote:
> Hello!
>
> s<-"start"; e<-"end"
> middle<-as.character(c(1,2,3))
>
> I would like to get the following result:
> "start 123 end" or "start 1 2 3 end"
Hello Noah,
Many of these suggestions are already good, (and possibly better than you
think, depending on your level of experience).
Using lists helps a lot, because the elements of the list have easily
accessible names, and you can query the nodes to determine how many
variables you have in each
Hello!
s<-"start"; e<-"end"
middle<-as.character(c(1,2,3))
I would like to get the following result:
"start 123 end" or "start 1 2 3 end" or "start 1,2,3 end"
How can I avoide this (undesired) result:
paste(s,middle,e,sep=" ")
Thank you!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
> I often get this error "missing value where TRUE/FALSE needed" when
> I'm doing some loops, like with this one
>
> ...
> Can someone explain me what I do wrong because I don't see the
> difference with other loops that work
It's probably not the loop that's biting you, but rather the data. T
On Fri, Feb 25, 2011 at 12:00 PM, Brian Tsai wrote:
> Hi John,
>
> Thanks so much for the informative reply! I'm currently trying to optimize
> ~10,000 parameters simultaneously - for some reason,
-- Some expert (Ravi, John ?) please correct me, but: Is the above not
complete nonsense? I can't i
Hi Christopher,
i think you have the same problem like me today :)
see this
http://r.789695.n4.nabble.com/group-by-in-data-frame-tc3324240.html post
i think you can find there the solution
zem
--
View this message in context:
http://r.789695.n4.nabble.com/means-SD-s-and-tapply-tp3325158p33
On 2/24/11 1:21 PM, David Winsemius wrote:
On Feb 24, 2011, at 1:03 PM, Duke wrote:
Hi folks,
I am wondering if the following is possible: I want to control the
arguments sent to a function by string variables. For example,
instead of
> heatmap.2( A, col=greenred(75) )
I would want to have
Hi All,
Sorry if this seems obvious, I'm new to R.
I've run nearest-neighbour matching in MatchIt for three different treatment
groups. By this I mean, I have three separate treatments, each with a
different control group.
I want to combine the MatchIt outputs so that I can estimate treatment
Look at
Sys.info()
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 2/25/11 10:23 AM, "Hui Du" wrote:
>Hi All,
>
>I have two Rs, one has been installed in Windows system
>and another one has been inst
On Thu, 2011-02-24 at 21:14 -0500, Eric R. Schmidt wrote:
> Hello all,
>
> I am currently attempting to replicate data from a political science article
> that utilized a Markov chain transition model to predict voter turnout
> intention at time *t*; the data was separated into two different models
ok, i have it - match()
10x all again! :)
--
View this message in context:
http://r.789695.n4.nabble.com/group-by-in-data-frame-tp3324240p3325269.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
http
Dear R-HELP,
We are compiling R-2.12.1 for 64 bits onto a Sun Sparc machine below:
SunOS 5.10 Generic_142900-13 sun4u sparc SUNW,Netra-T12
The source was compiled successfully with "gcc version 3.4.6" by using the
default configuration and has produced R-2.12.1 in 32 bits.
Compiling R-2.12.1 fo
Dear R-help community,
I often get this error "missing value where TRUE/FALSE needed" when I'm doing
some loops, like with this one
for (i in 1:nrow(survey)) {
if (survey[i,7]==survey[i,3])
{survey[i,14]<-survey[i,6]}
else
if(survey[i,11]==0 && survey[i,12]==0)
{survey[i,14]<-sur
Great. Thanks.
Best Regards,
Hui Du
Data Ventures Inc
-Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: Friday, February 25, 2011 12:59 PM
To: Hui Du
Cc: r-help@r-project.org
Subject: Re: [R] R in different OS
On Feb 25, 2011, at 1:23 PM, Hui Du wrote:
>
chris, it seems like you need the plyr package, esp ddply. for example:
stems353 <- data.frame(Time = rep(c("Modern", "Old"), 4),
SizeClass = rep(c("class1","class2"), each = 4),
Species = rep(c("a","b"), each = 4),
Stems = seq(1,8,1))
ddply(stems353, .(Species, SizeClass, Time), summarise,
mea
hi guys,
many many thanks for all the solutions! :-D they are working great!
i have another "little" question:
i would like to save these groups in a new column with serial number like
the solution from David, but wit integer values: 1,2,3...
i do this allready but with my 1. solution and there
So to simplify this a bit:
Using dataframe:
name x1 x2 x3 x4 x5 x6 x7 x8
1 fred 2 3 4 6 7 8 9 12
2 fred 4 5 6 8 9 10 11 14
3 fred 6 7 8 10 11 12 13 16
4 fred 8 9 10 12 13 14 15 18
5 james 10 11 12 14 15 16 17 20
6 james 12 13 14 16 17 18 19 22
7 james 14 15 16 18
> resp <- postForm('http://our.db/db/new', 'profileid'='181133',
'value'='20110225', 'type'='history','user-agent' = 'R', .opts
=list(verbose=T, userpwd='test:test'))
* About to connect() to
See str(version). version$platform or version$os should work for what you're
looking for.
Cheers,
Noah
On Feb 25, 2011, at Feb 25 1:23 PM , Hui Du wrote:
> Hi All,
>
>I have two Rs, one has been installed in Windows system and
> another one has been installed under UNIX syst
First off, I want to apologize for taking so long to respond, and thank
you for responding in the first place.
The LOCALE issue you pointed out is due to the fact that I normally run R
on Mac in a command line context (in a tcsh shell in an xterm window).
I tried the same commands in the R Consol
Hello,
A colleague is trying to do a fairly complicated power analysis for a
project. The project would be evaluating random assignment to one of three
conditions within each of 8 sites. The dependent variable would be binary
(we do not care at this point whether it would be analyzed with logit or
Just wondering: it appears that "srt" does not accept a vector of
values, just a single value. I ended up using tapply() as the
following code snippet shows, so it's not a major problem. I was justa
little surprised that this argument (srt) differs from things like
"labels," "lty," "col
Hi:
Here's one way:
d <- read.table(textConnection("
ind xloc yloc gonad
1 15 2 12
2 15 4 25
3 13 3 30
4 15 4 10
5 11 4 08
10 11 4 11"), header = TRUE)
closeAllConnections()
library(plyr)
dsum <- ddply(d, .(x
Hi:
On Fri, Feb 25, 2011 at 12:09 PM, Christopher R. Dolanc <
crdol...@ucdavis.edu> wrote:
> I'm trying to use tapply to output means and SD or SE for my data but
> seem to be limited by how many times I can subset it. Here's a snippet
> of my data
>
> > stems353[1:10,]
> Time DataSource
On Feb 25, 2011, at 3:09 PM, Christopher R. Dolanc wrote:
I'm trying to use tapply to output means and SD or SE for my data but
seem to be limited by how many times I can subset it. Here's a
snippet
of my data
stems353[1:10,]
Time DataSource Plot Elevation Aspect Slope Type Sp
Hi All,
I've been doing circles with this all morning, although I'm sure there's
a simple solution. I have a data.frame "pop" as follows:
> pop
ind xloc yloc gonad
1 15 2 12
2 15 4 25
3 13 3 30
4 15 4 10
5 11 4 08
.
On Feb 25, 2011, at 1:23 PM, Hui Du wrote:
Hi All,
I have two Rs, one has been installed in Windows
system and another one has been installed under UNIX system. Is
there any environmental variable or function to tell me which R I am
using? The reason that I need to know it
Hi,
see ?R.version
Something like
if(version$os == "mingw32") {
path = "/ABC"} else {
path = "/DEF"
}
might do it, but I'm not sure exactly what possible values version$os
can take or what determines the value exactly.
Best,
Ista
On Fri, Feb 25, 2011 at 1:23 PM,
On Feb 25, 2011, at 12:23 PM, Hui Du wrote:
> Hi All,
>
>I have two Rs, one has been installed in Windows system and
> another one has been installed under UNIX system. Is there any environmental
> variable or function to tell me which R I am using? The reason that I need to
>
Hi Hui,
May be sessionInfo() is what you are looking for. See ?sessionInfo as well
as ?version for more details. You can run the following on your R session
and see what comes up:
sessionInfo()
sessionInfo()$R.version$platform
version$platform
Then, you might use ifelse() to set up the right pat
Dear R users
I am new R user, execuse me I bother you, but I worked hard to find a
solution:
# data
ID <- c(1:100)
set.seed(21)
y <- rnorm(100, 10,2)
x1 <- rnorm(100, 10,2)
x2 <- rnorm(100, 10,2)
x3 <- rnorm(100, 10,2)
x4 <- rnorm(100, 10,2)
x5 <- rnorm(100, 10,2)
x6 <- rnorm(100, 10,2)
mydf <- d
Does it work for FUN=mean? If yes, you need to print out the results of f
before you return them to find the anomalous value.
BTW "Error" is not a very good subject line. I don't see many posts from
people reporting how well things are going :)
-Original Message-
From: r-help-boun...@
What types of interaction do you want?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Abhishek Pratap
> Sent
This is the first time that I've posted to this list, so if I'm doing
something wrong, please let me know. Also, if there is a searchable forum
where I can find help, that would be good too.
I'm doing a card sorting experiment, and I'm having problems imputing my
data into R for later analysis
Thanks Mike - this doesn't quite do it, but I think that you've hit of the
right method.
I am just trying to use 'plot' initially - I don't care so much about the
arrangement in the file.
plot(df$y,group=df$f) outputs the Y column in the appropriate plot. What I
would like to do is have 10 Y col
I'm trying to use tapply to output means and SD or SE for my data but
seem to be limited by how many times I can subset it. Here's a snippet
of my data
> stems353[1:10,]
Time DataSource Plot Elevation Aspect Slope Type Species
SizeClass Stems
1 ModernCameron 70F221 1730
Hi All,
I have two Rs, one has been installed in Windows system and
another one has been installed under UNIX system. Is there any environmental
variable or function to tell me which R I am using? The reason that I need to
know it is under different system, the data path could b
I can hopefully save bandwidth here by suggesting that this belongs on
the R-sig-mixed-models list.
-- Bert
As an aside, shouldn't you be figuring this out yourself or seeking
local consulting expertise?
On Fri, Feb 25, 2011 at 9:08 AM, Ben Ward wrote:
> Hi, As part of my dissertation, I'm goin
Hi Rex,
Thanks for you explain. In fact, my question is: When I observed that
there are 6 or more balls in one box, what is this probability? The
ball is randomly put into the boxes.
I think it is: 1-pbinom(6,142,1/491) = 2.272026e-08.
When the sample size is large, how should I do this? using ch
Hi John,
Thanks so much for the informative reply! I'm currently trying to optimize
~10,000 parameters simultaneously - for some reason, when I compare the
memory usage for L-BFGS-B and BFGS, the L-BFGS-B only uses about 1/7 of the
memory, with all default input parameters, I'm a bit surprised th
On Feb 25, 2011, at 1:09 PM, David Winsemius wrote:
On Feb 25, 2011, at 12:33 PM, Noah Silverman wrote:
My actual code is several things with adaptive filtering. This will
require accessing data sporadically. The loop was just a quick
example
for the e-mail.
One application is to work
P.S. I used the latest version of the rms package to run this. The Design
package is no longer supported.
Frank
-
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context:
http://r.789695.n4.nabble.com/Interpreting-the-example-given-by-Prof-Frank-Ha
On Feb 25, 2011, at 12:33 PM, Noah Silverman wrote:
My actual code is several things with adaptive filtering. This will
require accessing data sporadically. The loop was just a quick
example
for the e-mail.
One application is to work with online (streaming) data. If I get a
new
data p
On Fri, Feb 25, 2011 at 11:26 AM, Mingo wrote:
> Hello, I'm attempting to access a specific number of sub diagonals in a
> MATRIX and have been accustomed to using spdiags in MATLAB or Octave. I've
> got a solution pieced together using for loops and it works though isn't
> vectorized and liable t
To access a variable by a character string name, try
for(code in codes)
{
dat <- get(code)
[stuff]
}
Other options include ?assign if you need to manipulate the original, or
?with to use the subject of "codes" as an environment.
--
Jonathan P. Daily
Technician
Hi,
I'm trying to install a module - gputools - and keep getting compile
time errors about missing R.h
Does anyone know where this file can be found?
Thanks!
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do r
Are you clear about the question you are asking? Do you want to know whether
there are 6 balls or at least 6 balls? (It sounds like "at least".) Do you
want to know whether there are at least 6 balls in the first box, or at least 6
balls in exactly one box or at least 6 balls in at least one
Thank so much to everybody who found time to answer my question
All your messages are of great help.
Good luck
У Пят, 25/02/2011 у 05:46 -0800, Dennis Murphy піша:
> And in that vein, the recently released MethComp package by Bendix
> Carstensen may be of service.
>
> HTH,
> Dennis
>
> On Fr
Hi, As part of my dissertation, I'm going to be doing an Anova,
comparing the "dead zone" diameters on plates of microbial growth with
little paper disks "loaded" with antimicrobial, a clear zone appears
where death occurs, the size depending on the strength and
succeptibility. So it's basicall
I simply don't understand why I get this error when using a larger dataset.
Error in `[<-.data.frame`(`*tmp*`, i, , value = integer(0)) :
replacement has 0 items, need 37597770
In addition: Warning message:
In max(i) : no non-missing arguments to max; returning -Inf
Any ideas on what this
Dear R community members and R experts
I am stuck at a point and I tried with my colleagues and did not get it out.
Sorry, I need your help.
Here my data (just created to show the example):
# generating a dataset just to show how my dataset look like, here I have x
variables
# x1 ...
Hello all
I am a very new R user
I am used to using STATA
My problem:
I want to build a Cox model and validate this.
I have a large number of clinical relevant factors and feel the need to
reduce these. Meanwhile I have some clinical variables I deem sufficiently
important to fo
Hello, I'm attempting to access a specific number of sub diagonals in a
MATRIX and have been accustomed to using spdiags in MATLAB or Octave. I've
got a solution pieced together using for loops and it works though isn't
vectorized and liable to run very slow
for large matrices.
As an example:
A =
My actual code is several things with adaptive filtering. This will
require accessing data sporadically. The loop was just a quick example
for the e-mail.
One application is to work with online (streaming) data. If I get a new
data point in for code "a1", I'll need to be able to reference the
m
On Fri, Feb 25, 2011 at 6:09 AM, Abeer Fadda
wrote:
> hi,
> I would like to find the x value (independent variable) for a certain
> dependent value using the fitted model with nls.
> with (predict) I can find y that corresponds to a list of x. I need the other
> way around. can it be done?
> tha
On 02/25/2011 04:26 AM, Sukhbir Rattan wrote:
> Hi,
>
> I have two data set of normalized Affymetrix CEL files, wild type vs Control
> type.(each set have further three replicates).
>
>
>> wild.fish
> AffyBatch object
> size of arrays=712x712 features (10 kb)
> cdf=Zebrafish (15617 affyids)
> nu
Hi:
Here's another way:
c1<-c(1,2,3,2,2,3,1,2,2,2)
c2<-c(5,6,7,7,5,7,5,7,6,6)
c3<-rnorm(10)
x <- data.frame(c1 = factor(c1), c2 = factor(c2), c3)
x <- transform(x, mean = ave(c3, c1, c2, FUN = mean))
Yet another with function ddply() in package plyr:
ddply(x, .(c1, c2), transform, mean = mean(c3
Dear R list,
I get a strange error in R:
*** caught segfault ***
address 0x6951c20, cause 'memory not mapped'
Traceback:
1: .C("spline_eval", z$method, nu = as.integer(n), x = as.double(xout), y
= double(n), z$n, z$x, z$y, z$b, z$c, z$d, PACKAGE = "stats")
2: spline(gam.data$x[, col.dat
No, as the error states, you need random effects in lmer. But, you don't for
lm() and that is what you're running with no random effects. However, some
caution is warranted on the comparison.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
There are considerable differences between the algorithms. And BFGS is an
unfortunate
nomenclature, since there are so many variants that are VERY different. It was
called
"variable metric" in my book from which the code was derived, and that code was
from Roger
Fletcher's Fortran VM code based
On Feb 25, 2011, at 10:26 AM, amir wrote:
Hi everyone,
I have two different results which is determined by (x,y)
x1 <- c(1,5,8)
y1 <- c(8,9,10)
x2 <- c(1,7,9)
y2 <- c(5,7,9)
Let call one=(x1,y1) and Two=(x2,y2)
how can I draw them in R in a scatter plot showing (x,y) with two
different leg
On Feb 25, 2011, at 10:14 AM, zem wrote:
Yeah, you are right
i want to post an short example what i want to do .. and in the
meantime i
solved the problem ...
but here is:
i have something like this dataframe:
c1<-c(1,2,3,2,2,3,1,2,2,2)
c2<-c(5,6,7,7,5,7,5,7,6,6)
c3<-rnorm(10)
x<-cbind(c1,c
Ok, now I think I've understood, but I'm not sure since I think that my
ave() solution does work. Although, I though you have several numerical
variables and 1 factor; it is the opposite but it is still possible:
c3_mean <- ave(x[,3], list(x[,1],x[,2]), FUN=mean) #note that values
are differe
On Feb 25, 2011, at 7:25 AM, agent dunham wrote:
Apologies, I'm really new with R, Can you help me with the syntax?
here is my data.frame in which I introduce independent variables:
varind <-
data.frame(datpos$hdom2,datpos$NumPies,datpos$InHart,datpos
$CV,datpos$CA,datpos$FCC)
varind has
Hello All!
I am training to train a NN with function train() after splitting data with
the function splitForTrainingAndTest(). The split is ok (checked it), but
when I get a try on training I get this message:
Error in UseMethod("train") :
no applicable method for 'train' applied to an object
Hi everyone,
I have two different results which is determined by (x,y)
> x1 <- c(1,5,8)
> y1 <- c(8,9,10)
> x2 <- c(1,7,9)
> y2 <- c(5,7,9)
Let call one=(x1,y1) and Two=(x2,y2)
how can I draw them in R in a scatter plot showing (x,y) with two
different legends (One, Two)
Regards,
Amir
Bill,
what will be the fastest way to output not just single lines but small data
frames of about 60 rows?
I prefer writing to a text file because the final output is large 47k times
60 rows and since I do not know the size of it I have to use rbind to build
the object which creates the memory p
Yeah, you are right
i want to post an short example what i want to do .. and in the meantime i
solved the problem ...
but here is:
i have something like this dataframe:
c1<-c(1,2,3,2,2,3,1,2,2,2)
c2<-c(5,6,7,7,5,7,5,7,6,6)
c3<-rnorm(10)
x<-cbind(c1,c2,c3)
> x
c1 c2 c3
[1,] 1 5
Hi,
I wanted to check the difference in results (using lme4) , if I treated a
particular variable (beadchip) as a random effect vs if I treated it as a
fixed effect.
For the first case, my formula is:
lmer.result <- lmer(expression ~ cancerClass + (1|beadchip))
For the second case, I want t
Hello.
I am trying to fit my data sample x with different distributions such that
the integral from min(x) to max(x) of the fitted distribution will be one.
Therefore I have wrote my own log-likelihood functions and then I am using
mle {stats4}. So, for example:
ll_gamma <- function(a,b) {
Works fine on my machine:
> DF
A B C D E
1 1 a 1999 0 0
2 1 b 1999 0 0
3 1 c 1999 0 0
4 1 d 1999 0 0
5 2 c 2001 0 1
6 2 d 2001 1 0
7 3 a 2004 1 0
8 3 b 2004 0 1
9 3 d 2004 1 1
10 4 b 2001 0 2
11 4 c 2001 1 1
12 4 d 2001 1 2
here's my session info:
> sessionInfo()
R version 2.12.1 (2010-12-16)
Hi,
I don't get any error...
DF <- cbind(DF[,c(1:3)],ave(DF[, c(4:5)],DF$B, FUN = f))
DF
A BC D E
1 1 a 1999 0 0
7 3 a 2004 1 0
2 1 b 1999 0 0
10 4 b 2001 0 1
8 3 b 2004 1 1
3 1 c 1999 0 0
5 2 c 2001 0 1
11 4 c 2001 1 1
4 1 d 1999 0 0
6 2 d 2001 1 0
12 4 d 2001 1 1
9 3 d 2004 1 2
Sorry for being unclear: the example works fine on my machine too. However,
with the much larger dataset (dim(5,108)) I get the reported error.
Mathijs
On Fri, Feb 25, 2011 at 3:56 PM, Scott Chamberlain <
scttchamberla...@gmail.com> wrote:
> Works fine on my machine:
> > DF
>A BC D
Hi,
I'm trying to utilize the kohonen package to build SOM's. However,
trying this on my data I get the error:
"Argument data should be numeric"
when running the som(data.train, grid = somgrid(6, 6, "hexagonal"))
function. As you see, there is a problem with the data type of
data.train which is
Hi, I am running the following script for a different (much larger data
frame):
DF = data.frame(read.table(textConnection("A B C D E
1 1 a 1999 1 0
2 1 b 1999 0 1
3 1 c 1999 0 1
4 1 d 1999 1 0
5 2 c 2001 1 0
6 2 d 2001 0 1
7 3 a 2004 0 1
8 3 b 2004 0
10x i solved it ... mein problem was that i had 2 column by them i have to
group, i just "pasted" the values together so that at the end i have one
column to group and then was easy ...
here is the script that i used:
http://tolstoy.newcastle.edu.au/R/help/06/07/30184.html
Ivan thanks for the hel
1 - 100 of 150 matches
Mail list logo