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 mas
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:
Hello-
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
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
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 (classe
Hi Duncan,
I guess you removed the NA's using a similar function like the one below.
Counts<-Counts[sapply(!is.na(Counts),all)]
> 1*(Counts>0)
[1] 1 0 1 1 0 0 1 1 0
I tried to remove it using other way,
Counts[is.na(Counts)]<-'''
> Counts
[1] "1" "0" "21" "2" "0" "0" "234" "2" "
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 in
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
co
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 docu
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 confus
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 s
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
scope
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 from the
user, creates the appropriate R scr
On Thu, May 31, 2012 at 6:40 AM, Oliver Ruebenacker wrote:
> Hello,
>
> Is there a convenient way to import RDF/OWL data into R?
>
> I'm interested in importing BioPAX/SBPAX data into R to make them
> available for a wider audience. One exciting application would be to
> use pathway data to
Nope, you're misunderstanding lapply(). It will use your function on each
element of the
Iist, so on each vector of length 2. You need to write your function so
that it will give the results you want with sampleWorker(test[[1]]) before
it will work with lappy.
Sarah
On Thursday, May 31, 2012, RO
Hello,
Actually, your output is wrong, you have compared the elements of a 'x',
not Counts, to 0.
> Counts <- c(1,0,21,2,0,0,234,2,0,NA)
> Counts > 0
[1] TRUE FALSE TRUE TRUE FALSE FALSE TRUE TRUE FALSENA
> 1 *(Counts > 0)
[1] 1 0 1 1 0 0 1 1 0 NA
> as.integer(Counts != 0)
Thank you so much Gabor for taking this on. Please find attached a sample
scenario with the problem of malfunctioning dendogram by fgc. I hope this helps
you narrow down to the solution.
Best,
Fayez
From: csardi.ga...@gmail.com [csardi.ga...@gmail.com]
Yes! Thank you.
*
*
*Ben Caldwell*
On Thu, May 31, 2012 at 4:03 PM, peter dalgaard wrote:
>
> On Jun 1, 2012, at 00:14 , Benjamin Caldwell wrote:
>
> > temppow<-lm(log(y)~log(x))
> > plot(log(y)~log(x))
> > plot(residuals(temppow), main="pow")
> > abline(temppow)
> > plot(y~x, main="pow")
> >
On 30-May-2012 07:33:12 peter dalgaard wrote:
>
> On May 29, 2012, at 17:55 , maxbre wrote:
>> Given this example
>> [snip]
>> And given the fact that:
>>
>> - in the note of R Wilcox.test is clearly stated: "The literature
>> is not unanimous about the definitions of the Wilcoxon rank sum
>> and
On Jun 1, 2012, at 00:14 , Benjamin Caldwell wrote:
> temppow<-lm(log(y)~log(x))
> plot(log(y)~log(x))
> plot(residuals(temppow), main="pow")
> abline(temppow)
> plot(y~x, main="pow")
> tempsum<-summary(temppow)$adj.r.squared
> tempint<-summary(temppow)$coefficients[1,1] #intercept of power funct
Hi
I was curious on the possibilities -- what if an NA creeps in?
Counts <- c(1,0,21,2,0,0,234,2,0,NA)
Counts > 0
1 *(Counts > 0)
[1] 1 0 1 1 0 0 1 1 0 NA
as.integer(x != 0)
[1] 1 0 1 1 0 0 1 1 0
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Duncan Murdoch
> Sent: Thursday, May 31, 2012 3:27 PM
> To: Bert Jacobs
> Cc: r-help@r-project.org
> Subject: Re: [R] RScript.exe and map directory issue
>
> On 12-05-31 4:40 PM,
Em 31/5/2012 17:40, Bert Jacobs escreveu:
Hi,
I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within
Excel 2010 with the following code:
Call Shell(rPath& "\Rscript.exe C:\Work\Latest\_Test.R", vbHide)
The good news is: the above code works perfectly, but ...
If I add white s
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 with the following code:
Call Shell(rPath& "\Rscript.exe C:\Work\Latest\_Test.R", vbHide)
The good news is: the above code works perfectly, but ...
If I add white spa
Dear Reseacher,
i find this modified version of SMAPE at pag 13 formula "msSMAPE" to to
avoid the possibility of an inï¬ation caused by zero values in the series
using a Si component in the denominator of the symmetric MAPE
http://www.stat.iastate.edu/preprint/articles/2004-10.pdf
I wrote a f
Hello all,
I'm fitting an allometric equation that looks like a really clean fit in
the log-log space, but when I back transform the fit of the curve appears
to need an adjustment - the fitted curve appears to predict values a good
deal higher than those from the data. I included a bias correction
On 01/06/12 02:52, Mark Leeds wrote:
just one other thing about the AIC issue:
there is a line in glm.fit which is the following:
aic = aic(y, n, mu, weights, dev) + 2 * rank
but I couldn't find the function aic so I couldn't investigate further. It
looks suspicious though because it seems to
Interesting. If you use the deviances printed out by the fitted model
(including the null deviance) and back-engineer it to log-likelihoods, you
get results identical to Stata.
> m$deviance*(-.5)
[1] -390.9304
> m$null.deviance*(-.5)
[1] -393.064
However, using the deviance to calculate the AI
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of R. Michael Weylandt
> Sent: Thursday, May 31, 2012 2:51 PM
> To: Bert Jacobs
> Cc: r-help@r-project.org
> Subject: Re: [R] RScript.exe and map directory issue
>
> Not on Windows
Thank you very much. I do overlook something.
On Thu, May 31, 2012 at 5:20 PM, Thomas Lumley wrote:
> On Fri, Jun 1, 2012 at 1:17 AM, Yue Guan wrote:
>> Hi, there
>>
>> Since glm cannot handle factors very well. I try to use bigglm like this:
>>
>> logit_model <- bigglm(responser~var1+var2+v
great. thanks. exactly what I wanted. /iaw
Ivo Welch (ivo.we...@gmail.com)
On Thu, May 31, 2012 at 2:53 PM, David L Carlson wrote:
> a <- data.frame(x=runif(4), y=runif(4), z=runif(4))
> b <- capture.output(a)
> c <- paste(b, "\n", sep="")
> cat("Your data set is:\n", c, "\n")
>
Thx Michael,
After some testing (with more luck then craftmanship) it appears that
following code works:
Call Shell(rPath & "\Rscript.exe " & """C:\Work\Latest 1\_Test.R""", vbHide)
I'll also try your solution.
SY,
Bert
-Original Message-
From: R. Michael Weylandt [mailto:michael.weyla..
It will work if you paste a "\n" to the end of each line:
a <- data.frame(x=runif(4), y=runif(4), z=runif(4))
b <- capture.output(a)
c <- paste(b, "\n", sep="")
cat("Your data set is:\n", c, "\n")
--
David L Carlson
Associate Professor of Anthropology
T
Not on Windows so I can't test, but I imagine you need to escape the
space: try this:
Call Shell(rPath & "\Rscript.exe C:\Work\Latest\ 1\_Test.R", vbHide)
Michael
On Thu, May 31, 2012 at 4:40 PM, Bert Jacobs
wrote:
> Hi,
> I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within
On Fri, Jun 1, 2012 at 6:07 AM, Diana Marcela Martinez Ruiz
wrote:
>
> Hello forum,
>
>
> I
> want to do a test of independence
> with svychisq, but I
> get an error, then this my code:
>
> am18 <- read.spss("C:/Users/diana/Dropbox/Semestre
> 10/Tesis 10/Tesis Diana/AMcomuna18-29MAR2012.sav",
>
Hello,
(Sorry for the repost, i am resending in plain text)
I have a function 'ewrap' (see below for definition).
It takes 3 expressions and returns another expression e.g.
map <- ewrap({
len <- length(r$addon)
rhcollect(len,1)
})
becomes:
expression({
NULL
result <- mapply(fu
On Thu, May 31, 2012 at 12:08 PM, Aziz, Muhammad Fayez
wrote:
>
> Thank you so much Gabor for your reply. I had spotted your post earlier and
> it worked like a charm. Interestingly I have just ran into a trouble with the
> stament dend <- igraph:::as.dendrogram.igraph.walktrap(fc). Apparently t
On Fri, Jun 1, 2012 at 1:17 AM, Yue Guan wrote:
> Hi, there
>
> Since glm cannot handle factors very well. I try to use bigglm like this:
>
> logit_model <- bigglm(responser~var1+var2+var3, data, chunksize=1000,
> family=binomial(), weights=~trial, sandwich=FALSE)
>
> fitted <- predict(logit_model
Hello,
I have a function 'ewrap' (see below for definition).
It takes 3 expressions and returns another expression e.g.
map <- ewrap({
len <- length(r$addon)
rhcollect(len,1)
})
becomes:
expression({
NULL
result <- mapply(function(.index, k, r) {
{
len <- l
On Thu, May 31, 2012 at 08:23:02AM -0700, AMFTom wrote:
> I have photographs of plots that look like so:
>
> http://r.789695.n4.nabble.com/file/n4631960/Untitled.jpg
>
> I need to divide it up so each circle has an equal area surrounding it. So
> into 20 equal segments, each of which contains a
Hi,
I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within
Excel 2010 with the following code:
Call Shell(rPath & "\Rscript.exe C:\Work\Latest\_Test.R", vbHide)
The good news is: the above code works perfectly, but ...
If I add white spaces to my map directory, like:
Call Shell(
Hi,
On Thu, May 31, 2012 at 1:08 PM, LCOG1 wrote:
> This is great thank you. I think I am getting the hang of some of the apply
> functions. I am stuck again however. I have list test_ below and would
> like to apply the sample function using each element of each vector as the
> probability an
thanks, jeff. no, not capture.output(), but thanks for pointing me to it
(I did not know it). capture.output flattens the data frame. I want the
print.data.frame output, so that I can feed it to cat, and get reasonable
newlines, too.
regards,
/iaw
Ivo Welch (ivo.we...@gmail.com)
J. Fred W
Hi,
I am looking at the change in N concentration in plant roots over 4 time
points and I have fit a spline to the data using ns and lme:
fit10 <- lme( N~ns(day, 3), data = rcn10G)
I may want to adjust the model a little bit, but for now, let's assume it's
good. I get output for the fixed effec
Hello,
There is more than one way to do it. I would divide space according
to weighted distance.
Specify a distance function. Euclidian distance will give you
boundaries that consist of ellipse segments. Manhattan distance will
give you straight lines which may be preferable.
Assign t
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
trend
season
Thanks a lot, this is what I was looking for.
All the best
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-aggregate-combinations-tp4631867p4631980.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.
Dear useRs,
I'm using the mgcv package for estimate a model with a smooth effect and a
spatial covarianza matrix.
I use the command predict(model$lme) to obtain a prediction with the fixed
and random part of the model, but i need this kind of prevision also on a
grid with different points than t
This is great thank you. I think I am getting the hang of some of the apply
functions. I am stuck again however. I have list test_ below and would
like to apply the sample function using each element of each vector as the
probability and return a TRUE or FALSE that I will ultimately sum the TRUE
Hello forum,
I
want to do a test of independence
with svychisq, but I
get an error, then this my code:
am18 <- read.spss("C:/Users/diana/Dropbox/Semestre
10/Tesis 10/Tesis Diana/AMcomuna18-29MAR2012.sav",
use.value.labels=TRUE, max.value.labels=Inf,
to.data.frame=TRUE)
b<-matrix(c(am
capture.output(print(mydf))
note that df is a base function... best to not use it as a variable.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
What do you mean by prints? You can use capture.output to get what
would regularly be printed to the screen into a text vector, or use
dput to get a version of an object that could be read back into
another R session.
On Thu, May 31, 2012 at 2:10 PM, ivo welch wrote:
> dear R experts---is there
dear R experts---is there a function that prints a data frame to a string?
cat() cannot handle lists, so I cannot write cat("your data frame is:\n",
df, "\n").
regards, /iaw
Ivo Welch (ivo.we...@gmail.com)
[[alternative HTML version deleted]]
___
1. Erect a solid, impremeable wall around the perimeter.
2. Put a very flexible, membrane around each circle.
3. Add a drop of low viscosity, low surface tension liquid to each
circle.
4. At some point, all circles will have expanded to completely fill the
space.
5. The membranes will
On May 31, 2012, at 2:26 PM, R. Michael Weylandt wrote:
On Thu, May 31, 2012 at 11:23 AM, AMFTom
wrote:
I have photographs of plots that look like so:
http://r.789695.n4.nabble.com/file/n4631960/Untitled.jpg
I need to divide it up so each circle has an equal area surrounding
it. So
into
On Thu, May 31, 2012 at 11:23 AM, AMFTom wrote:
> I have photographs of plots that look like so:
>
> http://r.789695.n4.nabble.com/file/n4631960/Untitled.jpg
>
> I need to divide it up so each circle has an equal area surrounding it. So
> into 20 equal segments, each of which contains a circle. Qu
My guess (unconfirmed) is that read.table() gives you a data frame but
density.lf expects an atomic (= not a list = not a data frame) vector.
Perhaps try density.lf(x[,1]) to just send the column -- the "drop"
behavior should make sure this is an atomic vector.
If that doesn't help, please do prov
I should have added, though:
If you are writing R code you **must** learn to use R's debugging
tools, which include:
?traceback
?debugger
?browser
?trace
?debug
?recover
Then you do your own debugging instead of posting opaque code here and
hoping that someone takes the bait. See the section on
Hello
I'm working with NetCDF files in an animation and am trying to superimpose
a shapefile on the image as it is generates the html pages.
If I take out the lines for the shapefile, it works correctly, however I'm
having difficultly including the shapefile.
If anyone has any ideas I would gre
On Thu, May 31, 2012 at 1:54 PM, Bert Gunter wrote:
> Well, good luck finding someone to wade through your code --
> "small,reproducible" examples are requested for a reason -- but I will
> offer that I have no idea what you mean with your remark about
> anonymous functions, as the code you posted
Well, good luck finding someone to wade through your code --
"small,reproducible" examples are requested for a reason -- but I will
offer that I have no idea what you mean with your remark about
anonymous functions, as the code you posted has none.
-- Bert
On Thu, May 31, 2012 at 10:38 AM, Paul M
Hello All,
Can anyone tell help me understand why the function below doesn't work and how
I can fix it? Below are some sample data, some code that works on individual
rows of the data, and my attempt to translate that code into a function. My
hope is to get the function working and then to appl
Hi,
On Thu, May 31, 2012 at 12:49 PM, Christopher Kelvin
wrote:
> Hello,
> Sorry for reply you directly but i feel that if i send to R they might not
> post because they may not understand what i am trying to say
> I want to provide you with the code below by using the survival package, that
>
Inline ...
On Thu, May 31, 2012 at 9:09 AM, Kjetil Halvorsen
wrote:
> If you want an helpful answer, you must describe your real problem
> MUCH better! This is way too confused.
Absolutely! -- But we certainly can say:
>
> Kjetil
>
> On Thu, May 31, 2012 at 7:37 AM, wrote:
>>
>> Dear R-list
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:
> Hello-
>
> I understand that it's convention, when comparing two models using
> the anova function anova(m
Dear R help group: I am attempting to produce a density plot from a list of
2 values using the density.lf function and would appreciate any help, I
hope I have done my homework reading the documentation but I still seem to
be missing something basic.
I have read the data as a table using read.
HI,
I tweaked the code of James a little bit to produce the same result.
> for(i in seq(ncol(df),1))
if(sd(df[,i])==0){
df[,i] <-NULL
}
- Original Message -
From: J Toll
To: Johannes Radinger
Cc: R-help@r-project.org
Sent: Thursday, May 31, 2012 9:52 AM
Subject: Re: [R] Remove co
#-
USDEUR.xts<-xts(USDEUR[,2:3], # columns with data
USDEUR$Date) # column with date/time index
USDEUR_sample.xts<-window(USDEUR.xts,end=as.Date("2012-03-25"))
nobs<-length(USDEUR_
I have photographs of plots that look like so:
http://r.789695.n4.nabble.com/file/n4631960/Untitled.jpg
I need to divide it up so each circle has an equal area surrounding it. So
into 20 equal segments, each of which contains a circle. Quadratcount is not
sufficient because if I divide it up int
Not sure whether I understand your data and objectives well enough but here is
what I would do:
To make my life easier, I used x as a variable name. I'm not using attach().
You can extract your data with something like
y <- x[x$wrfta>= 255 | x$wrfta<= 65 & x$wrfrain == 0, ]
y <- y[!is.na(y[5]),]
If you want an helpful answer, you must describe your real problem
MUCHbetter! This is way too confused.
Kjetil
On Thu, May 31, 2012 at 7:37 AM, wrote:
>
> Dear R-list members,
>
> I have a matrix with non-numeric variables in it and I have to optimize the
> variables of the matrix in a fo
Thank you so much Gabor for your reply. I had spotted your post earlier and it
worked like a charm. Interestingly I have just ran into a trouble with the
stament dend <- igraph:::as.dendrogram.igraph.walktrap(fc). Apparently the
members are empty as when I print(dend) it says 'dendrogram' with
On Tue, May 29, 2012 at 1:16 AM, Aziz, Muhammad Fayez
wrote:
>
> Hi everyone,
>
> I am using the fastgreedy.community function to get the $merges matrix and
> the $modularity vector. This serves my purpose of testing modularity of my
> graph. But I am "greedy" to plot the heat map and dendrrogra
On 2012-05-31 07:52, Mark Leeds wrote:
just one other thing about the AIC issue:
there is a line in glm.fit which is the following:
aic = aic(y, n, mu, weights, dev) + 2 * rank
but I couldn't find the function aic so I couldn't investigate further. It
looks suspicious though because it seems t
Hi,
On Thu, May 31, 2012 at 10:09 AM, Christopher Kelvin
wrote:
> Hello Sarah,
> I hope i have understood you; All i seek to do is to get a code that i can
> obtain interval censoring from without using the survival package. Can you
> come to my aid?
Probably, but you need to meet me halfway.
Dear all,
I find some troubles about how to extact the row from csv. file by using
if-statement condition.
I want to extract the row if the rainfall is greater than the mean of
rainfall and using the wrfta divided into 3 groups
that's
rainfall greater than mean -> group A ( create file group A_rai
Hi Johannes,
Here are two approaches to accomplish this:
subset(df, select = -B)
df[, colnames(df) != "B"]
HTH,
Jorge.-
On Thu, May 31, 2012 at 10:34 AM, Johannes Radinger <> wrote:
> Hi James
> Hi Jorge,
>
> Thank you very much!
> I like the apply-approach, it seems really quite
> simple and
just one other thing about the AIC issue:
there is a line in glm.fit which is the following:
aic = aic(y, n, mu, weights, dev) + 2 * rank
but I couldn't find the function aic so I couldn't investigate further. It
looks suspicious though because it seems to me like
it should be
aic = -2*likelih
On May 31, 2012, at 7:37 AM, > wrote:
Dear R-list members,
I have a matrix with non-numeric variables in it and I have to
optimize the variables of the matrix in a formula using optim
routine of the stats4 package. I know the matrix can only take
numeric data
Some of the things you
Dear R,
I have data like this
I I D I D D D D D I D I D I D I D I D D D I D D I I I I
I I I I D I D I D I I I D I I I D I D I D I D I 0 0 I I I I I I I
I I D I D I D I D I I I D I I I D I D I D I D I I I D I I I I I
Now for each row i want to make count in groups
2 in each group for all possible
Hi James
Hi Jorge,
Thank you very much!
I like the apply-approach, it seems really quite
simple and I get back the TRUE-FALSE vector which
I can use for indexing the dataframe.
Now there popped the questions if one can implement
any "exeption", like do the selection of
the columns exept for column
On 31.05.2012 16:18, Tejas Kale wrote:
Hello!
Is there a way to suppress the output of 'install.packages()'? I have
seen that the 'download.file' function has a 'quiet' option but I do
not know how to use it.
I do not see any good reason to allow that. A user shoudl see if
software is being i
On May 31, 2012, at 6:11 AM, Iain Gallagher wrote:
Hi Phil
That's it. Thanks.
Will have a read at the docs now and see if I can figure out why
leaving the 'r'ead instruction out works. Seems counter-intuitive!
It says that unz uses binary mode. You were specifying text mode. See
if open
Use distance() in package ecodist to compute the mahalanobis distance matrix
and pass that to hclust().
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -Original Message-
> From: r-he
On 31.05.2012 15:59, Bond, Stephen wrote:
Uwe,
Just a user's perspective: there are too many packages that work only on the
maintainer's box and it would benefit the community if there were stricter
standards for allowing people to post a package. Open systems like Ubuntu have a
ratings syt
On Thu, May 31, 2012 at 8:52 AM, J Toll wrote:
> for (i in seq(ncol(df), 1))
> if (length(unique(df[, i])) == 1) {
> df[, i] <- NULL
> }
Here's a similar method employing a more functional approach:
df[, apply(df, 2, function(x) length(unique(x)) > 1)]
James
___
Hello!
Is there a way to suppress the output of 'install.packages()'? I have
seen that the 'download.file' function has a 'quiet' option but I do
not know how to use it.
Thanks for your help
Tejas Kale
IUCAA, Pune
__
R-help@r-project.org mailing list
Look at "CRAN Task View: Natural Language Processing"
http://cran.r-project.org/web/views/NaturalLanguageProcessing.html
You may be talking about package lsa which is described in the Task View
along with a link to an article, "Investigating Unstructured Texts with
Latent Semantic Analysis." The
Hi, there
Since glm cannot handle factors very well. I try to use bigglm like this:
logit_model <- bigglm(responser~var1+var2+var3, data, chunksize=1000,
family=binomial(), weights=~trial, sandwich=FALSE)
fitted <- predict(logit_model, data)
only var2 is factor, var1 and var3 are numeric.
I ex
Thank you very much. This definitely helps me out.
Math
Jeff Newmiller wrote
>
> There are many resources for learning regular expressions (e.g.
> http://gnosis.cx/publish/programming/regular_expressions.html). Once you
> understand the basics you will probably be able to refer to the ?regex
>
Uwe,
Just a user's perspective: there are too many packages that work only on the
maintainer's box and it would benefit the community if there were stricter
standards for allowing people to post a package. Open systems like Ubuntu have
a ratings sytem that allows users to review packages, so t
Hi Johannes,
Try
df[, !apply(df, 2, function(x) sd(x, na.rm = TRUE) < 1e-10)]
HTH,
Jorge.-
On Thu, May 31, 2012 at 9:27 AM, Johannes Radinger <> wrote:
> Hi,
>
> I have a dataframe and want to remove columns from it
> that are populated with a similar value (for the total
> column) (the varia
Hi Duncan: I don't know if the following can help but I checked the code
and logLik defines the log likelihood as (p - glmobject$aic/2) where p is
the glmobject$rank. So,
the reason for the likelihood being less is that, in the null, it ends up
being ( 1 - glmobject$aic/2) and in the other one i
On Thu, May 31, 2012 at 8:27 AM, Johannes Radinger wrote:
> Hi,
>
> I have a dataframe and want to remove columns from it
> that are populated with a similar value (for the total
> column) (the variation of that column is 0). Is there an
> easier way than to calculate the statistics and then
> rem
Please look at the likert function in the HH package.
?likert
has many examples.
Here is the code for your query
## install.packages("HH") ## if necessary
library(HH)
twobar <- data.frame(neg=c(8,0,9,2), pos=c(12,9,0,4))
likert(twobar)
Rich
On Thu, May 31, 2012 at 9:30 AM, Sarah Goslee wrote:
>
On 12-05-31 9:10 AM, anna freni sterrantino wrote:
Hello!
I'm having some trouble
trying to replicate in R a Stata function
invbinomial(n,k,p)
Domain n: 1 to 1e+17
Domain k: 0 to n - 1
Domain p: 0 to 1 (exclusive)
Range:0 to 1
Descrip
Hi Roberto,
The R Graph Gallery is an excellent resource for this kind of
question. You can browse the thumbnails until you find something that
leads you in the right direction, like maybe:
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=136
Sarah
On Thu, May 31, 2012 at 7:18 AM,
Hi,
I have a dataframe and want to remove columns from it
that are populated with a similar value (for the total
column) (the variation of that column is 0). Is there an
easier way than to calculate the statistics and then
remove them by hand?
A <- runif(100)
B <- rep(1,100)
C <- rep(2.42,100)
D
On 12-05-31 8:53 AM, Andrew Miles wrote:
Two related questions.
First, I am fitting a model with a single predictor, and then a null model
with only the intercept. In theory, the fitted model should have a higher
log-likelihood than the null model, but that does not happen. See the
output belo
Hello!
I'm having some trouble
trying to replicate in R a Stata function
invbinomial(n,k,p)
Domain n: 1 to 1e+17
Domain k: 0 to n - 1
Domain p: 0 to 1 (exclusive)
Range: 0 to 1
Description: returns the inverse of the cumulative binomial; i.e
1 - 100 of 121 matches
Mail list logo