Hello,
This is a question from a class I'm not in (it's also winter break). But,
all the same, I don't know where to start in R with this. It's supposed to
be done in R. So, can anyone direct me with a helpful hint or 2, on how to
get started with the question listed below, or tell me how I can r
Hello,
Looking to generate Pascal's triangle in R. How do I get started? Thanks,
--
Matilda Gogos
matildaelizabe...@gmail.com
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-he
Dear Rich and Michael,
Thanks, Rich, for answering Michael's question. I'll just add that
?Commander (or "Help -> Commander help", from the Rcmdr menus) provides
information about the available Rcmdr options.
Best,
John
John Fox
Senator William McMaster
Profes
Michael, John and Bert,
Thank you all very much for your help. I think I have gained a lot of
understanding and am ready to write better code. I will study "The R Inferno".
I appreciate it.
- Alex
From: R. Michael Weylandt
To: Alex Zhang
Cc: John Fox ; "r-
I am trying to do a confirmatory factor analysis with Lavaan. I need a way to
get at the Variance Extracted information. Is there a simple way to do the
calculation. Lavaan does not seem to output this.
Thank you
Rajkumar
--
View this message in context:
http://r.789695.n4.nabble.com/Lavaan-and-A
Dear R-help members,
*(My apologies for cross-posting to both R-help and R-devel -- this
question straddles both domains...)*
The question: Is it possible to initialize and later free a large data
structure strictly within a shared C library, to be used by a function in
the C library that I'll c
Thanks Duncan, you've unclogged my thinking. For anybody interested,
see below a sketch of the solution.
Cheers,
James
--START SKETCH OF SOLUTION--
#include
#include
static typedef struct {
int nrow, ncol;
double *data;
} _myparticle_data_struct;
static _myparticle_data_struct mypar
On Dec 27, 2011, at 4:55 PM, alison korte wrote:
> Does anyone have information about using the National Practitioner Data Bank
> (NPDB) in R? It's public use data available from the U.S. Department of
> Health and Human Services that can be downloaded as a .dat or .por file. I
> can't even fi
Your puzzle comes from a collision of two somewhat subtle facts that
i) sapply() is a wrapper for lapply(), not apply() and ii)
data.frame()s are secretly columnwise lists. Because of this, sapply =
lapply takes each list element = data.frame column and passes it to
the column individually. Compare
Dear R-help members,
*(My apologies for cross-posting to both R-help and R-devel -- this
question straddles both domains...)*
The question: Is it possible to initialize and later free a large data
structure strictly within a shared C library, to be used by a function in
the C library that I'll c
Dear R-help members,
*(My apologies for cross-posting to both R-help and R-devel -- this
question straddles both domains...)*
The question: Is it possible to initialize and later free a large data
structure strictly within a shared C library, to be used by a function in
the C library that I'll c
Does anyone have information about using the National Practitioner Data Bank
(NPDB) in R? It's public use data available from the U.S. Department of Health
and Human Services that can be downloaded as a .dat or .por file. I can't even
figure out how to open the file in R.
[[alternative H
Hello,
When I make certain values greater with the lmer function, variance
components that I expect to give a certain value are switched from how I
expect them to be. Has anyone else had this problem?
Thanks
[[alternative HTML version deleted]]
__
Jeff,
Could you please tell me which part of the guide that I didn't follow?
I provide a piece of code that can run in R, producing the problem and I also
provided my results.
Other people wanted to help me to learn more so asked me about more details. I
replied very carefully explaining that
I suggest you (re-?)read the posting guide. Proper etiquette on this list is to
provide a fully self-contained ("reproducible") example that demonstrates your
problem. You are free to supply an alternate to your actual function as long as
it illustrates your problem and you can deal with the re-
It is very easy.
Here is my Projector() function from library(RcmdrPlugin.HH)
Projector <- function() {
Rcmdr <- options()$Rcmdr
Projector.options <-
list(log.font.size = 15,
log.width = 54,
log.height = 6,
output.height = 18,
scale.factor = 1.4)
Rcmd
John,
Thank you for your comment.
There is no secret. But the actual function I need to call is rather
irrelevant. However don't take it as the "abs" function. If you like to know,
it is a function that converts 4 kinds of old ids from several old database
tables into a new id in a new databa
Keith Larson wrote on 12/27/2011 03:05:48 PM:
> Dear all,
>
> I would like to conduct a Pearson's correlation using cor.test
> separately for each individual in my data set. Each individual has
> nine observations of the measurement variable 'Delta13C'. I can figure
> our how to do it manually on
Dear all,
I would like to conduct a Pearson's correlation using cor.test
separately for each individual in my data set. Each individual has
nine observations of the measurement variable 'Delta13C'. I can figure
our how to do it manually one 'Individual_ID' at a time, but I cannot
figure out how to
I realize this is basic, but I can't figure out the syntax for setting
options for R Commander. I'm running Linux Mint and want to increase the R
Commander font sizes. I see that there are (apparently command line)
options to do so. I have a desktop launcher with the following command
line:
sh
On Dec 27, 2011, at 4:02 PM, R. Michael Weylandt wrote:
stats::D
stats::integrate
And package Ryacas
not sure about limits.
M
On Tue, Dec 27, 2011 at 2:59 PM, Jawad Elomari
wrote:
Hi guys,
Is there an R package for calculus operations (e.g. limits,
derivatives... etc.)?
Regards,
Dear Alex,
> -Original Message-
> From: Alex Zhang [mailto:alex.zh...@ymail.com]
> Sent: December-27-11 3:34 PM
> To: John Fox
> Cc: r-help@r-project.org
> Subject: Re: [R] sapply Call Returning " the condition has length > 1"
> Error
>
> John,
>
> Thanks for the pointers.
>
> The Dummy
stats::D
stats::integrate
not sure about limits.
M
On Tue, Dec 27, 2011 at 2:59 PM, Jawad Elomari wrote:
> Hi guys,
>
> Is there an R package for calculus operations (e.g. limits,
> derivatives... etc.)?
>
> Regards,
>
> __
> R-help@r-project.org mail
Hi guys,
Is there an R package for calculus operations (e.g. limits,
derivatives... etc.)?
Regards,
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guid
Tell us what you want to do, not how you want to do it. What is the
problem you are trying to solve? You can create your own
function/code within the 'apply' to process one element of the vector
as a time. What is the output that you expect? There is (almost)
always a way of doing it, as long a
I think one of the suggestion was to use something like, assuming you
have the time in POSIXct
format(x$time, format = "%H:%M:%S") >= "20:10:00" & format(x$time,
format = "%H:%M:%S") <= "21:00:00"
This takes the 'date' out of the equation. You can always write a
function to do this for you.
O
John,
Thanks for the pointers.
The DummyFunc is just a made-up example. The true function I need to use is
more complicated and would be distractive to include.
Do you mean that sapply would take columns in the input data.frame and feed
them into "FUN" as "whole" vectors? That explains the beh
If the columns are contiguous, then try the following: (you will have
to determine the range to use)
aggregate(dstats[,c(3:25)],list(dstats$Year,dstats$HD),FUN=sum)
On Tue, Dec 27, 2011 at 2:22 PM, William Dunlap wrote:
> Your command includes (at about character position 240):
> 'R.N.S.1ST',R.
Dear Alex,
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Alex Zhang
> Sent: December-27-11 2:14 PM
> To: r-help@r-project.org
> Subject: [R] sapply Call Returning " the condition has length > 1"
> Error
>
> Dear all,
>
> H
You are right that the problem is that "DummyFunc" isn't vectorized. R
looks for a single logical value in an "if" statement but "x>0" gives
it a whole vector's worth -- as the warning indicates, it only uses
the first and pushes the whole vector through the loop in the
return(-x) branch, which exp
Taral
The general problem of finding subgraphs with a given structure ("motifs")
is hard (ie computationally expensive). There is some literature...
have you looked at the package igraph, function graph.motifs()?
albyn
Quoting Taral :
I have the adjacency matrix of a graph. I'm trying to fi
Dear r-help mailing list,
Is there a way to incorporate weights into the minsplit criteria in rpart,
when the weights are uneven? I could not find a way for the minsplit
threshold to take the weights into account, and when the weights are uneven
it becomes an issue, as the following example shows.
Your command includes (at about character position 240):
'R.N.S.1ST',R.N.S.2ND'
Note the missing quote after the comma.
When R's error message starts with
Error:
instead of
Error in :
it usually means it could not parse the text that you typed
to make a command out of it. (Perhaps it should
On Dec 27, 2011, at 1:01 PM, steven.hazen wrote:
Yes that is what I'm trying to do, however when I enter the code
aggregate(dstats[,c('QUOTA','L.R.QTA','L.R.A.1ST','L.R.S.
1ST','L.N.QTA','L.N.A.1ST','L.N.S.1ST','R.R.QTA','R.R.A.1ST','R.R.A.
2ND','R.R.A.3RD','R.R.S.1ST','R.R.S.2ND','R.R.S.3R'
On Dec 27, 2011, at 12:05 PM, Cheung Zihong wrote:
Thank you for your reply.
I didn't know what adjust methods can apply to log-rank tests.Or the
kind of tests are just not relevant? SAS seems to use sidak
method to do pairwise log-rank tests. which one is sidak method in
p.adjust metho
Dear all,
Happy new year!
I have a question re using sapply. Below is a dummy example that would
replicate the error I saw.
##Code Starts here
DummyFunc <- function(x) {
if (x > 0) {
return (x)
} else
{
return (-x)
}
}
Y = data.frame(val = c(-3:7))
sapply(Y, FUN = DummyFunc)
##Code ends her
Dear all,
RQDA is a package for computer-aided qualitative data analysis, currently
supporting plain text as qualitative data.
It supports various operations in the grounded theory tradition such as
coding, retrieval of codings, categorisation, attributes etc. It can also
be used for content analy
Yes that is what I'm trying to do, however when I enter the code
aggregate(dstats[,c('QUOTA','L.R.QTA','L.R.A.1ST','L.R.S.1ST','L.N.QTA','L.N.A.1ST','L.N.S.1ST','R.R.QTA','R.R.A.1ST','R.R.A.2ND','R.R.A.3RD','R.R.S.1ST','R.R.S.2ND','R.R.S.3R','R.N.QTA','R.N.A.1ST','R.N.A.2ND','R.N.A.3RD','R.N.S.1S
Jim Holtman > I'd like to compare "hour1:min1:sec1" with "hour2:min2:sec2".
I know how to do to compare "year1-mon1-day1 hour1:min1:sec1" with
"year2-mon2-day2 hour2:min2:sec2" by converting 'character' into POSIXlt
but
I'd like to konw if there is another way to do this comparison without
con
Hi Uwe,
was a great suggestion.
Thanks,
--
Silvano Cesar da Costa
Departamento de Estatística
Universidade Estadual de Londrina
Fone: 3371-4346
--
- Original Message -
From: "Uwe Ligges"
To: "Silvano"
Cc:
Sent:
Is this what you are after? Send your sample data using 'dput/dump'
next time -- easier to read in:
> x <- read.table(text = "License Species Year HD QuotaL.R.QTA
> L.R.QTASuccess Surplus
+ PermitElk1999101 50 87
90 151 10
+ P
Yes, use abind.
library(abind)
?abind
On Tue, Dec 27, 2011 at 10:34 AM, ali_protocol <
mohammadianalimohammad...@gmail.com> wrote:
> Hi every one,
>
> How is it possible to create a matrix with 3 dimensions from several 2
> dimensional matrice?
> Is it possible that each of "elementary/buildin
Is this what you are after:
> x1 <- matrix(1:25, 5)
> x2 <- x3 <- x1
>
> # combine matrices, redimension and then rename
> z <- cbind(x1, x2, x3)
> dim(z) <- c(5, 5, 3)
> z # without names
, , 1
[,1] [,2] [,3] [,4] [,5]
[1,]16 11 16 21
[2,]27 12 17 22
[3,]3
Currently I have a data set looking like:
License Species Year HD QuotaL.R.QTAL.R.QTASuccess
Surplus
PermitElk1999101 50 87 90
151 10
PermitDeer1999101 50 20
Thank you for your reply.
I didn't know what adjust methods can apply to log-rank tests.Or the kind
of tests are just not relevant? SAS seems to use sidak
method to do pairwise log-rank tests. which one is sidak method in
p.adjust methods?
p.adjust.methods
# c("holm", "hochberg", "hommel", "bo
Hi every one,
How is it possible to create a matrix with 3 dimensions from several 2
dimensional matrice?
Is it possible that each of "elementary/building block" matrices could be
called by its corresponding original name?
Thanks alot.
--
View this message in context:
http://r.789695.n4.n
Hello all.
I have been teaching myself how to use recursive partitioning in R,
particularly using the "party" package.
Now that i've generated some trees, i would like to understand how i would
go about validating the goodness of fit/accuracy, etc..., of the trees. What
func
I should have said, those date vairable are indeed date variables, but I'll
try some of these techniques as soon as I get in this morning.
Thanks so much for your input.
- Eric
On Tue, Dec 27, 2011 at 6:54 AM, Jorge I Velez wrote:
> Try also
>
> subset(x, as.Date(Inspected, "%m/%d/%y") > as.Dat
On 23.12.2011 14:54, Brendan Halpin wrote:
I've been running a glmer logit on a very large data set (600k obs).
Running on a 10% subset works correctly, but for the complete data set,
R completes apparently without error, but does not display the results.
Given these jobs take about 200 hours,
Here is one way:
> x <- read.table(text = "4352;2011-09-02 21:30:00;3242;
+ 4352;2011-09-02 21:31:00;3315;
+ 4352;2011-09-02 21:32:00;4241;
+ 4352;2011-09-02 21:33:00;5394;", sep = ';', as.is = TRUE)
> # create a 'character' of just the time. If the data is of
> # the format above, 'substring' ca
On Dec 27, 2011, at 9:52 AM, Elliott wrote:
Hello R users:
I wonder if there are functions for multiple log-rank tests with
adjusted
P-values. I found survdiff( ) only give pooled tests but
without pairwise ones.
Klein and Moeschberger suggest Bonferroni as a starting point. Why not
use
On Dec 27, 2011, at 15:47 , Scott Raynaud wrote:
> I have the following code (which I did not write) that generates
> data based on a logistic model. I'm only getting a single record
> with y=1. It seems implausible that in 50k cases that have a
> single y=1. Does that ring alarm bells for
On 27.12.2011 14:43, Silvano wrote:
Hi,
I'm analyzing a longitudinal data set with 387 cows were observed in 63
days divided into 6 groups, and every 30 days was found to produce milk.
Does not aim to model the time using regression. Only compare the groups
differ in terms of milk production.
On 27.12.2011 15:43, 木棉 wrote:
Dear friend,
Hello! When I’m using R, I come across some problems. Could you please
give me a hand? Attached is my problem in details. Thanks a lot!
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented,
Hi every one,
newbie here.
I have a matrix and I want to compute the cumulative distribution of
Spearman's Rank rho values, for variables (which are in rows)
m= matrix ( rnorm (30), 10,3)
how is that done?
--
View this message in context:
http://r.789695.n4.nabble.com/Cumulative-distributio
Hello R users:
I wonder if there are functions for multiple log-rank tests with adjusted
P-values. I found survdiff( ) only give pooled tests but
without pairwise ones. Thanks a lot !
best wishes
zhang zihong
--
View this message in context:
http://r.789695.n4.nabble.com/multiple-log-rank-test
Hi every one,
newbie here.
I have a matrix and I want to compute the cumulative distribution of
coefficient of variation, for variables (which are in rows)
m= matrix ( rnorm (30), 10,3)
how is that done?
--
View this message in context:
http://r.789695.n4.nabble.com/Cumulative-distribution-
Hi,
I'm analyzing a longitudinal data set with 387 cows were
observed in 63 days divided into 6 groups, and every 30 days
was found to produce milk. Does not aim to model the time
using regression. Only compare the groups differ in terms of
milk production. There are many missing observations
Dear friend,
Hello! When I’m using R, I come across some problems. Could you please
give me a hand? Attached is my problem in details. Thanks a lot!
--
Ivy Zhang__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
Hi,
I 'd like to know how to extract an interval of "hour:minute" type from a
column of POSIXlt POSIXct type.
For instance:
my_data.csv:
4352;2011-09-02 21:30:00;3242;
4352;2011-09-02 21:31:00;3315;
4352;2011-09-02 21:32:00;4241;
4352;2011-09-02 21:33:00;5394;
...
4352;2011-09-02 01:02:
Hello R users:
I wonder if any function are available for multiple log-rank tests with
adjusted P-values. I found survdiff( ) only give pooled tests but
without pairwise ones. Thanks a lot !
best wishes
zhang zihong
[[alternative HTML version deleted]]
__
Try also
subset(x, as.Date(Inspected, "%m/%d/%y") > as.Date(Sold, "%m/%d/%y") )
HTH,
Jorge.-
On Mon, Dec 26, 2011 at 9:32 PM, Jorge I Velez <> wrote:
> Hi Eric,
>
> Try
>
> # data
> x <- structure(list(House_number = 1:4, Inspected = structure(c(3L,
> 4L, 1L, 2L), .Label = c("10/31/2011", "8/3
I have the following code (which I did not write) that generates
data based on a logistic model. I'm only getting a single record
with y=1. It seems implausible that in 50k cases that have a
single y=1. Does that ring alarm bells for anyone else?
beta<-c(-1.585600,-0.246900)
betasize<-lengt
On Dec 27, 2011, at 8:38 AM, Ayyappa Chaturvedula wrote:
Dear group,
I am trying to plot individual plots of TIME vs DV using xyplot. I
used
the following code:
xyplot(DV~TIME|CID,data=gendiff,layout=c(4,4,20))
It works fine but the problem is that the plot is not saving all the
pages,
A function like the one below will give you the class and number of valid
entries for a dataset. At sample data set would help determine if it works.
It works on a simple data set I created and one from the ggplot2 package but it
is
not really tested.
With your data set as df1 something like
xx
Dear group,
I am trying to plot individual plots of TIME vs DV using xyplot. I used
the following code:
xyplot(DV~TIME|CID,data=gendiff,layout=c(4,4,20))
It works fine but the problem is that the plot is not saving all the pages,
I could see only the 20th page. How to make all the pages avaialb
Im am looking for a function to create Pango markups (by e.g. passing a string
and a set of Pango markup attributes like color etc.)
Is there a function that will do this?
Thanks!
Mark Heckmann
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com
I am creating a levelplot figure with the following code. This should be
repeatable code, which includes a link to the data I am working with.
---
pdfFn <- "foo.pdf"
df <-
read.table("http://dl.dropbox.com/u/31495717/stackoverflow.overlaps.list.txt";,
sep="\t", header=FA
Hi,
Thank you for the response, I had indeed not installed statconnDCOM.
Now able to invoke methods of the com object. Also have joined the mailing
list rco...@mailman.csd.univie.ac.at. Now I am trying to capture the
callback events fired by my com object. Have posted the question on the
ma
As Ben pointed out, this is not reproducible. My guess is that the
offending sample is degenerate in some way, e.g., there are no
observations in one of the six sites or no non-zero responses.
hth,
Z
On Mon, 26 Dec 2011, Melissa Aikens wrote:
Hello,
I am having a problem with the zero-infla
70 matches
Mail list logo