Dear R community,
#I'm using scan() to extract a real number from a file with a complex
structure: 156689504.378.
#My problem is that the number is coerced into an integer.
#Do you have any ideas for me on how to uncoerce? Here is my code and the
output:
#I'm using R version 2.15.0
Hi,
Try this:
vec1-c(A_cont_1, A_cont_12, B_treat_8, AB_cont_22, cont_21_Aa)
vec2-grep((A){0,1}.*cont.*2,vec1)
vec1[vec2]
[1] A_cont_12 AB_cont_22 cont_21_Aa
A.K.
- Original Message -
From: Zhipeng Wang wa...@kuhp.kyoto-u.ac.jp
To: r-help@r-project.org
Cc:
Sent: Saturday, June
Hi,Dear Professor Wood,
I am studying the generalized additive model(GAM)
and I have read your related papers,especially the book named Generalized
Additive Models:An Introduction with R.I am benefit a lots.However,I also
have some questions about GAM models.
First,Is there some restrictions
Hello,
Don't worry, it's just a print thing. Just check this example:
x - 123456789.0378
x
[1] 123456789
x - 123456789
[1] 0.0378
As you can see, it is a real. And as.numeric does NOT coerce to integer,
'numeric' is identical to 'double'. See the help page, ?as.numeric.
And for your
On Sun, Jun 24, 2012 at 07:29:23AM +0100, Rui Barradas wrote:
Hello,
Don't worry, it's just a print thing. Just check this example:
x - 123456789.0378
x
[1] 123456789
x - 123456789
[1] 0.0378
Hello:
If you want to see more digits of the number, use one of the
following.
print(x,
Thanks for your answer. The answer advertises your VCD package, which by the
way is a very nice package that I use and recommend for everyone doing such
kind of data analysis. However if you really examine the answer you gave me,
it does not really or specifically answer my question.
--
View this
Hi, I'm new with R and I was wondering if there was a way to open a folder
containing multiple text files and go through each file.
These files contain protein sequences, however, I wanted to see if there was
a way of going through each file without using bio3d, just R
Thanks a bunch :).
ps if
I really want to know how to calculate the predicted valued when I use
gam.predict .
my model is:
newSO2 ~ s(pressure, bs = cr) + s(maxtemp, bs = cr) + mintemp +
RH + solar + s(windspeed, bs = cr) + s(transport, bs = cr)
my new dataset is :
pressure: -7.056847826
maxtemp: 2.737507877
Hello,
See the help page for
help(list.files)
?list.files # an 'help' alias, short form.
You can have any type of combination, folder/file pattern/recursive/etc.
Hope this helps,
Rui Barradas
Em 24-06-2012 07:28, iheartfalafel escreveu:
Hi, I'm new with R and I was wondering if there was
On 24.06.2012 06:20, Bob Green wrote:
Hello,
I want to examine the characteristics of 49 persons in terms of their
symptoms and motivations, in a cluster analysis . The data is in a
binary format.
I was hoping to save and then examine the cluster membership. I would
appreciate advice on
Hi Jorge,
Did you ever figure this out? I want to do the same thing with the
additional constraint of the coef for x1 = 2.
lm(Y~offset(2*x1)+x2+x3,data=mydata)
where b= coeff for x2, c = coeff for x3, b+c=1 and b and c0.
I've loaded the systemfit package, but the suggestion R*beta0 = q, where
Hello
I desperately need help with installing the Rgraphviz package under windows 7.
Please forget my ignorance of basic topics, Iâm a psychiatrist trying to use
text mining to analyse psychiatric reports for criminal courts, statistics and
machine learning are within my reach but R
Hi,
I'm a new user of R
I'm using grofit package to fit the grouth curve, but what I actually need
is parameters: maximum slope (µ) and the maximum cell growth (A). Can you
please explain , how can I get them (for all curves)?
Thees parameters are objects from gcFitModel, but i didn't managed
Hi
I am a beginner R user and need a little help with the subset function.
I have a dataset with columns; TOWER,TAG.ID, DATETIME (POSIXct class) and I
would like to subset my data by specific TAG.ID (e.g TAG.IDs 12:20 and
192:212). Is there an easy way to preform this operation?
Thanks
Bryant
Dear Anton,
You may find the description on
http://people.math.aau.dk/~sorenh/software/gR/index.html
helpful.
Regards
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Anton Gerostathos
Sent: 24. juni 2012 14:28
To:
Hello,
Try the following.
ix - with(dataset, TAG.ID %in% 12:20 | TAG.ID %in% 192:212)
dataset[ix, ]
or
ix - with(dataset, (12 = TAG.ID TAG.ID =20) | (192 = TAG.ID
TAG.ID = 212))
if the variable is not integer.
Also, read the manual, this, index vectors, is there. (R-intro.pdf).
Hope
On Jun 24, 2012, at 5:30 AM, francogrex wrote:
Thanks for your answer. The answer advertises your VCD package,
which by the
way is a very nice package that I use and recommend for everyone
doing such
kind of data analysis. However if you really examine the answer you
gave me,
it does not
I am looking for some large datasets (10,000 rows 100,000 columns or vice
versa) to create some test sets. I am not concerned about the invidividual
elements since I will be converting them to binary (0/1) by using arbitrary
thresholds.
Does any R package provide such big datasets?
Also, what
Dear Martin
thanks for your comprehensive instructions, had I found them earlier I would
have saved at least 3 hours of problems...
Everyone copies: your Windows system 'PATH' variable needs to be adjusted
once you've
installed graphviz and before installing Rgraphviz
What if Rgraphviz is
On 24.06.2012 16:54, gerostathos wrote:
Dear Martin
thanks for your comprehensive instructions, had I found them earlier I would
have saved at least 3 hours of problems...
Everyone copies: your Windows system 'PATH' variable needs to be adjusted
once you've
installed graphviz and before
Dear R experts,
I have conducted a power calculation in order to estimate the number of
subjects needed to detect an effect size of d=0.28 (cohen's d) for a
difference between two independent groups (alpha level should be 0.05 and
the effect should be detected with 80% probability).
The results
Hi All,
when using the linear model lm() to fit data of the form y = k * x +
b, is it possible to know the p-value for the parameters k and b? i.e.
can we find the result of the form (k, Δk; b, Δb)?
Thanks in advance!
Li Sun
__
R-help@r-project.org
Perhaps an easier coding that shows what I want would be this:
for(i in 1:nrow(ret)) {
+ retT=ret[1+i:252+i,]}
Thank you so much for your time and help!
--
View this message in context:
http://r.789695.n4.nabble.com/Help-with-a-repeating-process-tp4634336p4634339.html
Sent from the R help
I am trying to create a looping function that takes 252 rows of a matrix from
1, then the next 252 rows of a matrix from 1+1, so on and so forth until
nrow of the matrix.
I am using the for + if loop combo but I seem to be stuck on the if portion.
I'm trying to code if so that if the row is less
On 24.06.2012 17:41, Jokel Meyer wrote:
Dear R experts,
I have conducted a power calculation in order to estimate the number of
subjects needed to detect an effect size of d=0.28 (cohen's d) for a
difference between two independent groups (alpha level should be 0.05 and
the effect should be
On 24.06.2012 17:47, Li SUN wrote:
Hi All,
when using the linear model lm() to fit data of the form y = k * x +
b, is it possible to know the p-value for the parameters k and b? i.e.
can we find the result of the form (k, Δk; b, Δb)?
If you explain what Δk means in a linear model, we may be
On Jun 24, 2012, at 11:37 AM, tbowlo wrote:
Perhaps an easier coding that shows what I want would be this:
for(i in 1:nrow(ret)) {
+ retT=ret[1+i:252+i,]}
You should be thinking about what will happen in that indexing
operation when the loop pushes 'i' above nrow(ret)-251
(You may
Dear Søren,
thank you for the additional description. Through the link provided I got
the idea to try the zip packages of Rgraphviz for installation. After an
additional problem with the x64 version, finally resolved, I am now getting
stuck with the following message when trying to load
Thank you
removing everything and reinstalling while respecting every instruction did
not change anything...
evidently, I was too optimistic when thinking that the problem was caused by
something so simple... I continue to strive with it but, at least, I know
where not to look for the
Perhaps you could try to see if you can get the 32 bit version to work AND you
could also report the result of running sessionInfo() in your mail.
Regards
Søren
-Original Message-
From: Anton Gerostathos [mailto:antonios.gerostat...@windowslive.com]
Sent: 24. juni 2012 18:43
To: Søren
Sorry for the confusion.
Let me state the question again. I missed something in my original statement.
When using the linear model lm() to fit data of the form y = k * x +
b, where k, b are the coefficients to be found, and x is the variable
and has an error bar (uncertainty) Δx of the same
On Jun 24, 2012, at 11:41 AM, Jokel Meyer wrote:
Dear R experts,
I have conducted a power calculation in order to estimate the number
of
subjects needed to detect an effect size of d=0.28 (cohen's d) for a
difference between two independent groups (alpha level should be
0.05 and
the
On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
Sorry for the confusion.
Let me state the question again. I missed something in my original
statement.
When using the linear model lm() to fit data of the form y = k * x +
b, where k, b are the coefficients to be found, and x is the variable
and
On 24/06/2012 18:39, David Winsemius wrote:
On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
Sorry for the confusion.
Let me state the question again. I missed something in my original
statement.
When using the linear model lm() to fit data of the form y = k * x +
b, where k, b are the
On Sun, Jun 24, 2012 at 08:37:23AM -0700, tbowlo wrote:
Perhaps an easier coding that shows what I want would be this:
for(i in 1:nrow(ret)) {
+ retT=ret[1+i:252+i,]}
Hi.
Using your previous description, i think, you mean (1+i):(252+i).
Note that this is quite different from 1+i:252+i,
Thanks David and Brian.
But what if x is exact while y has some uncertainty Δy, in the
relation y = k * x + b?
Now I need to fit some data like
x = 1, 2, 3, 4, 5
y±Δy = 1.1±0.1, 2.0±0.2, 3.1±0.2, 4.1±0.1, 5.0±0.2
Is there any mechanism to pass x, y and
On 24.06.2012 20:35, Li SUN wrote:
Thanks David and Brian.
But what if x is exact while y has some uncertainty Δy, in the
relation y = k * x + b?
Now I need to fit some data like
x = 1, 2, 3, 4, 5
y±Δy = 1.1±0.1, 2.0±0.2, 3.1±0.2, 4.1±0.1, 5.0±0.2
2012/6/24 Uwe Ligges lig...@statistik.tu-dortmund.de:
On 24.06.2012 20:35, Li SUN wrote:
Thanks David and Brian.
But what if x is exact while y has some uncertainty Δy, in the
relation y = k * x + b?
Now I need to fit some data like
x = 1, 2, 3, 4,
Dear all,
Indexing matrices from the Matrix package with [i,j] seems to be very slow. For
example:
library(rbenchmark)
library(Matrix)
mm - matrix(c(1,0,0,0,0,0,0,0), nr=20, nc=20)
MM - as(mm, Matrix)
lookup - function(mat){
for (i in 1:nrow(mat)){
for (j in 1:ncol(mat)){
Hi
On 24/06/2012 5:54 p.m., M. Ndiaye wrote:
I couldn't run PostScriptTrace() from the package grImport without an
error. At first the postscript program couldn't be found. however the
problem persisted after the full path the postscript program was indicated.
I read earlier post on the subject
Dear Li Sun:
You appear to have a good deal of statistical confusion. R-help is not a
statistical consulting service. You should consult a local statistician or,
if that's not possible,post on a statistical help list like
stats.stackexchange.com
-- Bert
On Sun, Jun 24, 2012 at 12:04 PM, Li SUN
Good day,
For lack of a better solution (or perhaps I am ignorant to something
more elegant), I have been bootstrapping panel data by hand so to
speak and I would like to know if there is a way to define multiple
variables in a loop using the loop variable. I found a post (here:
Dear list,
I'm trying to do a loop where I should choose a cell of a data frame
comparing it with another. The code actually works for the majority of the
loop but for some reason it doesn't and I can't figure out why.
When I tried to understand why I've noticed this:
dif[11]
[1] 118.8333
That certainly helps Petr. In terms of the overall question, perhaps it is
better to show the code and reexplain what exactly I am trying to do:
1. I have logetf values in a [3300,9] matrix
2. I am trying to find the w value in the function:
sum(abs(retT-w*prcomp(ret[(1+i):(252+i),]$rotation[,1])
Hello
I am not able to use the MuMIn package (version 1.7.7) for multimodel inference
with a GLM Negative Binomial model (It does work when I use GLM Poisson). The
GLM Negative Binomial gives the following error statement:
Error in get.models(NBModel, subset = delta 4) :
object has no
Sigh R Faq 7.31.
?options ## The digits option. Also
?print.default ## and digits option
-- Bert
On Sun, Jun 24, 2012 at 10:58 AM, Andreia Leite
andreiaheitorle...@gmail.com wrote:
Dear list,
I'm trying to do a loop where I should choose a cell of a data frame
comparing it with
Please read R FAQ 7.31, Why doesn't R think these numbers are equal?
Sarah
On Sun, Jun 24, 2012 at 1:58 PM, Andreia Leite
andreiaheitorle...@gmail.com wrote:
Dear list,
I'm trying to do a loop where I should choose a cell of a data frame
comparing it with another. The code actually works for
Standard response: Use lists instead.
Read An Intro to R to learn about lists. In fact,read an An Intro to R,
full stop ( if you have not already done so).
Cheers,
Bert
On Sun, Jun 24, 2012 at 2:15 PM, Taylor White
taylorgentrywh...@gmail.comwrote:
Good day,
For lack of a better solution
Paul,
Adding the single quotes fixed the problem!
Very appreciative.
Modou
On Sun, Jun 24, 2012 at 3:52 PM, Paul Murrell p.murr...@auckland.ac.nzwrote:
Hi
On 24/06/2012 5:54 p.m., M. Ndiaye wrote:
I couldn't run PostScriptTrace() from the package grImport without an
error. At first the
But what if x is exact while y has some uncertainty Δy, in the
relation y = k * x + b?
Again, no: this is not a linear model. Assumption in a linear model is
that the errors are identically distributed.
Surely not; errors in a linear model do not need to be homoscedastic. lm
handles
Hello,
The FAQ answer 7.31 may be confusing to noobs and the referenced
paper is long. The essence is:
(1) It's not an R issue, it is a floating point (flop) arithmetic issue.
(2) The issue is that flop arithmetic is almost always only approximate.
(3) Therefore, asking for exact
Hi,
I have a question. When I run R script in Windows, I can use shell() function.
But there is no such a function in Linux machine, what I should do in the Linux
machine?
Thanks a lot!
Jess
[[alternative HTML version deleted]]
You don't tell us what you're trying to do, but system() might be useful.
Sarah
On Sun, Jun 24, 2012 at 5:19 PM, 蓁蓁 李 tszhenzh...@hotmail.com wrote:
Hi,
I have a question. When I run R script in Windows, I can use shell()
function. But there is no such a function in Linux machine, what I
To elaborate on what Bert said:
Lists are a variable length data structure which can hold most
anything (even other lists) in them and are a great way to organize
the sort of data you're working with. You can think of them as
generic vectors. You can assign them names and access/subset them by
Thanks a lot for your explanation!
I see the point and I think I'll solve my question using a different method!
Andreia Leite
On Sun, Jun 24, 2012 at 10:53 PM, Oliver Ruebenacker cur...@gmail.comwrote:
Hello,
The FAQ answer 7.31 may be confusing to noobs and the referenced
paper is
Dear All,
Thanks for all your explanations and sorry for the confusion. I will
need to consult some statistician for help.
Sincerely,
Li Sun
2012/6/24 S Ellison s.elli...@lgcgroup.com:
But what if x is exact while y has some uncertainty Δy, in the
relation y = k * x + b?
Again, no: this
On 2012-06-24 12:40, Rhodes, Christopher J. wrote:
Hello
I am not able to use the MuMIn package (version 1.7.7) for multimodel inference
with a GLM Negative Binomial model (It does work when I use GLM Poisson). The
GLM Negative Binomial gives the following error statement:
Error in
Thank you so much for the suggestion. I should simplify my formula.
Kazz
2012/6/22 Achim Zeileis achim.zeil...@uibk.ac.at
On Fri, 22 Jun 2012, Kazu Nada wrote:
Thank you so much for the suggestion.
I want to estimate interactions between the attributes of the choice set
and
This (and William's solution) is so good, I must ask:
Is there a good reason why this is not the default functionality in the
graphics package?
The default displays the number 1 as 1+e00 which is hideous!
-Original Message-
From: r-help-boun...@r-project.org
Thank you gentlemen for pointing me in the right direction.
This code worked nicely:
countries - list()
for (i in 1:20) {
countries[[i]] = as.matrix(subset(OECDFiscal2, Country == i))
}
Take care,
Taylor
On Sun, Jun 24, 2012 at 3:01 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
Hi Taylor,
Even clearner would be:
countries - lapply(1:20, function(i) as.matrix(subset(OECDFiscal2,
Country == i)))
if you prefer to stick with the loop (up to you), I would instantiate
the list at size:
countries - vector(list, 20)
for (i in 1:20) {
countries[[i]] =
Dear Taylor,
You might also try
with(OECDFiscal2, strsplit(OECDFical2, Country))
HTH,
Jorge.-
On Sun, Jun 24, 2012 at 11:31 PM, Taylor White wrote:
Thank you gentlemen for pointing me in the right direction.
This code worked nicely:
countries - list()
for (i in 1:20) {
Hi Ravi,
My hunch would be no because it seems awfully inefficient. Packages
are mirrored all over the world, and it seems rather silly to be
mirroring, updating, etc. large datasets.
The good news is that if you just want a 10,000 x 100,000 matrix of
0/1s, it is trivial to generate:
X -
See
?predict.gam
Best
Ozgur
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-calculate-the-predicted-value-by-using-GAMs-tp4634317p4634384.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
I need to increase the size of the graph by increasing the spacing between
each tickmarks.
--
View this message in context:
http://r.789695.n4.nabble.com/axis-in-r-plot-tp4634199p4634383.html
Sent from the R help mailing list archive at Nabble.com.
__
I'm having a great deal of trouble replicating x12 ARIMA's F-test used to
detect moving seasonality. According to all literature I could find, the
test is apparently a 2-way ANOVA with year and month as factors for the SI
ratios determined by x12's smoothing algorithm. Note the SI ratio is simply
Please use split() instead of strsplit(). Apologies to all. --JIV
On Sun, Jun 24, 2012 at 11:38 PM, Jorge I Velez wrote:
Dear Taylor,
You might also try
with(OECDFiscal2, strsplit(OECDFical2, Country))
HTH,
Jorge.-
On Sun, Jun 24, 2012 at 11:31 PM, Taylor White wrote:
Thank
67 matches
Mail list logo