Good morning/afternoon/evening,
Using R, I am trying to calculate stream function (psi) and velocity potential
(phi) from both 2D zonal (u) and meridional wind (v).
I Stream function
The stream function can be obtained from the vorticity (vorticity):
vorticity = curl(u,v)
or in other terms:
Related comment:
"Even the data aren't sufficient." -- Brian Joiner (some years ago).
Explanation: See W.E. Deming on "analytic" vs "enumerative" statistics.
--- Bert
On Thu, Jun 7, 2012 at 8:06 PM, R. Michael Weylandt
wrote:
> Short answer: no, those are (in general) insufficient parameters t
Hi Dan and Rui, Thank you for the suggestions, both were very helpful.
Rui's code was quite fast...there is one more thing I want to explore for my
own edification, but first I need some help fixing the code below, which is
a slight modification to Dan's suggestion. It'll no doubt be tough to be
Short answer: no, those are (in general) insufficient parameters to
characterize a distribution.
Long answer: unfortunately, it's not uncommon that those "summary
statistics" are the only ones reported based on someone or other's
limited experience with the Gaussian. There are a few things you cou
Thanks Paul. That worked beautifully.
V
On Thu, Jun 7, 2012 at 7:46 PM, Paul Murrell wrote:
> Hi
>
>
> On 8/06/2012 12:27 p.m., Vikram Chhatre wrote:
>>
>> Hello,
>>
>> I need to change the font for one of the items (C. elegans) in my
>> legend to italic. Can someone suggest how to accomplis
Hello,
I need to change the font for one of the items (C. elegans) in my
legend to italic. Can someone suggest how to accomplish this?
legend('bottomright', bty='n', c('C. elegans range', 'Study area'),
cex=0.8, fill=c('light gray', 'white'), border=c('black','black'))
I tried using lab.font=c(
Hi,
okay, and which algorithm is it? I had a closer look at the manual and could
not find it, but there is quite a number of methods in there, maybe I missed
it.
Thanks,
Martin
--
View this message in context:
http://r.789695.n4.nabble.com/cluster-algorithm-with-fixed-cluster-size-tp4632523p463
Hi Francesco,
No, I haven't tried...
But if you have some code I can try.
Regards,
Carlos Ortega
www.qualityexcellence.es
2012/6/7 Francesco Nutini
> Oh thank you Carlos!
> I wasted a lot of time formatting my xyplot by powerpoint.
> Did you used a similar tips for ternaryplot (vcd)?
>
>
Hello,
I have a binary matrix of 80k sets (sets comprising of combination of
cities) by 885 cities
(dimension = 80k x 885). For matrix, 1 means city is a part of the set and
0 means the city is not part of the set.
Sets are rows and cities are columns (city.test).
I want to do feature reduction
Hi, I need some help to figure out the df I should use in t test for
my contrast.
I have 5 treatments and 5 phenotypes, I would like to compute the
difference of treatment means for each phenotype and do t test, such
as treatment1 vs treatment2 on phenotype1
How should I calculate the pooled degree
Hi, I need some help to figure out the df I should use in t test for
my contrast.
I have 5 treatments and 5 phenotypes, I would like to compute the
difference of treatment means for each phenotype and do t test, such
as treatment1 vs treatment2 on phenotype1
How should I calculate the pooled degree
Hello,
Any idea why trying to obtain System.out in rJava does not work?
> library(rJava)
> .jinit()
> s <- .jnew("java/lang/String", "Hello World!")
> .jcall(s,"I","length")
[1] 12
> systemOut <- .jfield("java/lang/System", "Ljava/io/PrintStream", "out")
Error in .jfield("java/lang/System"
Dear All,
I often have to work with certain models in which I try to "reproduce" a
distribution the best I can with very little known information avaible. Is
there a package or function in R that could best reproduce a probability
distribution using only the mean, median and SD values availble
I was wondering if somebody could explain why I get different results here:
>treats[,2]<-as.factor(treats[,2])
>treats[,5]<-as.factor(treats[,5])
>treats[,4]<-as.factor(treats[,4])
#there are 'c' on more days than I have 'h2o2', where treats[,4] is the day. I
only want 'c' that correspond to the
Dear list,
I'm trying to use R2wd package. I've installed the package and try wdGet().
However a error message came up. I'm presently using R 2.15.0
> wdGet()
Error in if (wdapp[["Documents"]][["Count"]] == 0)
wdapp[["Documents"]]$Add() :
argument is of length zero
Does anyone knows what this
Thank you for helping me to solve this question!
--
View this message in context:
http://r.789695.n4.nabble.com/Error-in-installing-packages-tp4632543p4632736.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
Optim() by default is using Nelder-Mead which is an extremely poor way to
do linear programming, despite the fact that ?optim says that: "It will work
reasonably well for
non-differentiable functions."I didn't check your coding of the objective
function fully, but at the
very least you sho
Hello Everyone,
I'm currently learning about quantile regressions. I've been using an
optimizer to compare with the rq() command for quantile regression.
When I run the code, the results show that my coefficients are consistent
with rq(), but the intercept term can vary by a lot.
I don't thi
Hello,
I've just read your follow-up question on regular expressions, and I
believe this, your original problem, can be made much faster. Just use
readLine() differently, reading large amounts of text lines at a time.
For this to work you will still need to know the total number of lines
in t
Wow, even those of us who have been using S for more than 25 years
(and R since well before version 1.0) still have things to learn since
R keeps improving. So I stand corrected (well sit actually) on the
part about not keeping track of this sort of thing.
On Thu, Jun 7, 2012 at 3:04 AM, Duncan M
Dear Rui,
Thank you so much. Yes, that function is what I wanted.
I will make sure I post a data example for the next time.
Thank you for your help again.
Bests,
Seungyeul
On Jun 7, 2012, at 12:50 PM, Rui Barradas wrote:
> Hello,
>
> You should post a data example, like the posting guide sa
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of emorway
> Sent: Thursday, June 07, 2012 10:41 AM
> To: r-help@r-project.org
> Subject: [R] extracting values from txt with regular expression
>
> Thanks for your suggestions. Be
Thanks for your suggestions. Bert, in your response you raised my awareness
to "regular expressions". Are regular expressions the same across various
languages? Consider the following line of text:
txt_line<-" PERCENT DISCREPANCY = 0.01 PERCENT DISCREPANCY =
-0.05"
It s
I think the problem is with fonts and encodings. The pdf device is
using a different font and/or encoding than the screen device and so
the non-ascii characters are looking different. If you can convince
the pdf driver to use the same font and encoding then the
symbols/characters in the plot shou
Hello,
You should post a data example, like the posting guide says. If your
dataset is large, use something like
dput(head(dat, 20)) # paste the output of this in your post.
where 'dat' is your dataset.
Now, try
# make up some data
set.seed(12)
dat <- matrix(c(sort(rnorm(10)), sample(let
On 2012-06-06 12:45, dougmcintosh wrote:
Haha no, TextWrangler.
And that was definitely it...I think what was happening is that when I
opened the text version of the book it opened in Notepad, which was
probably opened the txt file in RTF. Then I copied and pasted the function
code into TextWran
Thanks for the fast response. I am not sure how to enter the proxy info in
the call.
I am working via EZProxy (which I think, rewrites a URL). According to their
website it does this:
1. Within the config.txt/ezproxy.cfg file, various hosts are identified that
require access from a local IP add
Hi all,
I have a matrix with 1 rows and 10 columns. The last columns contains
another identifiers but the values are not uniques so that I want to generate
another matrix with rows with unique values in the last column.
If I did
tmp<-unique(my_mat$col10)
this will give me 8560 unique ent
On Jun 7, 2012, at 11:34 AM, maxbre wrote:
a new session of R with the following sessionInfo()
Part of the confusion may be that you have reversed the colors for
mean and median in two different examples. The other confusion may be
that mean(log(.)) != log(mean(.))
this is the code
Apologies for following up on my own mail, but I forgot
to explicitly mention that you will need to specify the
appropriate proxy information in the call to getURLContent().
D.
On 6/7/12 8:31 AM, Duncan Temple Lang wrote:
> To just enable cookies and their management, use the cookiefile
> optio
a new session of R with the following sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252
[3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Italy.1252
Hi. Yes it is possible.
Here is one approach:
DF <- read.table(textConnection("
Unit DayHour Price Flag
afd11/2/20031 1 N
afd11/2/20031 2 N
afd11/2/20031 3 N
afd11/2/20031 4 Y
dcf11/2/2003
To just enable cookies and their management, use the cookiefile
option, e.g.
txt = getURLContent(url, cookiefile = "")
Then you can pass this to readHTMLTable(), best done as
content = readHTMLTable(htmlParse(txt, asText = TRUE))
The function readHTMLTable() doesn't use RCurl and doesn't
In two steps, you could use ave() to split by hour and find the
maximum of price and then use an ifelse clause on the resulting vector
to see when that actually equals the given price and assign "Y"/"N"
appropriately,
I'll leave the implementation as an exercise to the reader :-)
Best,
Michael
O
Thanks for the suggestions!
Unfortunately I get same trap whether I input the data as a named
list, list of the names, or text file. I tried the three with and
without transposing the matrices (I didn't change the model structure
indexing but this should appear as an indexing error later on).
Goo
On Wed, 6 Jun 2012, Prof Brian Ripley wrote:
On 06/06/2012 16:13, niandra wrote:
Hi all,
I have a problem with the library R2BayesX, when i try to use the command
bayesx i get this error:
dyld: Library not loaded: /usr/local/lib/libreadline.5.2.dylib
Referenced from:
/Library/Frameworks/R.f
Hi,
I am trying to access a website and read its content. The website is a
restricted access website that I access through a proxy server (which
therefore requires me to enable cookies). I have problems in allowing Rcurl
to receive and send cookies.
The following lines give me:
library(RCurl)
l
Hi,
Here is the corrected code:
library(ggplot2)
ids <- paste('id_',1:3,sep='')
before <- sample(9)
after <- sample(1:10,9)
dat <- as.matrix(cbind(before,after))
rownames(dat) <- rep(ids,3)
position <- c(rep(10,3),rep(13,3),rep(19,3))
mdat <- cbind(melt(dat),position)
colnames(mdat) <- c('ID','T
Thanks a lot! Takes some fiddling, but it works great.
Regards, Patrick
2012/6/7 Rmh
> please look at the likert function in the HH package. It is designed for
> this type of study.
>
> ?likert has many examples similar to yours.
>
>
> Rich
>
>
[[alternative HTML version deleted]]
__
For a given hour I want to be able to add a new column called flag. The
flag column will flag the highest price in a given hour. Is there a way to
do this without a loop?
matrix:
Unit, Day,Hour, Price, Flag
afd11/2/20031 1 N
afd11/2/20031 2
Well, a brute force and stupidity approach with geom_text will work but it's
not aesthetically very nice. Note I did not play around with text size.
Try :
ggplot(mdat, aes(position, value)) + geom_point(aes(colour = Treatment)) +
geom_rug(subset = .(position < 14),aes(y=NUL
Could anyone please tell me what is the most elegant
way to divide an ordinal variable in equal groups? (as
cut() does with continous variables)
for example I'd like to have the factor "educational level"
in three groups "low" "medium" and "high"
Thank you!
David
[[alternative HTML versi
On Jun 7, 2012, at 10:23 AM, maxbre wrote:
thanks kimmo
I managed to get the desired result by first plotting the medians
and then
adding the means through the user defind function posted in thread you
mentioned (here it is
http://r.789695.n4.nabble.com/Adding-mean-line-to-a-lattice-density
thanks kimmo
I managed to get the desired result by first plotting the medians and then
adding the means through the user defind function posted in thread you
mentioned (here it is
http://r.789695.n4.nabble.com/Adding-mean-line-to-a-lattice-density-plot-td4455770.html#a4456502)
# start
dotplot(v
Perfect, thank you!
From: Petr Savicky
To: r-help@r-project.org
Sent: Thursday, 7 June 2012, 19:42
Subject: Re: [R] table function in a matrix
On Wed, Jun 06, 2012 at 11:02:46PM -0700, Sarah Auburn wrote:
> Hi,
> I am trying to get a summary of the counts of
On Jun 7, 2012, at 7:30 AM, Mohan Radhakrishnan wrote:
Hi,
I am again asking a generic question and the general
response for such questions is cold. I am a beginner but use and
write simple R scripts.
Have you read the Posting Guide?
"If the question is well-asked and of interes
I think we need some data and code. Would you please provide some sample data
(see ?dput for a handy way to provide data) and some working code that
demonstrates the problem?
John Kane
Kingston ON Canada
> -Original Message-
> From: leray.guilla...@gmail.com
> Sent: Thu, 7 Jun 2012 11:
On Jun 7, 2012, at 12:52 , Nouedoui Laetitia wrote:
> Hi Everyone,
>
> This is my first message on this discussion list.
> I create a R function which includes a .C function. I didn't get any error
> neither from "C side", nor from "R side". I tried to put proper type in R.
>
> But the problem
please look at the likert function in the HH package. It is designed for this
type of study.
?likert has many examples similar to yours.
Rich
Sent from my iPhone
On Jun 7, 2012, at 8:42, Patrick Hubers wrote:
> Hi,
>
> I'm trying to create a stacked bar plot with the satisfaction scores f
Hi!
I recently posted a similar question (entitled "Adding mean line to a
lattice density plot"). Have not got any usable solution forcing my to
fall back to the use of the normal 'plot' function. The problem was the
same as yours: using panel.abline simply did not work, the position of
the m
Hi,
I'm trying to create a stacked bar plot with the satisfaction scores from a
customer satisfaction survey. I have results for three stores over several
weeks and want to create a weekly graph with a stacked bar for each store.
I can flatten the dataframe into a table with absolute frequencies,
On 6/7/2012 2:27 AM, Rui Barradas wrote:
Hello,
To my great surprise, on my system, Windows 7, R 15.0, 32 bits, an R
version is faster!
I was also surprised, Windows 7, R 2.15.0, 64-bit
> rbind(diag=t1, Rdiag=t2, ratio=t1/t2)
user.self sys.self elapsed user.child sys.child
diag
Hi Everyone,
This is my first message on this discussion list.
I create a R function which includes a .C function. I didn't get any
error neither from "C side", nor from "R side". I tried to put proper
type in R.
But the problem is that I get an abrupt closure of R, with the following
messa
Hello,
I am working with logistic analysis in which event rate is 0.005% with large
requirds.
Is there is any R package which handle rare event in logistic regression.
Please let me know?
Thanks for your help.
Thanks,
Bharat
-
Bharat Warule
Cypress Analytica ,
Pune
--
View this messag
...and what if I need to plot another vertical line for showing also the
means for each panel?
by simply adding another call to panel.abline () seems not producing a
correct result for each panel
# medians and means for each panel:
dotplot(variety ~ yield | site, data = barley,
scales=list(
Apology. The formulas are munged.
I am referring to 'APPENDIX: Confidence Intervals' in the paper at
http://www.cse.iitb.ac.in/~puru/courses/spring12/cs695/downloads/cuttingcorners.pdf
Mohan
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Hi,
I am again asking a generic question and the general response for such
questions is cold. I am a beginner but use and write simple R scripts.
I am looking for some ideas to calculate the confidence intervals
based on this excerpt from the paper. Moreover it would help i
Em 07-06-2012 11:26, Prof Brian Ripley escreveu:
On 07/06/2012 10:27, Rui Barradas wrote:
Hello,
To my great surprise, on my system, Windows 7, R 15.0, 32 bits, an R
version is faster!
Faster than what? diag() is written entirely in R, just more general
than yours and so one would expect it
Oh thank you Carlos!I wasted a lot of time formatting my xyplot by
powerpoint.Did you used a similar tips for ternaryplot (vcd)?
Many thanks.Regards,Francesco
Date: Wed, 6 Jun 2012 17:08:39 +0200
Subject: Re: [R] [r] par and complex graph
From: c...@qualityexcellence.es
To: nutini.france..
On 07/06/2012 10:27, Rui Barradas wrote:
Hello,
To my great surprise, on my system, Windows 7, R 15.0, 32 bits, an R
version is faster!
Faster than what? diag() is written entirely in R, just more general
than yours and so one would expect it to be slower.
I have to say that we don't see a
On 07.06.2012 00:09, Martin Morgan wrote:
On 06/06/2012 01:41 PM, Andreia Leite wrote:
Yes it's windows (vista). It's not a specific package. I've tried more
than
a CRAN mirror and the message it's always date (the list with the
packages
simply doesn't appear).
What proxy settings should I ver
On Wed, Jun 06, 2012 at 11:02:46PM -0700, Sarah Auburn wrote:
> Hi,
> I am trying to get a summary of the counts of different variables for each
> sample in a matrix of the form "m" below to generate an output as shown.
> (Ultimately I want to generate a stacked barchart for each sample). I am on
Hi,
I am actually working on some auto-routine to import XML file, run some
analysis on them and create graph as jpeg. The files are in different
language french/english/danish even chinese. At the moment I'm focusing on
the European language. I import them using the XML package and specify
encodi
Hello,
To my great surprise, on my system, Windows 7, R 15.0, 32 bits, an R
version is faster!
Rdiag <- function(n){
m <- matrix(0, nrow=n, ncol=n)
m[matrix(rep(seq_len(n), 2), ncol=2)] <- 1
m
}
Rdiag(4)
n <- 5e3
t1 <- system.time(d1 <- diag(n))
t2 <- system.time(d2
Hi,
Please see the discussion at
http://r.789695.n4.nabble.com/regression-methods-for-rare-events-td4632332.html
Ozgur
--
View this message in context:
http://r.789695.n4.nabble.com/Rare-event-in-logistic-regression-tp4632656p4632658.html
Sent from the R help mailing list archive at Nabble.com
On 12-06-05 4:58 PM, Michael wrote:
Hi all,
How do I obtain the current active path of a function that's being called?
That's to say, I have several source files and they all contain definition
of function A.
I would like to figure out which function A and from which file is the one
that's bei
Hi
I am analysing a data set of daily S&P 500 Index returns and my goal is to
elaborate a relationship with a sentiment indicator (daily data).
For this purpose I fitted a model to each variable. I found that a GARCH
(1,1) suits best for the differenced closing price of the SPX and a GARCH
(2,2)
Hello, I am trying to build a large size identity matrix using diag(). The
size is around 23000 and I've tried diag(23000), that took a long time.
Since I have to use this operation several times in my program, the running
time is too long to be tolerable. Are there any alternative for diag(N)?
Tha
Hi,
I followed the link u provided but getting some error.
R -e "Sweave('MyReport.Rnw')" --args PatientId=1
i am keeping commandArgs(TRUE) in my Rnw file. print(PatientId) // Error:
chunk 2 Error in print(PatientId) : object 'PatientId' not found Execution
halted
Any working example will help
Hi,
I am trying to get a summary of the counts of different variables for each
sample in a matrix of the form "m" below to generate an output as shown.
(Ultimately I want to generate a stacked barchart for each sample). I am only
able to get the "table" function to work on one sample (column) at
Hi,
I believe that first learning the appropriate statistical methods to detect
the outliers and searching for the related functions in R is a better way.
Ozgur
--
View this message in context:
http://r.789695.n4.nabble.com/detecting-outliers-tp4632636p4632637.html
Sent from the R help mailing
Hi,
Try this,> dat1 <- data.frame(x=rep(1,6),y=rep(1:3,2), fac=sample(L3, 6,
replace=TRUE))
> dat1
x y fac
1 1 1 C
2 1 2 B
3 1 3 B
4 1 1 A
5 1 2 B
6 1 3 B
> dat1[dat1$x==1&dat1$y==1,1:2]<-NA
> dat1
x y fac
1 NA NA C
2 1 2 B
3 1 3 B
4 NA NA A
5 1 2 B
6 1 3 B
Hi all,
It is our pleasure to announce that the new version 1.8-2 of TraMineR
has been released on the CRAN.
Alongside the fixes of a series of small bugs and some speed
improvements, the main changes are:
- a new information display when creating state sequence object
which permits
On 06/07/2012 08:08 AM, Faz Jones wrote:
Hi,
I have attached a word document to explain the problem i am having
creating a for-loop in R with conditions to create a frequency table.
I am new to R so any help would be greatly appreciated.
Hi Jones,
Unfortunately, you might as well have attached
Bill Venables talks R :: Augsburg University, Germany :: 2-3 July 2012
Bill Venables will give a two-day R Workshop in Augsburg on the 2nd and 3rd
July 2012, an expanded version of the course, which he has been invited to give
at this year's useR! meeting in Nashville.
Details: www.math.uni-aug
Hello,
Had you looked more, and you would have seen R-help discussions on what
is an outlier. Almost unanimously, an ill defined concept.
In your problem, predators don't eat all eggs that they are given except
for one case, 38 were given and all 38 were eaten. You can detect this
in R with
On Jun 7, 2012, at 09:25 , Rui Barradas wrote:
> Hello,
>
> Try option stringsAsFactors, see ?read.csv or ?read.table
> As for the thousands separator, see ?format
help(as.Date) should also help. (Hint: there's no dateFormat= argument)
>
> Hope this helps,
>
> Rui Barradas
>
> Em 07-06-2012
Hello,
Try option stringsAsFactors, see ?read.csv or ?read.table
As for the thousands separator, see ?format
Hope this helps,
Rui Barradas
Em 07-06-2012 03:09, eric escreveu:
How do I fix this error ? I tried coercion to a vector but that didn't work.
msci <-read.csv("..MSCIexUS.csv", header
Joachim Audenaert pcsierteelt.be> writes:
>
> Hello all,
>
> I am estimating parameters for regression functions on experimental data.
> Functional response of Rogers type II.
>
> I would like to know which points of my dataset are outliers. What is the
> best method to do this with R?
Th
thanks ilai
sorry, I mixed up a little: I was thinking to medians of each panel but
instead I was trying to plot medians for each variety (what an awful chart,
indeed!)
thanks for your solution (medians for each panel), it works perfectly, as
usual...
cheers
max
--
View this message in context
On 6/6/2012 3:50 PM, mhimanshu wrote:
Hello Thomas,
This code seems to be fine and its now working well.
I read the about the FME package, but I have one doubt, as in the data set
given in the paper, it showing a nice kinetics of the viral growth, so my
question is what if there is a sudden inc
On Jun 7, 2012, at 07:28 , Bert Gunter wrote:
> Actually, recycling makes the rep(NA,2) business unnecessary. Simply:
>
> dat1[dat1$x==1 & dat1$y==1,1:2] <- rep(NA,2)
>
> ##or
>
> with(dat1,{dat1[x==1 & y==1,1:2] <- NA;dat1})
>
> will do it.
>
Or, use the assignment form of is.na:
cond <-
82 matches
Mail list logo