I've got a data frame describing comments on an electronic journal,
wherein each row is a unique comment, like so:
commentID author articleID
1 1 smith 2
2 2 jones 3
3 3 andrews 2
4 4 jones 1
5 5 johnson 3
6
Hi Jason,
As your example is not reproducible, may be something like:
myFreq-data.frame(table(articleID, author))
if you want to know only those articles with 1 author, you can try
subset(myFreq, Freq==1)
or something like.
bests
milton
On Sun, Nov 1, 2009 at 2:20 AM, Jason Priem
On Sun, 01-Nov-2009 at 01:20AM -0500, Jason Priem wrote:
I've got a data frame describing comments on an electronic journal,
wherein each row is a unique comment, like so:
commentID author articleID
1 1 smith 2
2 2 jones 3
3 3 andrews
Hi, I am very confused with constructing the wilcox.test in R.
I have two populations 'original' and 'test'.
I want to know if the 'test' is generally 'lower' than original.
I use alpha of 0.05.
So do I write the function as wilcox.test(original, test, alternative=l)?
or wlcox.test(original,
On Sun, 1 Nov 2009 00:47:50 -0700 (PDT) jomni jom...@gmail.com wrote:
J So do I write the function as wilcox.test(original, test,
J alternative=l)? or wlcox.test(original, test, alternative = g)?
J or wilcox.test(test, original, alternative=g)?
J or wilcox.test(test, original, alternative=l)?
J
As from subject: is it possible to use the rect.hclust (or something
equivalent) with horizontal dendrograms?
thanks
nico
--
View this message in context:
http://old.nabble.com/rect.hclust-and-horizontal-dendrograms-tp26148886p26148886.html
Sent from the R help mailing list archive at
Hi. I have a huge list called twitter:
dim(twitter)
NULL
str(twitter)
List of 1
$ :Classes 'PlainTextDocument', 'TextDocument', 'character' atomic
[1:35575] 11999;10:47:14;20;10;2009;ObamaLouverture;Trails Mixed Lessons For
Governance From Campaigner-in-chief: President obama jumps campaign
On Fri, Oct 30, 2009 at 8:33 PM, Ottorino-Luca Pantani
ottorino-luca.pant...@unifi.it wrote:
Dear R users,
this is a follow up of this message
http://tolstoy.newcastle.edu.au/R/e6/help/09/05/13897.html
I'm reproducing the core of it for convenience.
//
/ data(Oats, package = MEMSS) /
/
On Nov 1, 2009, at 1:59 AM, Patrick Connolly wrote:
On Sun, 01-Nov-2009 at 01:20AM -0500, Jason Priem wrote:
I've got a data frame describing comments on an electronic journal,
wherein each row is a unique comment, like so:
commentID author articleID
1 1 smith 2
2
Three suggestions:
-- drop the idea of using a dataframe. It's only appropriate when the
data is rectangular.
-- look at strsplit for separating at @ characters.
-- post the output of dput() on your sample, since email is probably
not capable of rendering this data without creating
Hello. The fields are separated by a ';'. I think that the data is
rectangular in the sense that there are about 15 fields for each row. Some
of the fields are empty. In the dput() display below, it seems that the rows
are delimited by ' ' .
Any idea from this?
Here is the end of the output for
On 01/11/2009 7:43 AM, onyourmark wrote:
Hi. I have a huge list called twitter:
It's a list, but more importantly it's a VCorpus and a Corpus. You
should use the functions appropriate to those classes to extract the
strings making up the data, declare their encoding properly (or convert
Dear All,
I'm doing an imputation on the missing data and is looking for a decomposition
method in R. Could somone advice me the way to do this?
Thank you
Fir
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
On Nov 1, 2009, at 8:24 AM, onyourmark wrote:
Hello. The fields are separated by a ';'. I think that the data is
rectangular in the sense that there are about 15 fields for each
row.
There either are 15 fields or there aren't. You can't make a dataframe
with an approximate number of
I did this on the source files which were semi-colon delimted (to delimit the
fields, I am not sure what character denotes the new tweet)
After loading the tm package
txt - system.file(texts, txt, package = tm)
(twitter - Corpus(DirSource(txt),
+ readerControl = list(language = lat)))
then
Hi R Users,
When I use package lme4 for mixed model analysis, I can't distinguish
the significant and insignificant variables from all random independent
variables.
Here is my data and result:
Data:
Rice-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9),
Dear R Experts,
I have a query concerning SEMs in a multilevel context. I have an unbalanced
panel where children are nested in families, which in turn are nested in
districts. The problem is the following: the outcome variable of interest is
measured at the child level but the (explanatory)
Hi Jason,
If I understand correctly, you are looking for something along the lines of
with(X, tapply(author, articleID, function(x) length(unique(x
# 1 2 3
# 1 2 2
with X your data frame.
HTH,
Jorge
On Sun, Nov 1, 2009 at 1:20 AM, Jason Priem wrote:
I've got a data frame describing
Dear Stefan,
See two comments inserted below.
Stefan Grosse wrote:
On Sun, 1 Nov 2009 00:47:50 -0700 (PDT) jomni jom...@gmail.com wrote:
J So do I write the function as wilcox.test(original, test,
J alternative=l)? or wlcox.test(original, test, alternative = g)?
J or wilcox.test(test,
On Oct 31, 2009, at 9:33 PM, David Winsemius wrote:
On Oct 31, 2009, at 4:39 PM, Kajan Saied wrote:
Dear R-Help Team,
as a R novice I have a (maybe for you very simple question), how do
I get
the following solved in R:
Let R be a n x n matrix:
\mid R\mid^{-\frac{1}{2}}
solve(A) gives
Duh, thought of that after I'd left for dinner :(
--- On Sat, 10/31/09, David Winsemius dwinsem...@comcast.net wrote:
From: David Winsemius dwinsem...@comcast.net
Subject: Re: [R] how to loop thru a matrix or data frame , and append
calculations to a new data frame?
To: John Kane
A question, a comment, and an alternative answer to matrix^(-1/2):
QUESTION:
What's the status of the expm package, mentioned in the email you
cited from Martin Maechler, dated Apr 5 19:52:09 CEST 2008? I tried both
install.packages('expm') and
On Sun, 1 Nov 2009, spencerg wrote:
A question, a comment, and an alternative answer to matrix^(-1/2):
QUESTION:
What's the status of the expm package, mentioned in the email you cited
from Martin Maechler, dated Apr 5 19:52:09 CEST 2008? I tried both
install.packages('expm') and
On Sat, 31 Oct 2009, parkbomee wrote:
Thank you both.
However, using tapply() instead of a loop does not seem to improve my code much.
I am using this inside of an optimization function,
and it still takes more than it needs...
Well, you haven't given us much to work with.
The
Hello,
I have daily wind speed data and need to fit seasonal ARIMA model, problem
is that my period is 365. But when I use arima(...) function, with period
365, Im getting error message: Error in makeARIMA(trarma[[1]],
trarma[[2]], Delta, kappa) : maximum supported lag is 350. Can someone
Confirmed with recent Zelig and R-2.10.0.
CCing Kosuke Imai, the Zelig maintainer:
Please can you take a look at this one and additionally fix the warnings
given on your package's overview page at
http://cran.r-project.org/web/checks/check_results_Zelig.html
Please upload a fixed version
Hi, Chuck:
Thanks very much, but why do I get package 'expm' is not
available from
install.packages(expm,repos=http://R-Forge.R-project.org;)?
Best Wishes,
Spencer Graves
Charles C. Berry wrote:
On Sun, 1 Nov 2009, spencerg wrote:
A question, a comment, and an
Hi,
Here is one approach to solve your likelihood maximization subject to
constraints. I have written a function called `constrOptim.nl' that can solve
constrained optimization problems. I will demonstrate this with a simulation.
# 1. Simulate the data (x,y).
a - 4
b - 1
c - 2.5
p - 0.3
n
On Nov 1, 2009, at 1:46 PM, spencerg wrote:
Hi, Chuck:
Thanks very much, but why do I get package 'expm' is not
available from install.packages(expm,repos=http://R-Forge.R-project.org
)?
In my case I think it was it is because there is no 2.10 branch to
either the:
On 2/11/2009, at 2:49 AM, Laura Saltyte wrote:
Hello,
I have daily wind speed data and need
``need'' is probably not the operative word!
to fit seasonal ARIMA model, problem
is that my period is 365. But when I use arima(...) function, with
period
365, I’m getting error
What you need to do is to understand how to use Rprof so that you can
determine where the time is being spent. It probably indicates that
this is not the source of slowness in your optimization function. How
much time are we talking about? You may spent more time trying to
optimize the function
Hi
Can we get the result of an intigration without the absolute error?
for example
f1-function(x1){(1/gamma(alpha))*x1^(alpha-1)*exp(-x1)*log(x1)}
I1-integrate(f1, 0, (max(cc)-tau1+(theta2/theta1)*tau1)/theta2)
I1
0.08007414 with absolute error 7.2e-05
I need the answer 0.08007414 withou the
Hi Laila,
Here is a suggestion:
res - integrate(dnorm, -1.96, 1.96)
res
# 0.9500042 with absolute error 1.0e-11
res[[1]]
# [1] 0.9500042
res$value
# [1] 0.9500042
HTH,
Jorge
On Sun, Nov 1, 2009 at 3:02 PM, Laila Alkhalfan wrote:
Hi
Can we get the result of an intigration without the
Hi,
my data frame consist of 8 Variables and 120 000 observations. With those datas
I am running a PCA and after I want to calculate the Volume of the PCA-cloud of
certain subsets of my data. Does anyone have an idea about a function that can
do this?
Thanks
[[alternative
On Sun, 1 Nov 2009, David Winsemius wrote:
On Nov 1, 2009, at 1:46 PM, spencerg wrote:
Hi, Chuck:
Thanks very much, but why do I get package 'expm' is not available
from install.packages(expm,repos=http://R-Forge.R-project.org;)?
In my case I think it was it is because there is no
On Tue, Oct 20, 2009 at 8:14 AM, Ted Harding
ted.hard...@manchester.ac.uk wrote:
On 20-Oct-09 13:34:49, Peng Yu wrote:
fisher.test() gives a very small p-value, which is underflow on my
machine. However, the log of it should not be underflow. I'm wondering
if there is a way get log() of a
I'm sure this is simple enough, but an R site search on my subject
terms did suggest a solution. I have a numeric vector with many
values that I wish to create a factor from having only a few levels.
Here is a toy example.
x - 1:10
x -
factor(x,levels=1:10,labels=c(A,A,A,B,B,B,C,C,C,C))
x
Hi Kevin,
Here are two suggestions:
# Combination of levels() and table()
table(levels(x))
# A B C
# 3 3 4
# Or defining a function
mysummary - function(x) table(levels(x)) # you can easily improve it :-)
mysummary(x)
# A B C
# 3 3 4
HTH,
Jorge
On Sun, Nov 1, 2009 at 3:51 PM, Kevin E. Thorpe
Thank you all.
What Chuck has suggested might not be applicable since the number of different
times is around 40,000.
The object of optimization in my function is the varying value, which is
basically data * parameter, of which parameter is the object of optimization..
And from the r
On Nov 1, 2009, at 3:51 PM, Kevin E. Thorpe wrote:
I'm sure this is simple enough, but an R site search on my subject
terms did suggest a solution. I have a numeric vector with many
values that I wish to create a factor from having only a few levels.
Here is a toy example.
x - 1:10
x -
Kevin E. Thorpe wrote:
I'm sure this is simple enough, but an R site search on my subject
terms did suggest a solution. I have a numeric vector with many
values that I wish to create a factor from having only a few levels.
Here is a toy example.
x - 1:10
x -
Peter Dalgaard wrote:
Kevin E. Thorpe wrote:
I'm sure this is simple enough, but an R site search on my subject
terms did suggest a solution. I have a numeric vector with many
values that I wish to create a factor from having only a few levels.
Here is a toy example.
x - 1:10
x -
You just need to extract the list component named value:
I1$value
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
Jim and John,
Thanks for your replies. I ended up using both suggestions to plot the full
tide series and then overlay the averages for rise and fall in different
colours, which illustrated very well how such parameters can
be misleadings in some cases.
Regards,
Tony
2009/10/31 Jim Lemon
On Nov 1, 2009, at 3:12 PM, Charles C. Berry wrote:
On Sun, 1 Nov 2009, David Winsemius wrote:
On Nov 1, 2009, at 1:46 PM, spencerg wrote:
Hi, Chuck:
Thanks very much, but why do I get package 'expm' is not
available
from install.packages(expm,repos=http://R-Forge.R-
Hello, I have a quick question about time series methodology. If I want to
display a boxplot of time series data, sorted by period, I can type:
boxplot(data ~ cycle(data));
where data is of class ts
Is there a similar method for calculating, say, the median value of each
time step within the
introduce a factor variable with the months and then use tapply?
Kjetil
On Sun, Nov 1, 2009 at 9:07 PM, Tim Bean timb...@gmail.com wrote:
Hello, I have a quick question about time series methodology. If I want to
display a boxplot of time series data, sorted by period, I can type:
I would like to preface this by saying that I am new to R, so I would ask
that you be patient and thorough, so that I'm not completely clueless. I am
trying to convert a list to numeric so that I can perform computations on it
(specifically mean-center the variable), but I am running into
The manual on Writing R Extensions says that one should ``only
document a
***single*** data object per Rd file''. My recollection is that in the
past this commandment (which I occasionally found to be inconvenient)
was enforced.
I recently saw a post to R-help which appeared to indicate
Katja Seis wrote:
Hi,
my data frame consist of 8 Variables and 120 000 observations. With those
datas I am running a PCA and after I want to calculate the Volume of the
PCA-cloud of certain subsets of my data. Does anyone have an idea about a
function that can do this?
Not really
it appears that what you really want is to use:
task[[i]]
instead of task[i]
b
On Nov 1, 2009, at 11:04 PM, dadrivr wrote:
I would like to preface this by saying that I am new to R, so I
would ask
that you be patient and thorough, so that I'm not completely
clueless. I am
trying to
Can you at least provide an 'str' of the 'task' object (not sure if it
is a dataframe; you said a 'list') so that we know what it looks like.
It would also be helpful if you would provide a subset of the data
that we could try out a script on it. The best way would be to post
the first 10 or so
Hi,
I would like to save a few dynamically created objects to disk. The
following is the basic flow of the code segment
for(i = 1:10) {
m = i:5
save(m, file = ...) ## ???
}
To distinguish different objects to be saved, I would like to save m as m1,
m2, m3 ..., to file /home/data/m1,
Dear sir,
If I want to use bagging with SVM, which package should I choose?Thanks!
Best wishes,Jie
_
[[alternative HTML version deleted]]
path - data;
dir.create(path);
for (i in 1:10) {
m - i:5;
filename - sprintf(m%02d.Rbin, i);
pathname - file.path(path, filename);
save(m, file=pathname);
}
/H
On Sun, Nov 1, 2009 at 6:53 PM, jeffc h...@andrew.cmu.edu wrote:
Hi,
I would like to save a few dynamically created objects
There is no package that does this, but you can do it yourself pretty
easily (although I think that it is a waste of time to bag this
particular model). You can use the function bagEarth in the caret
package as a prototype.
Max
On Sun, Nov 1, 2009 at 8:32 PM, 柯洁 kejiefina...@hotmail.com wrote:
On Nov 1, 2009, at 10:16 PM, Henrik Bengtsson wrote:
path - data;
dir.create(path);
for (i in 1:10) {
m - i:5;
filename - sprintf(m%02d.Rbin, i);
pathname - file.path(path, filename);
save(m, file=pathname);
}
That would result in each of the ten files containing an object with
the
Hi, everybody
Is there any way to execute a function, which name is stored in a string.
such as:
a - ls()
foo(a) ## same as ls() itself.
Or, to execute a R command, which is stored in a string
such as:
a - m1 - matrix(1:9,3,3)
foo(a) ## same as the assignment itself
Dear R People:
I have the output from an arima model fit in an object xxx.
I want to verify that the ma1 coefficient is there, so I did the following:
xxx$coef
ar1ar2ma1 intercept
1.3841297 -0.4985667 -0.996 -0.1091657
str(xxx$coef)
Named num [1:4] 1.384 -0.499 -1
On Sun, Nov 1, 2009 at 7:48 PM, David Winsemius dwinsem...@comcast.net wrote:
On Nov 1, 2009, at 10:16 PM, Henrik Bengtsson wrote:
path - data;
dir.create(path);
for (i in 1:10) {
m - i:5;
filename - sprintf(m%02d.Rbin, i);
pathname - file.path(path, filename);
save(m,
Got it!
There is an xxx$model$theta that does the trick.
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com
__
R-help@r-project.org
On Nov 1, 2009, at 11:07 PM, Ning Ma wrote:
Hi, everybody
Is there any way to execute a function, which name is stored in a
string.
such as:
a - ls()
foo(a) ## same as ls() itself.
Need to leave the () off.
fstr - sum
eval(parse(text=fstr))(1:5)
[1] 15
Or, to execute a R command,
Dear R People:
I am working with a numeric vector and trying to use the any
function. However, I'm getting some odd results, as shown below:
xy
[1] 0.7305081 2.4224211
str(xy)
num [1:2] 0.73 2.42
any(xy) 1
[1] FALSE
Warning message:
In any(xy) : coercing argument of type 'double' to
Dear R People:
Sorry to be so pesky tonight. I figured it out.
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com
__
R-help@r-project.org mailing
Erin Hodgess schrieb:
xy
[1] 0.7305081 2.4224211
str(xy)
num [1:2] 0.73 2.42
any(xy) 1
[1] FALSE
Warning message:
In any(xy) : coercing argument of type 'double' to logical
What am I doing wrong please?
xy 1 should return TRUE FALSE, and you want to apply
On Nov 1, 2009, at 11:28 PM, Henrik Bengtsson wrote:
On Sun, Nov 1, 2009 at 7:48 PM, David Winsemius dwinsem...@comcast.net
wrote:
On Nov 1, 2009, at 10:16 PM, Henrik Bengtsson wrote:
path - data;
dir.create(path);
for (i in 1:10) {
m - i:5;
filename - sprintf(m%02d.Rbin, i);
pathname
On Sun, Nov 1, 2009 at 9:18 PM, David Winsemius dwinsem...@comcast.net wrote:
On Nov 1, 2009, at 11:28 PM, Henrik Bengtsson wrote:
On Sun, Nov 1, 2009 at 7:48 PM, David Winsemius dwinsem...@comcast.net
wrote:
On Nov 1, 2009, at 10:16 PM, Henrik Bengtsson wrote:
path - data;
Dear R users,
I wish to utilise processed and saved objects as arguments of a function.
Specifically, I have created objects using *assign* *paste* functions
with an incremental index i, the names of the objects are:
fund1, fund2, fund3,., fund80,. (where the numerical value
parkbomee bbom...@hotmail.com writes:
Thank you all.
What Chuck has suggested might not be applicable since the number of
different times is around 40,000.
The object of optimization in my function is the varying value,
which is basically data * parameter, of which parameter is the
object
On Sun, Nov 1, 2009 at 8:07 PM, Ning Ma pnin...@gmail.com wrote:
Hi, everybody
Is there any way to execute a function, which name is stored in a string.
such as:
a - ls()
foo(a) ## same as ls() itself.
One way to accomplish this by using get() to search for a function
that matches your
Can someone provide me a good way to circumvent the lack of calling
Stored Procedures from RMySQL?
I can not rewrite those stored procedures on R because there a lot
more folks here that only understands SQL.
The stored procedure returns a resultset.
Thanks
Caveman
?do.call
/H
On Sun, Nov 1, 2009 at 10:58 PM, Charlie Sharpsteen
ch...@sharpsteen.net wrote:
On Sun, Nov 1, 2009 at 8:07 PM, Ning Ma pnin...@gmail.com wrote:
Hi, everybody
Is there any way to execute a function, which name is stored in a string.
such as:
a - ls()
foo(a) ## same as ls()
72 matches
Mail list logo