Hello Saptarshi,
If two functions behave differently even though their definitions
are identical, then it is because they refer to variables that were in
scope when the functions were defined (i.e. lexical scoping). To
prevent such differences, either define both functions in the same
Had several instances of similar issues with weighted leasts squares and
weighted logistic regression recently. It is important to remember that
the log likelihoods for the weighted models include a term that is a
function of the n weights and that these are not incorporated in deviances
(or
Yes you are correct. I want need to change my sample number specification to
the number of elements in the vector.
So sampleWorker function should be:
sampleWorker - function(x) return(sample(c(TRUE,FALSE),length(x), replace =
TRUE, prob = c(x, 1-x)))
So this is where I get a little
Hello. I’ve seen several uses of '%?%' in R code (with ? = a single
letter or other characters used as the middle character in a 3
character string with '%' as the 1st and 3rd characters).
I’ve also recently seen ‘%+%’ usage at:
http://vita.had.co.nz/papers/ggplot2-wires.pdf
on p. 7 of the
Thanks David and rest of people for replying to my problem posted here.
Basically this is my attempt to estimate the variables of a Gaussian random
field model using maximum likelihood method. I have examples of using
optim command to optimize one or more variables in a function, the optim
Dear R users,
I have data in the following manner
[,1][,2][,3][,4]
6 2 2 2
5 4 4 3
6 35 2 13
7 32 3 5
4 4 423 3
3 6 4 5
5 6 5 3
I want to arrange all the data
Hi ,
I am trying the to implement Apriori algorithm with a sample data set .
i am trying to find the itemFrequency of the items in the data set . but i
am getting the error as below . i load the data from excel and save the
dataset in mydata
* itemFrequency(mydata)
Error in function (classes,
Thanks to both of you,
close to the solution, but I think that your proposals do not address
the case when a bar is completely positive (or negative): I do not
think that the histogram can not be extended easily to this case ... I
had a look at the likert function but it is not clear to me if it
Dear R help,
I tried to add linear fit lines in intxplot by adding index.cond =
function(x,y) coef(lm(y ~ x))[1] inside the intxplot(). It didn't help. I
would appreciate any help.
My dataset and codes are pasted below.
Thanks,
A.K.
datGreen- read.table(text=
Time, DarkSt, LightSt
0,
Well that's that cleared up then. Thanks to all.
Chris B.
On 31/05/2012 17:51, Albyn Jones wrote:
No, both yield the same result: reject the null hypothesis,
which always corresponds to the restricted (smaller) model.
albyn
On Thu, May 31, 2012 at 12:47:30PM +0100, Chris Beeley wrote:
On Thu, 31 May 2012, Mabille, Geraldine wrote:
Thanks a lot for your answer Achim, this helped a lot. I have done a lot
of reading, following your recommendations and I think I have a better
idea of what I should use. My dataset contains binary data on survival
of the calf depending on the
On Jun 1, 2012, at 00:30 , Mike Hilt wrote:
Could someone help me out and let me know what ‘%?%’
(where ? = a single letter in a 3 character string with ‘%’
being the 1st and 3rd characters), and/or ‘%+%’ does in
R code/function?
They are just a vehicle for defining binary operators:
QAMAR MUHAMMAD UZAIR d029307 at polito.it writes:
Dear R users,
I have data in the following manner
[,1] [,2][,3][,4]
6 2 2 2
5 4 4 3
[snip]
I want to arrange all the data in descending order. I have
92 columns in my actual data set. It is
On 01.06.2012 07:17, Tejas Kale wrote:
Dear Uwe
Many thanks for your reply. I agree with you but I need the silencing of
output for a particular reason.
I am working on a statistical package called VOStat which uses a Java based
GUI to get the data and parameters of the test to be executed
Hi iLai,
What you showed below, almost same like I am also expecting.
There is two matrix,
1) 1st - matrix contain values like this,
ABC XYZ PQR ABC_CHECK
XYZ_CHECK PQR_CHECK
Hello, I know how to embed R in other applications by linking my applications
to the R.dll shared library. For example I can use R from within a Lisp
program by having the foreign function interface in lisp connect directly to
R.dll lib. However I still need all R (the other libs and supporting
Hi,
I have a dataframe with around 100 columns. Now I want
to redefine some of the columns as factors (using as.factor).
Luckily all the names of the columns I want to redefine start with
crast. Thus I thought I can use grep() for that purpose...
...I found an example for redefining a single
dear all,
I do not if it is a nonsense question..
Is it possible in the R session to get the name of the current .Rdata
file that I ran?
I mean: suppose I double click the file myfile.Rdata. ls() returns the
names of the objects in the current workspace (that is saved in
myfile.Rdata). In
Hello,
Sorry, I've just answered to Johannes without Cc to r-help.
Repeat:
See the difference.
# helper function
make.df - function(){
x - as.data.frame(matrix(1:24, ncol=6))
names(x) - c(paste0(crast, 1:2), A, B, paste0(crast, 5:6))
x
}
DF - make.df()
(ix - grep(^crast,
Hello,
I'm attempting to find multiple breakpoints in an association of my
response variable (R.AUC) with two explanatory variables ('s.size' and
'bedekking'). The association between 's.size' and 'R.AUC' shows a
plateau, but the value when this plateau is reached is differs for
different values
I've made a mistake, I should have used 'lapply' not 'sapply'
DF - make.df()
str(DF)
DF[, ix] - lapply(DF[, ix], as.factor)
str(DF)# crast1: Factor w/ 4 levels
I should have looked further...
Rui Barradas
Em 01-06-2012 10:10, Rui Barradas escreveu:
Hello,
Sorry, I've just answered to
On 12-06-01 5:05 AM, Vito Muggeo (UniPa) wrote:
dear all,
I do not if it is a nonsense question..
Is it possible in the R session to get the name of the current .Rdata
file that I ran?
I mean: suppose I double click the file myfile.Rdata. ls() returns the
names of the objects in the current
Yes this is what i wanted.
thanks indeed!!!
On Fri, 1 Jun 2012 07:40:49 +
Ben Bolker bbol...@gmail.com wrote:
QAMAR MUHAMMAD UZAIR d029307 at polito.it writes:
Dear R users,
I have data in the following manner
[,1][,2][,3][,4]
6 2 2 2
5 4 4
Hi,
I have a problem in fitting GPD distribution.
i generate random numbers from gpd distribution from specific parameters
using pot packege then i used fitgpd function to estimete the parameters.The
estimated parameters are not matched with the given parameters i.e.from
which i generate random
[1]transfert [2]transfert
[3]fichier [4]fichier
[5]sécurisé [6]sécurisé
Bonjour,
Vous êtes plus de 200 000 utilisateurs à échanger vos fichiers
professionnels en
Hi all,
let I have two text string:
*one - c(ciao,zio,caio,bello)
two - c(caio,zio)*
I would like to obtain a new text string which is* one - two* like this one:
[1] ciao bello
because caio and zio elements have been subtracted from *one*.
What's the most efficient way to obtain this?
Thank
Hello,
?setdiff
setdiff(one, two)
Hope this helps,
Rui Barradas
Cren wrote
Hi all,
let I have two text string:
*one - c(ciao,zio,caio,bello)
two - c(caio,zio)*
I would like to obtain a new text string which is* one - two* like this
one:
[1] ciao bello
because caio and zio
Rui Barradas wrote
Hello,
?setdiff
setdiff(one, two)
Thank you for your help, Rui.
But
* setdiff(one,two)
[1] ciao*
Where's bello?
--
View this message in context:
http://r.789695.n4.nabble.com/Subtracting-test-string-from-vectors-tp4632049p4632053.html
Sent from the R help mailing
Hi and thanks again for your answer. I have just a last question regarding the
choice of the functional...if you have time to help on that again.
I have tried running the sctest using the functionals you recommended
sctest(gmass2,functional=meanL2BB)
On Friday, June 1, 2012, Roberto Brunelli wrote:
Thanks to both of you,
close to the solution, but I think that your proposals do not address
the case when a bar is completely positive (or negative): I do not
think that the histogram can not be extended easily to this case ...
Why not?
Dear Researchers,
I am looking for a library or a function to calculate SMAPE with same
doneminator to avoid a problem to the presence of 0 values in the series.
I find this variotion of SMAPE called mSMAPE
mSMAPE page 13
http://www.stat.iastate.edu/preprint/articles/2004-10.pdf
yesterday
On Fri, 1 Jun 2012, Mabille, Geraldine wrote:
Hi and thanks again for your answer. I have just a last question regarding the
choice of the functional...if you have time to help on that again.
I have tried running the sctest using the functionals you recommended
Thanks! I had seen this section but hadn't understood that the dashed line
represented the mean.
Does that mean in my case (two tests hardly significant P=0.03 and one NS) that
I should reject the hypothesis of different levels of survival probability for
different groups of females??
On Fri, 1 Jun 2012, Mabille, Geraldine wrote:
Thanks! I had seen this section but hadn't understood that the dashed
line represented the mean. Does that mean in my case (two tests hardly
significant P=0.03 and one NS) that I should reject the hypothesis of
different levels of survival
HI, R-Users:
I got a questions. have been struggling so long time
I have this data:
m1$Year_Month
201009 201010 201011 201101 201102
min(m1$Year_Month)
201009
I want to calculate the following two answers, how do I program it?
difference in Month?
[1] 0 1 2 4 5
difference
Hi,
You assumed
scale=229678.21 and shape=0.41
and the procedure estimated
\hat{scale}=427196.6 and \hat{shape}=0.2092887
I think these estimates are natural, since
1) you use a simulated generated data with n=100, and 2) the true value your
scale parameter is very large.
Hope this helps
On 2012-05-31 21:41, arun wrote:
Dear R help,
I tried to add linear fit lines in intxplot by adding index.cond = function(x,y)
coef(lm(y ~ x))[1] inside the intxplot(). It didn't help. I would appreciate any
help.
My dataset and codes are pasted below.
Thanks,
A.K.
datGreen-
dear Peter,
Currently segmented handles multiple breakpoints for several variables
(the limit discussed in the msg 2006 has been fixed..).
However you are looking for a somewhat complicated model where the
breakpoint of the relationship 's.size' and 'R.AUC' depends on another
covariate
yes it handles completely on one side.
your sample included that case.
Sent from my iPhone
On Jun 1, 2012, at 2:15, Roberto Brunelli roby.brune...@gmail.com wrote:
Thanks to both of you,
close to the solution, but I think that your proposals do not address
the case when a bar is completely
Dear Vito,
Thanks for the quick reply.
In the case of splitting up the data, would it be advisable to
independently fit a GLM on the subsets of the data, or use one single
GLM for comparison in the 'segmented' function?
Kind regards,
Peter
On Fri, Jun 1, 2012 at 2:21 PM, Vito Muggeo (UniPa)
To put double quotes in a string in VBA one has to use double double quotes
str = a string with a quoted word
On Jun 1, 2012, at 12:26 AM, Duncan Murdoch wrote:
On 12-05-31 4:40 PM, Bert Jacobs wrote:
Hi,
I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within
Excel 2010
Hi Peter,
Thanks for the help. It is exactly what I wanted.
Sorry, I forgot to post the library name.
A.K.
- Original Message -
From: Peter Ehlers ehl...@ucalgary.ca
To: arun smartpink...@yahoo.com
Cc: R help r-help@r-project.org
Sent: Friday, June 1, 2012 7:32 AM
Subject: Re: [R]
Dear R-listers,
I am giving part of my R code :
###
n=15
m=1
library(partitions)
library(gregmisc)
library(combinat)
x = t(restrictedparts(n-m,m))
l = length(x[,1])
for(u in 1:l){
A= unique(matrix( unlist(permn(x[u,])), ncol=m,
Hello,
It works with me.
one - c(ciao,zio,caio,bello)
two - c(caio,zio)
setdiff(one, two)
[1] ciao bello
Are you sure of the values in your 'one' and 'two'?
Rui Barradas
Cren wrote
Rui Barradas wrote
Hello,
?setdiff
setdiff(one, two)
Thank you for your help, Rui.
But
Hi,
one - c(ciao,zio,caio,bello)
two-c(ciao,zio)
setdiff(one,two)
[1] caio bello
A.K.
- Original Message -
From: Cren oscar.soppe...@bancaakros.it
To: r-help@r-project.org
Cc:
Sent: Friday, June 1, 2012 6:13 AM
Subject: Re: [R] Subtracting test string from vectors
Rui Barradas
Dear All,
I hava maps in sp fomat and I like to use different map projection.
SHouls I somehow convert sp to maps and make projection and ploting there?
Or, is ther any tools to make new map project in sp?
Cheers,
Jari H
Department of Public Health
Faculty of Medicine
University of Helsinki
how about just removing those network related package (including CRAN) from
your copy of R?
R can be used portably, as long as you have the package you need installed
already within your R.
--
View this message in context:
Hello,
I am trying to collect several global measures or statistics for
time-series as well as packages of R that can compute them. I have found
several of them in papers and books, but the literature is so big i am sure
i am missing several of them.
skewness
kurtosis
min
max
mean
SD
One of the most important concepts is most certainly Stationarity (see “unit
root test).
the most common r-package will be: tseries.
see:
Brockwell/Davis (2006): Time Series: Theory and Models.
Brockwell/Davis (2002): Introduction to Time Series and Forecasting.
Cowpertwait/Metcalfe (2009):
Hello,
I 'd like to use some functions in myLib. So I do:
library(myLib)
Then I get this message:
Error: package 'myLib' is not installed for 'arch=i386'
sessionInfo()
R version 2.13.2 (2011-09-30)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=French_France.1252
a - data.frame(name=c(rep(a,5), rep(b,5)), year=c(1989:1993, 1989:1993),
var=c(1:10))
str(a)
b - pdata.frame(a, index=c(name,year))
str(b)
Now, I want to convert b into a data frame and have a structure
similar to a. How do I do that?
--
Apoorva Gupta
Consultant
National Institute of Public
Hi All,
I'm using R's randomForest package (and it's quite awesome!) but I'd
really like to do some stratified sampling with a regression problem.
However, it appears that the package was designed to only accommodate
stratified sampling for classification purposes (see
Yes, you need to modify both the R and the underlying C code. It's the the
source package on CRAN (the .tar.gz file).
Andy
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Josh Browning
Sent: Friday, June 01, 2012 10:48 AM
To:
Hopefully this is an easy problem...
I'm trying to add a partitioned rank column to a data frame where the
rank is calculated separately across a partition by categories, the
way you could easily do in SQL. I found this solution in the archives
that looked like it might work:
Hi Tammy,
I suspect that the first 4 digits compose the year, so with
Year_Month-c(2010*100+9:11,2011*100+1:2)
#check composition
Year_Month
ym-(Year_Month%/%100*12+Year_Month%%100)
ym-ym[1]
should give the difference in months.
Differences in Days are a bit trickier, since not all months have
You need the package compiled for your platform. You may also need to have a
version of R that is compatible with that package, depending on how that
package was constructed.
You can either obtain the source for the package and install RTools and compile
it yourself, or convince whoever
Antony,
I am now utterly confused. The conditions involve column names of X1. In
your first post I assumed you just meant check for each row of x not
columns. After Arun replied I realized that may have been a wrong
assumption, but I just don't understand how you get, for example the last
TRUE
Hi all,
My console is no longer responding to commands, I'm using the web-based console
running
off of a server. I have tried to interrupt R, I have deleted the data and
profile files in the
user directory, and restarted the server, relogged in, flushed the cache on the
browser,
but the
On 2012-06-01 07:09, Apoorva Gupta wrote:
a- data.frame(name=c(rep(a,5), rep(b,5)), year=c(1989:1993, 1989:1993),
var=c(1:10))
str(a)
b- pdata.frame(a, index=c(name,year))
str(b)
Now, I want to convert b into a data frame and have a structure
similar to a. How do I do that?
I assume that
Ask the RStudio developers.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live:
Whoops, forgot one line of code; below.
On 2012-06-01 09:37, Peter Ehlers wrote:
On 2012-06-01 07:09, Apoorva Gupta wrote:
a- data.frame(name=c(rep(a,5), rep(b,5)), year=c(1989:1993, 1989:1993),
var=c(1:10))
str(a)
b- pdata.frame(a, index=c(name,year))
str(b)
Now, I want to convert b into a
Hi all:
There was a concern raised by reviewers of a manuscript of mine over the
proper execution of a Pearson's correlation. In brief, this was undertaken
in order to determine the relationship between the extent of wheel running
(y axis) and ethanol intake (x axis) across three, separate 10 day
Hello,
Try
library(zoo) # needed for as.yearmon
x - c(201009, 201010, 201011, 201101, 201102)
(y - as.Date(paste(x, 01, sep=), format=%Y%m%d))
y - y[1]
12*(as.yearmon(y) - as.yearmon(y[1]))
Note that to have a time difference between dates we need days (paste).
Hope this helps,
Rui Barradas
The reviewers are right.
But this is not an R question at all. Post on a statistics list like
stats.stackexchange.com.
Much better yet, consult a local statistician, as it is abundantly
clear that you have insufficient statistical background to properly
analyze your data.
Cheers,
Bert
On Fri,
Thanks - figured it out, I rebooted the physical server and
everything is back to normal. Guess would be state is held
somewhere that a restart of the R server didn't clear, probably
/tmp, I have the server on a Linux system.
Jim
On 6/1/12 12:38 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote:
So that we could explore the structure of a HDF5 file?
Thanks a lot!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Dear all,
I have a lot of problems on R-programming.
for example
my csv. file is ..
Date wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta
21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664
22/10/2010 87.35 21.99 40.89 0 1300.408288 62.85352227
23/10/2010 88.38 21.71 28.04 0.01
Thank, it OK now
but I don't understand what is the meaning of y - y[!is.na(y[5]),]
Thank in advance!
--
View this message in context:
http://r.789695.n4.nabble.com/please-help-Extract-the-row-to-the-new-file-by-using-if-statment-tp4631957p4632090.html
Sent from the R help mailing list archive
Dear all,
As a novice user of R I ran into a problem that's quite hard for me to
resolve. I have a database containing data of a clinical trial in which
patients are included that survived or died:
x - matrix(data=c(1:5,0, 1/1/2012 00:00:00,0,0,1/7/2012 00:00:00),
nrow=5, ncol=2, dimnames=
Hello James,
Thanks for the pointer, but Rredland is not maintained any more.
Take care
Oliver
On Thu, May 31, 2012 at 8:21 PM, J Toll jct...@gmail.com wrote:
On Thu, May 31, 2012 at 6:40 AM, Oliver Ruebenacker cur...@gmail.com wrote:
Hello,
Is there a convenient way
Hi
i need to create a model from 250 + variables with high collinearity, and
only 17 data points (p = 250, n = 750). I would prefer to use Cp, AIC,
and/or BIC to narrow down the number of variables, and then use VIF to
choose a model without collinearity (if possible). I realize that having a
Hello Martin,
I am not sure that PAM works with pre-defined medoids. The avg.width is
always the same and when i check the medoids that were used for the
calculation they are the same as before, i.e. before defining my own
medoids.
Please advise
BAHKO
--
View this message in context:
I noticed that nls treats weights as relative and that the absolute size of the
weights w in
the following script has therefore no influence on the errors of the parameters
reported in the summary
a-1
b-3
x--100:100
y-a*x+b
yeps-y+rnorm(length(x),sd=1)
w-rep(1,length(x))
plot(x,yeps)
Hi everyone.
I would like to count number of row higher than 0 for each column in a
dataframe.
For instance, I was using something like:
YY = replicate(5, rnorm(10))
apply(YY,2,,0)
This give me a boolean matrix, but how to have the count of row with numbers
0 by column?
Thank in advance,
Hi
I need to do something very simple. I have 2 variables, Y and M. I need to
multiply Y by 1 if M=1, by 2 if M=3 and by 3.6678 if M=9. How do i make it?
Thanks for your time and interest
--
View this message in context:
http://r.789695.n4.nabble.com/Multiply-variable-by-condition-tp4632086.html
Hi.
I would take a look to the /forward.se/l function in the /packfor/ package.
http://r-forge.r-project.org/R/?group_id=195
Good luck,
Phil
--
View this message in context:
http://r.789695.n4.nabble.com/regsubsets-Leaps-tp4632083p4632102.html
Sent from the R help mailing list archive at
thanks Phil, I will give it a try!
-Kim
--
View this message in context:
http://r.789695.n4.nabble.com/regsubsets-Leaps-tp4632083p4632105.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Hi,
Couldn't find any problems if I understand what you mean.
A.K.
DF -within(DF,rank-ave(Salary,Company,FUN=function(x)rev(order(x
DF
Company Person Salary rank
1 GM A 7067.905 4
2 Ford B 9946.616 3
3 GM C 31627.171 8
4 Toyota D
Great thanks.
If anyone else have an idea of statistics that can represent different
aspects of time-series please let me know.
--
Hello,
I am trying to collect several global measures or statistics for
time-series as well as packages of R that can compute them. I have found
several of them in
Hello,
Try
colSums(apply(...etc...))
Hope this helps,
Rui Barradas
Em 01-06-2012 18:37, Filoche escreveu:
Hi everyone.
I would like to count number of row higher than 0 for each column in a
dataframe.
For instance, I was using something like:
YY = replicate(5, rnorm(10))
apply(YY,2,,0)
Frank -- where are you?!
(To the OP: Your post leaves me simply breathless. You are embarked on
a fool's errand. Filoche's help will continue you down that path.
IMHO only of course.
Bottom line: You CANNOT do what you wish to do. Or to quote John Tukey:
The combination of some data and an
Hello all,
*
*
I'm having some difficulty, and I think the problem is with how I'm using
append() nested inside a for loop. The data are:
y,x
237537.61,873
5007.148438,227
17705.77306,400
12396.64369,427
228703.4021,1173
350181.9752,1538
59967.79376,630
140322.7774,710
42650.07251,630
Hi,
On Fri, Jun 1, 2012 at 12:05 PM, pigpigmeow gloryk...@hotmail.com wrote:
Thank, it OK now
but I don't understand what is the meaning of y - y[!is.na(y[5]),]
Thank in advance!
This is very basic R syntax. You should definitely read the
Introduction to R, and also
?[
?!
?is.na
Sarah
--
Hi,
On Fri, Jun 1, 2012 at 12:27 PM, pigpigmeow gloryk...@hotmail.com wrote:
Dear all,
I have a lot of problems on R-programming.
for example
my csv. file is ..
Date wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta
21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664
There are several ways. The easiest to understand is probably using
if() statements: see ?if for help and examples.
Sarah
On Fri, Jun 1, 2012 at 11:34 AM, jfca283 jfca...@gmail.com wrote:
Hi
I need to do something very simple. I have 2 variables, Y and M. I need to
multiply Y by 1 if M=1, by
Hello all,
Let me first say that this isn't a question about outliers. I am using
the outlier function from the outliers package but I am using it only
because it is a convenient wrapper to determine values that have the
largest difference between itself and the sample mean. Where I am
running
Hi,
Look at this line:
cross.val.error-append(cross.val.error.temp,value.temp)
at each iteration you're overwriting cross.val.error with
cross.val.error.temp and value.temp
You probably actually need something like
cross.val.error.temp - append(cross.val.error.temp,value.temp)
Hi,
not sure this is the right mailing list, but anyway - I maintain the
WGCNA package, and was just alerted by a Mac user that it is not
available. Looking at the error log at
http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/WGCNA-00check.html
reveals
checking package dependencies
Hello Bert and Sarah,
Thank you for your replies. Helped me understand how people might perceive my
question and why they might not respond.
Spent some time learning about R's debugging tools this morning. Began to
realize why my function didn't work. My second argument was the name of a
Yes, that did it. Thanks.
*Ben Caldwell*
On Fri, Jun 1, 2012 at 11:41 AM, Sarah Goslee sarah.gos...@gmail.comwrote:
Hi,
Look at this line:
cross.val.error-append(cross.val.error.temp,value.temp)
at each iteration you're overwriting cross.val.error with
cross.val.error.temp and
Hello Florian,
The best fit only depends on the relative statistical errors. The
estimated parameter error is a purely statistical error and can be
estimated from the sample. Systematic parameter errors are not
estimated. Yes, parameter errors grow with measurement errors.
Take care
Hello,
I am trying to obtain the partial r-square values (r^2 or R2) for
individual predictors of an outcome variable in multiple linear
regression. I am using the 'lm' function to calculate the beta
coefficients, however, I would like to know the individual %
contributions of several indepenent
Hi Paul,
I think you're making it far too complicated. With some minor tweaking
to your function, I can easily process the entire data frame you
originally presented.
nearTerms - function(rawtext, target, before, after){
Text - unlist(strsplit(rawtext, ))
Target - grep(target, Text)
if
Hi Sarah,
That I was making things too complicated doesn't surprise me. A skilled
programmer makes everything look easy I think. And someone who is still
learning does just the opposite.
Am going to spend some time now looking through your tweaks.
Thank you very much for your help.
Paul
Hello R users,
I'd like to ask a question about how to add a new column. So, below is my
situation.
In order to perform the repeated ANOVA, I first imported the following
table.
score=read.csv(patients_tests.csv);
subject test1 test2 test3 test4test5test6
test7
1
Hello,
Try
score2$subject - rep(score$subject, 7)
Hope this helps,
Rui Barradas
Em 01-06-2012 20:47, Jason Love escreveu:
Hello R users,
I'd like to ask a question about how to add a new column. So, below is my
situation.
In order to perform the repeated ANOVA, I first imported the
On Jun 1, 2012, at 12:27 PM, pigpigmeow wrote:
Dear all,
I have a lot of problems on R-programming.
for example
my csv. file is ..
That certainly does not look like any csv file I have ever seen.
Date wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta
21/10/2010 92.97 22.11
Just to throw out an alternative using the ?reshape function:
# See the example using 'df3' on the help page
DF.Long - reshape(score, direction = long, idvar = subject,
varying = 2:8, sep = )
head(DF.Long, 24)
subject timetest
ab.1 ab1 0.17687
cl.1
Try using the rank function instead of the order function.
rank(x) is order(order(x)) if there are no ties.
Since you want reverse ranks do either rank(-x) or length(x)+1-rank(x).
E.g.,
DF - within(DF, rank2 - ave(Salary, Company, FUN=function(x)rank(-x)))
DF[DF$Company==Toyota,]
On Jun 1, 2012, at 2:37 PM, Sarah Goslee wrote:
There are several ways. The easiest to understand is probably using
if() statements: see ?if for help and examples.
Sarah
I would have thought ifelse() to be the necessary function, but for
such simple cases I find boolean math to be clearer.
1 - 100 of 118 matches
Mail list logo