Definitely doable and you are on the right path and maybe even close.
The error message you got showed your query as having the wrong info after
the 'FROM'
keyword
' SELECT * FROM c("BIODBX.MECCUNIQUE2", "BIODBX.QDATA_HTML_DUMMY",
"BIODBX.SET_ITEMS", "BIODBX.SET_NAMES", "dbo.sysdiagrams",
"GEMD.A
Hi Eric,
Thank you spent time to help me for this.
Here is the thing: I was requested to manage a sql server for my group. the
server has many schemas and the tables (>200). I use ODBC to connect the server
and get the schema name + table name into a data frame.
For each of schema + table on s
Not all advice received on the Internet is safe.
https://xkcd.com/327
https://db.rstudio.com/best-practices/run-queries-safely
It is not that much more difficult to do it right.
On July 2, 2021 12:05:43 PM PDT, Eric Berger wrote:
>Modify the summ() function to start like this
>
>summ <- functi
Hard for me to tell without more details but it looks like the following
has several bugs
for (i in dbtable$Tot_table)
{
Tabname <- as.character(sqldf(sprintf("SELECT Tot_table FROM dbtable",
i)))
summ(Tabname)
}
Your sprintf() statement seems to use 'i' but actually does not.
You probably wa
Hello Eric,
Following your suggestion, I modified the code as:
summ <- function(Tabname){
query <- sprintf(" SELECT * FROM %s",Tabname)
res <- dbGetQuery(con, query)
view(dfSummary(res), file =
"W:/project/_Joe.B/MSSQL/try/summarytools.Tabname.html")
rm(res)
}
for (i in dbtable$Tot_table
Modify the summ() function to start like this
summ <- function(Tabname){
query <- sprintf(" SELECT * FROM %s",Tabname)
res <- dbGetQuery(con, query)
etc
HTH,
Eric
On Fri, Jul 2, 2021 at 9:39 PM Kai Yang via R-help
wrote:
> Hello List,
>
> The previous post look massy. I repost my questio
Hello List,
The previous post look massy. I repost my question. Sorry,
I need to generate summary report for many tables (>200 tables). For each
table, I can use the script to generate report:
res <- dbGetQuery(con, "SELECT * FROM BIODBX.MECCUNIQUE2")
view(dfSummary(res), file =
"W:/project/_J
Hello List,I need to generate summary report for many tables (>200 tables). For
each table, I can use the script to generate repost:
res <- dbGetQuery(con, "SELECT * FROM BIODBX.MECCUNIQUE2")view(dfSummary(res),
file =
"W:/project/_Joe.B/MSSQL/try/summarytools.BIODBX.MECCUNIQUE2.html")rm(res)
BI
Daniel, if you wish to learn from your mistakes them you must listen. Peter is
not someone whose input you should dismiss. The function you have showed us
never worked as you have described it. However, if you give .GlobalEnv as the
first argument in the call to ls() then it should work.
You wi
Thanks! I was not aware of the browser() function, seems pretty useful for
debugging.
However, for this particular case, adding it to the mentioned function doesn't
do much: Again I get no errors, no output in the terminal and no files are
created.
If I include browser() within the for-loop (no
Maybe a daft question arising from lack of reproducible example, but have you
run ls() manually to make sure there are objects that _exactly_ match "_Figs_" ?
The simplest explanation for a loop doing nothing is that there are no cases.
S Ellison
> The following function is supposed to search th
I discourage the use of print() for debugging.
Put a browser() statement into your loop and when execution takes you to the
debugger interface, examine your variables and expressions one by one.
B.
> On Apr 4, 2017, at 10:09 AM, DANIEL PRECIADO wrote:
>
> To your first comment: Yes, the fu
To your first comment: Yes, the function used to work, and the loop inside it
still does (as indicated in my first email). I wouldn't bother asking otherwise.
To your second, no, specifying the environment in the ls() call doesn't help,
the problem persist.
On Tue, 2017-04-04 at 15:26 +0200, pe
Given the following little experiment
> foobar <- 1
> f <- function() ls()
> f()
character(0)
> f <- function(x) ls()
> f(2)
[1] "x"
>
... I am pretty sure that your code _never_ actually worked.
It probably helps if you tell ls() which environment to list, as in:
> f <- function() ls(.Global
Thanks, but printing doesn't work within the function either. (i.e, no
result or output, or error). Also, like I said, the loop is working
fine on its own (so the path, name, filename, and all other variables
called from the function exist, are available and are recognized just
fine). It just doesn
How about inserting print() statements on the output of "ls()" and the value of
"filename". In particular, is the value of Plots_path the same as last week?
-pd
> On 4 Apr 2017, at 10:50 , DANIEL PRECIADO wrote:
>
> The following function is supposed to search the workspace and save
> plots
The following function is supposed to search the workspace and save
plots (i.e. listing all objects in the workspace named "Figs", which
are all ggplot2 plots, and saving them as png files)
SaveFigs <- function()
{
for (i in ls(pattern="_Figs_"))
{
filename = paste
just going to throw this idea out there in case it's something that anyone
wants to pursue: if i have an R script and i'm hitting some unexpected
behavior, there should be some way to remove extraneous objects and
manipulations that never touch the line that i'm trying to reproduce.
automatically s
240-276-1260
-Original Message-
From: David Barron [mailto:dnbar...@gmail.com]
Sent: Saturday, January 03, 2015 10:19 AM
To: Muhuri, Pradip (SAMHSA/CBHSQ)
Cc: r-help@r-project.org
Subject: Re: [R] R function to convert person-level observations to
person-period observations
Your data are wron
Your data are wrong. The 'event' variable (dead in your example) needs
to be 1 for cases that end in an event and 0 for spells that are
censored: yours is the other way around. If you change the 'dead'
variable to c(1,0,1) you will get the desired result.
If you really need to reverse the behavio
Hello,
I was trying to convert person-level observations to person-period observations
using an R custom function obtained from the UCLA web site
(http://www.ats.ucla.edu/stat/r/faq/person_period.htm). Please see my
reproducible example below. The function (PLPP) in the R script takes five
a
-Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Luke Hartigan
> Sent: Friday, July 25, 2014 2:23 PM
> To: r-help@r-project.org
> Subject: [R] R function returning a list of variable(s) conditional on
> the value of an
I don't know about better or more elegant - but see inserts below...
Cheers.
On Fri, 25 Jul 2014 22:22:56 +1000 "Luke Hartigan"
wrote
> Dear all,
>
> I have an R function which returns a list of variables; however, within the
> body of the function I would like to incorporate a branch based on
Dear all,
I have an R function which returns a list of variables; however, within the
body of the function I would like to incorporate a branch based on a user
selected option that will mean there will be one different variable to
return based on the option value.
I was thinking of doing somethin
Hi,
Can anyone please suggest if it's possible to do a step-wise panel
regression in R ?
Thanks,
Nitin
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
You could use the XLConnect package to do this. For example, something
like this might do the trick ...
library(XLConnect)
mysheet <- "Sheet4"
wb <- loadWorkbook("C:/temp/MyData.xlsx")
wbsheets <- getSheets(wb)
mysheet %in% wbsheets
Jean
On Tue, Oct 29, 2013 at 3:26 PM, Ron Michael wrote:
> H
Hi here is the solutions using XLConnect package:
library(XLConnect)
wb <- loadWorkbook(path to your Excel file)
c("particular sheet name")%in%getSheets(wb)
Andrija
On Tue, Oct 29, 2013 at 9:26 PM, Ron Michael wrote:
> Hi,
>
> I am looking for some R function which will tell me, whether a
Hi,
I am looking for some R function which will tell me, whether a particular sheet
in an Excel file (.xlsx/.xls) exists or not. I just need to get some TRUE/FALSE
type of answer.
Can somebody give me any pointer if such function exists or not?
Thanks and regards,
On Wed, Oct 9, 2013 at 12:37 PM, Bert Gunter wrote:
> Probably not. I would guess that most (or all) of us have no clue what
> "bisecting" a k-means algorithm means. You might have more luck if you
> explain yourself more clearly (but probably not from me in any case).
>
> Is this an R question,
Probably not. I would guess that most (or all) of us have no clue what
"bisecting" a k-means algorithm means. You might have more luck if you
explain yourself more clearly (but probably not from me in any case).
Is this an R question, by the way? This is not a statistics list --
it's an R programm
Any help on this?
Regards,
Vivek
On Tue, Oct 8, 2013 at 2:36 PM, Vivek Singh wrote:
> Hi All,
>
> Can someone please tell me* R function for Bisecting K-means algorithm*.
> I have used *kmeans() *function but not getting good results.
>
> Please help.
>
> --
> Thanks and Regards,
>
> Vivek Kum
Hi All,
Can someone please tell me* R function for Bisecting K-means algorithm*. I
have used *kmeans() *function but not getting good results.
Please help.
--
Thanks and Regards,
Vivek Kumar Singh
Research Assistant,
School of Computing,
National University of Singapore
Mobile:(0065) 82721535
Dear R-useRs,
I'm looking for an R-function for censored linear regression. I have the
following data
x1 <- rnorm(100)
x2 <- rnorm(100)
y <- x1 + 2*x2 + rnorm(100,0,0.5)
stat <- rep(1,100)
stat[50:100] <- 0
data <- data.frame(y,x1,x2,stat)
y is the dependent variable, x1 and x2 are the indepe
nthropology
Texas A&M University
College Station, TX 77840-4352
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Rui
Barradas
Sent: Monday, July 29, 2013 3:46 AM
To: javad bayat
Cc: r-help@r-project.org
Subject: Re: [R] R functio
Hello,
Sorry, that should be
T <- function(x){
ifelse(x > = 1, "Combustion", "Petroleum")
}
Rui Barradas
Em 29-07-2013 09:32, Rui Barradas escreveu:
Hello,
Try the following.
T <- function(x){
ifelse(pah1$P > = 1, "Combustion", "Petroleum")
}
T(pah1$P[1:83])
Hope this hel
Hello,
Try the following.
T <- function(x){
ifelse(pah1$P > = 1, "Combustion", "Petroleum")
}
T(pah1$P[1:83])
Hope this helps,
Rui Barradas
Em 29-07-2013 06:35, javad bayat escreveu:
Dear R users;
I am MSc student and I want to write my own function, but it cant be
completed. pleas
Dear R users;
I am MSc student and I want to write my own function, but it cant be
completed. please help me for solve it. here is my code:
pah1$P = (pah1$Fluoranthene/pah1$Pyrene)
T = function(x){
for (i in 1:length(pah1$P))
if (i >= 1)
print("Combustion")
if (i < 1)
print("Petroleum")
}
T(pah1$P
HI,
I am not sure what is wrong in your side. I cut and paste the same code and I
get this:
library(plyr)
set.seed(25)
mydf<- data.frame(subid=rep(1:5,each=3),Col=sample(c(0:5,NA),15,replace=TRUE))
retsample <- function(df, Column,size) {
set.seed(1234)
mysel <- ddply(df, .(subid),function(
Hi,
If you are using Rstudio, please check this link
(http://support.rstudio.org/help/discussions/problems/850-ddply-misbehaving-in-rstudio-and-only-in-rstudio).
A.K.
- Original Message -
From: arun
To: R help
Cc: David Winsemius
Sent: Wednesday, May 1, 2013 9:49 PM
Subject: Re: R
Hi ST,
You could try this:
library(plyr)
set.seed(25)
mydf<- data.frame(subid=rep(1:5,each=3),Col=sample(c(0:5,NA),15,replace=TRUE))
retsample <- function(df, Column,size) {
set.seed(1234)
mysel <- ddply(df, .(subid),function(x)
summarize(x,missing=sum(is.na(x[[Column]])|x[[Column]]==0)))
myids<-
On Apr 30, 2013, at 6:00 AM, arun wrote:
> Hi,
> May be this helps:
> funcName<- function(df1, x){
> whatCol=df1[[x]]
> print("Got it")
> print(whatCol)
> }
>
> funcName(df,"ColA")
> #[1] "Got it"
> #[1] 1 2 3 4 5
> funcName(df,"ColB")
> #[1] "Got it"
> #[1] A B C D E
> #Levels: A B C D E
Hi,
May be this helps:
funcName<- function(df1, x){
whatCol=df1[[x]]
print("Got it")
print(whatCol)
}
funcName(df,"ColA")
#[1] "Got it"
#[1] 1 2 3 4 5
funcName(df,"ColB")
#[1] "Got it"
#[1] A B C D E
#Levels: A B C D E
A.K.
>I am trying to extract the 2nd column from a dataframe using a
Cross-posted, verbatim, on stackoverflow:
http://stackoverflow.com/q/15203347/271616
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
R/Finance 2013: Applied Finance with R | www.RinFinance.com
On Mon, Mar 4, 2013 at 7:07 AM, Аскар Нысанов wrote:
>
>
> Hi everyo
unlist(lapply(1:n, function(i) {-sort(returns[i:(N+i)])[op]*value}))
}
Nello Blaser
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of ? ???
Sent: Montag, 4. März 2013 14:07
To: R-help@r-project.org
Subject: [R] R function fo
tion(i) {-sort(returns[i:(N+i)])[op]*value}))
}
Nello Blaser
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of ? ???
Sent: Montag, 4. März 2013 14:07
To: R-help@r-project.org
Subject: [R] R function for estimating historical-VaR
Hi everyone!! I am new in R and I want to create a simple R function for
estimating historical-VaR. In y_IBM returns, there are 2300 observations. For
evaluation I take the next 2000 observations,
then I abandon the latest 300 observations. Firstly, I use the window which has
the fix
length a
Pete: Please don't do people's homework for them!
At most, give them a ***hint*** only.
cheers,
Rolf Turner
On 02/19/2013 12:01 PM, Pete Brecknock wrote:
simonj16 wrote
Consider an urn that contains 10 tickets, labelled: 1,1,1,1,2,5,5,10,10,10
I want to draw with replacement n=
simonj16 wrote
> Consider an urn that contains 10 tickets, labelled: 1,1,1,1,2,5,5,10,10,10
>
> I want to draw with replacement n=40 tickets. I am interested in the sum,
> Y, of the 40 ticket values that I draw
>
> Write an R function named urn.model that simulates this experiement. What
> I have
Dear all,
Does someone know an R function implementing the method of Sison and
Glaz (1995) (see full ref below) for computing Simultaneous confidence
intervals for multinomial proportions?
As alternative method, I think to boostrap the mean of each proportion
and get in that way confidence int
ect the text file and rerun.
GL
Frank
Chicago
--------
> Date: Mon, 3 Dec 2012 12:30:31 -0800
> From: q...@hotmail.com
> To: r-help@r-project.org
> Subject: [R] r function definition
>
> I am a very new R user. I am trying to write functons and debug fu
On 12/3/2012 2:30 PM, qq wrote:
I am a very new R user. I am trying to write functons and debug functions.
One problem for me is that I need to alwasy copy the whole function body and
resubmit to R console every time I changed even one line of the function.
Because I have long algorithm function,
?source
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Enginee
I am a very new R user. I am trying to write functons and debug functions.
One problem for me is that I need to alwasy copy the whole function body and
resubmit to R console every time I changed even one line of the function.
Because I have long algorithm function, copying and pasting is very tedio
Hi,
If you move the read.csv statement outside the function and instead
pass the data as an argument, then you can provide a reproducible
example using dput(head(drugs, 20)) or a similar fake dataset. It's
really hard to debug code without knowing what kind of data it is
supposed to act upon.
In
Hello fellow R-ers,
I have spent some time on this and it is driving me NUTS! I am sure there is a
solution, so please help.
I am trying to create a function that will plot different lines for subsets of
a dataset. For example, I am trying to look at different drug groups (drug2),
let's say 1,2
Indeed -- many of them (find a recent post on Pat Burns Portfolio Probe blog
for a comprehensive discussion) -- also see rugarch.
Michael
On Aug 13, 2012, at 8:17 AM, Sajeeka Nanayakkara wrote:
> Is there any R function to fit ARCH and GARCH models for univariate time
> series and to select
Use the rugarch package - it's great, high quality.
On Mon, Aug 13, 2012 at 10:17 AM, Sajeeka Nanayakkara wrote:
> Is there any R function to fit ARCH and GARCH models for univariate time
> series and to select the best model?
>
>
> Sajeeka Nanayakkara
> [[alternative HTML version deleted
Is there any R function to fit ARCH and GARCH models for univariate time series
and to select the best model?
Sajeeka Nanayakkara
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
I don't have a Matlab license or enough experience with it to know what
gradient does, but I know there's a Matlab-to-R "dictionary" out there that
many folks find helpful. It might have what you need (or just be generally
useful).
http://cran.r-project.org/doc/contrib/Hiebeler-matlabR.pdf
No
Hi,
I am trying to convert some Matlab code into R for running some
experiments and I was wondering if there is some function in R which
does the work of the gradient function in Matlab calculating the
"gradient" of 1-, 2- and 3-d images. I only need the 3-d calculations
for running these experime
Before rewriting in C, especially if you are new at it, have you
profiled (Rprof) your function to see the time is being spent? Are
you using dataframe or matrices; there is a big speed different
between them when accessing data. So profile your code, see where the
time is spent and then decide w
Hello there,
I recently wrote some code to perform pairwise correlations between all
samples in a large dataset. So we are talking about performing pairwise
correlations between 400K vectors. Since R has a very rich library of
functions, it was very easy to code this in R. However, R was probably
On 15/05/11 13:41, Dan Abner wrote:
Hello everyone,
Is there an R function that returns an object's search path position?
?find
cheers,
Rolf Turner
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
On 14/05/2011 9:41 PM, Dan Abner wrote:
Hello everyone,
Is there an R function that returns an object's search path position?
Does find() do what you want? It doesn't give the position in the
search path, but you could get that from something like
name <- "plot"
which( search() %in% find(
Hello everyone,
Is there an R function that returns an object's search path position?
Thank you,
Dan
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the pos
On May 6, 2010, at 11:44 AM, Bo Li wrote:
Hi,
I am looking for a established R function or package which does the
multivariate local linear regression. I mean the predictor x is
multi-dimensional. locpoly() is the univariate version. I am
wondering if there is a multivariate version bes
Hi,
I am looking for a established R function or package which does the
multivariate local linear regression. I mean the predictor x is
multi-dimensional. locpoly() is the univariate version. I am wondering if there
is a multivariate version besides the function loess().
Thank you in advan
I guess, you are looking for:
?file.remove
Am 20.03.2010 20:36, schrieb Megh:
Is there any R function to delete a CSV file saved in disk? For example here
I have created following R function :
asd<- function(a = 5) {
dat<- read.delim(file="F:/Test.csv", header=T, sep=",")
res<- dat[1,
Is there any R function to delete a CSV file saved in disk? For example here
I have created following R function :
asd <- function(a = 5) {
dat <- read.delim(file="F:/Test.csv", header=T, sep=",")
res <- dat[1,1]*a
# Here I want to delete "Test.csv"
return(res)
}
Here I am l
y, so
any insight and clarification is appreciated.
- Original Message
From: David Winsemius
To: Jason Rupert
Cc: R-help@r-project.org
Sent: Sat, November 28, 2009 9:23:23 AM
Subject: Re: [R] R function that duplicates Octave's poly function?
On Nov 28, 2009, at 9:33 AM, Ja
iated.
- Original Message
From: David Winsemius
To: Jason Rupert
Cc: R-help@r-project.org
Sent: Sat, November 28, 2009 9:23:23 AM
Subject: Re: [R] R function that duplicates Octave's poly function?
On Nov 28, 2009, at 9:33 AM, Jason Rupert wrote:
>
> By any chance is anyone aware of an
On Nov 28, 2009, at 9:33 AM, Jason Rupert wrote:
By any chance is anyone aware of an R function that duplicates
Octave's poly function?
Here is a description of Octave's poly function:
Function File: poly (A)
If A is a square N-by-N matrix, `poly (A)' is the row vector of
the coe
By any chance is anyone aware of an R function that duplicates Octave's poly
function?
Here is a description of Octave's poly function:
Function File: poly (A)
If A is a square N-by-N matrix, `poly (A)' is the row vector of
the coefficients of `det (z * eye (N) - a)', the characteri
?any
any(x==2)
Stefano
-Messaggio originale-
Da: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org]per conto di Dimitri Liakhovitski
Inviato: mercoledì 23 settembre 2009 17.38
A: R-Help List
Oggetto: [R] Function to check if a vector contains a given value?
Dear R'rs,
i
On Aug 19, 2009, at 7:04 AM, Rene wrote:
Dear All,
I need to write an R function which computes values of
Probabilities for
the (standard) normal distribution, ¦µ(z) for z > 0 by summing this
power
series. (We should accumulate terms until the sum doesn't change). I
also
need to make t
Dear All,
I need to write an R function which computes values of Probabilities for
the (standard) normal distribution, ¦µ(z) for z > 0 by summing this power
series. (We should accumulate terms until the sum doesn't change). I also
need to make the function work for vector of values z.
The initia
Martial Sankar writes:
> Hi,
>
> Is there a mean to automatically choose one version of the 'rbind' function ?
> By default, R chose the 'rbind' from {base}, i would lke to use the one from
> {IRanges}...
> Is it possible to set that using 'par' ?
Are you asking how to find help on IRanges::rb
Thanks,
> Date: Thu, 18 Jun 2009 11:21:29 +0200
> Subject: Re: [R] R function founRd in two packages !
> From: landronim...@gmail.com
> To: martial100...@hotmail.com
> CC: r-help@r-project.org
>
> On 6/18/09, Martial Sankar wrote:
> > Is there a mean to automati
On 6/18/09, Martial Sankar wrote:
> Is there a mean to automatically choose one version of the 'rbind' function
> ? By default, R chose the 'rbind' from {base}, i would lke to use the one
> from {IRanges}...
>
I am usually solving these issues with:
base::rbind() or IRanges::rbind().
Liviu
___
See
help("::")
help("attachNamespace")
and perhaps
help("search")
Allan.
On 18/06/09 09:39, Martial Sankar wrote:
> Hi,
>
> Is there a mean to automatically choose one version of the 'rbind' function ?
> By default, R chose the 'rbind' from {base}, i would lke to use the one from
> {IRanges}
Hi,
Is there a mean to automatically choose one version of the 'rbind' function ?
By default, R chose the 'rbind' from {base}, i would lke to use the one from
{IRanges}...
Is it possible to set that using 'par' ?
> ?rbind
Help on topic 'rbind' was found in the following packages:
Package
On Wed, Dec 17, 2008 at 02:09:57PM +0100, Philipp Pagel wrote:
> or maybe
>
> ggregate(foo$V1, by=list(foo$V1), FUN=length)
Oops- that was supposed to be 'aggegate'...
--
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihens
On Wed, Dec 17, 2008 at 03:36:44AM -0800, RON70 wrote:
>
> I have a dataframe with two columns :
>
> 11600 238'4
> 12000 218'0
[...]
> There are repeatations in 1st column and I want to use this as Level. Next I
> want to report for each level how many data points are there, with
> corresponding
I have a dataframe with two columns :
11600 238'4
12000 218'0
12200 209'0
12600 192'0
13000 176'4
14000 145'0
15000 119'0
16000 103'0
1800080'0
1900068'3
2 59'0
11600 208'1
12000 189'2
12200 180'3
There are repeatations in 1st column and I want to use this as
Thanks Ralph, Moshe and [EMAIL PROTECTED] for you helpful comments.
Using bootstrap (e.g., 'boot' + boot.ci()) for the confidence
interval on the variance is not very accurate in coverage, because
the sampling distribution is extremely skewed. In fact, the 'BCa'
method returns the same result
Hello Robert,
would it be an idea to construct CI's with bootstrap methods?
If yes, you can use package "boot", based on the book of Davison & Hinkley or
the package "bootstrap", based on the book of Efron &Tibshirani.
You can put the estimator inside for argument "theta".
Bests,
Ralph
Am Thurs
I need to construct confidence intervals for the binomial variance.
This is the usual estimate
v = x*(n-x)/n
or its unbiased counterpart
v' = x*(n-x)/(n-1)
where x = binomial number of successes observed in n Bernoulli trials
from proportion p.
The usual X^2 method for vari
Dear Steven,
Try this:
# Data set
yourdata=as.data.frame(cbind(lvl=LETTERS[1:2],x=rpois(10,10),y=rnorm(10) ))
# Splitting your data set
sdata=split(yourdata,yourdata$lvl)
res=lapply(sdata,function(X) max(dist(X[,-1])))
do.call(c,res)
HTH,
Jorge
On Wed, Aug 27, 2008 at 7:28 PM, Steven Mat
On Wednesday 27 August 2008, Steven Matthew Anderson wrote:
> Thank you Jorge,
>
> My talent in building functions is weak. I think I'm close but I'm
> not doing something right.
>
> res=dist(yourdata)
> res[which.max(res)]
> does provide me with the correct distance but how do I apply it across
>
Thank you Jorge,
My talent in building functions is weak. I think I'm close but I'm
not doing something right.
res=dist(yourdata)
res[which.max(res)]
does provide me with the correct distance but how do I apply it across
data with level such as ...
>
yourdata
=as.data.frame(cbind(lvl=LE
Steven Matthew Anderson mac.com> writes:
> I'm trying to figure out how to write a r function that will calculate
> the extreme spread of a group of points given their (x,y)
> coordinates. Extreme Spread is the maximal Euclidean distance between
> two points in a group
>
> ex.spread = max
I'm trying to figure out how to write a r function that will calculate
the extreme spread of a group of points given their (x,y)
coordinates. Extreme Spread is the maximal Euclidean distance between
two points in a group
ex.spread = max{ sqrt [ (xi-xj)^2 - (yi-yj)^2 ] } for i not equal to
This is what Rscript and R CMD BATCH are for.
Your problem is that you forgot to print the objects in your function:
auto-printing only occurs at the top level.
On Sun, 10 Aug 2008, Laura Poggio wrote:
Dear all,
I wrote a simple script in order to put together some functions and method
to be
Dear all,
I wrote a simple script in order to put together some functions and method
to be executed on various files
I am trying to have to possibility to call the script changing few
parameters in order to use the different files.
I succeeded partly using the function method.
However in my script
Dear R users,
I'm looking for a function to align multiple waveforms that contain
random phase shifts.
The "Woody Average" is one such method -- is there any comparable
function already coded for R?
Matlab code for this type of average exists
[http://www.mathworks.com/matlabcentral/fileexchange/lo
"
To: "lin tang"
Cc:
Sent: Monday, March 03, 2008 11:38 AM
Subject: Re: [R] R function to convert a number to text
> lin tang wrote:
>> hi, Dear R users -
>>
>> I wonder is there a written R function to convert a number to a
>> text, say convert 1 to
Alberto Monteiro wrote:
> ...
> Be careful, the function does not handle "empty" fields:
Okay, Alberto, you asked for it!
digits2text<-function(x,illion=0) {
units<-c("one","two","three","four","five",
"six","seven","eight","nine")
teens<-c("ten","eleven","twelve","thirteen","fourteen",
Try
RSiteSearch("numbers2words")
On Sun, Mar 2, 2008 at 9:05 PM, lin tang <[EMAIL PROTECTED]> wrote:
> hi, Dear R users -
>
> I wonder is there a written R function to convert a number to a text, say
> convert 1 to "one" , 100 to "one hundred". I know in xls. has such a
> function BAHTTEXT, d
Sent: Monday, March 03, 2008 11:38 AM
Subject: Re: [R] R function to convert a number to text
> lin tang wrote:
>> hi, Dear R users -
>>
>> I wonder is there a written R function to convert a number to a
>> text, say convert 1 to "one" , 100 to "one
Jim Lemon wrote:
>
> I got bored after the millions, but this should handle the smaller
> numbers, and you can always extend it.
>
> digits2text<-function(x,mult="") {
> units<-c("one","two","three","four","five",
>"six","seven","eight","nine")
> teens<-c("ten","eleven","twelve","thirtee
1 - 100 of 121 matches
Mail list logo