On 01/20/2012 11:28 PM, Roary wrote:
Hi All,
I have 3 variables which present a perfect linear dependency such that the
third is the sum of the first two. I have an ordinary 2D contour plot on a
square grid with the first two variables forming the axes and the third
naturally being the
On 01/21/2012 02:46 AM, Christof Kluß wrote:
Hi
I like to use axis.POSIXct to plot days from 2006 till 2008. But I
only have datas for the summer months. Is it possible to get two axis
breaks, to have not so long distances without points?
Hi Christof,
You might be able to do this with the
Dear Jim,
Your solution works very well. I am an R beginner, and I did not
realize that I could modify a function in a package.
Thank you very much.
Regards,
Peng
On Sat, Jan 21, 2012 at 11:01 AM, Jim Lemon j...@bitwrit.com.au wrote:
On 01/21/2012 01:08 AM, baydap wrote:
Hi. I have a
At 13:15 20/01/2012, Cadu wrote:
Hello,
I found in the forum two threads about point biserial correlation. One of
them (1) mentioned a point-biserial correlation is just a Pearson
correlation where one of the variables is dichotomous. Thus, the command
is just the normal cor function. The
I can put a legend on a plot with something like:
legend('bottom', leg.txt, horiz = TRUE, fill = colors)
But what if the arrays leg.txt and colors are too big? I would still like to
provide a legend but to save space I would like to just show small boxes
with the color filled in so it will
Dear Michael and Cadu,
Sorry -- I missed the original question.
The polycor package has functions for polyserial and polychoric correlations;
biserial and tetrachoric correlations are special cases for dichotomous
variables. The point biserial correlation is just the Pearson correlation
I installed 'spatial' and could not see that the package includes data to
map Alaska and Hawaii along with the associated counties .I saw in the demo
for the package 'sp' that county data was read in for the state of North
Carolina but I am unclear where the database containing this information
On Jan 20, 2012; 4:08pm baydap wrote:
In the embedded figure you can see the label correlation is too close
to the ticks. How can I move it and make
it larger?
I have hacked the function to do this and to return a table of relevant
statistics. You are welcome to it, but I don't have access
Hi all,
Error is coming as error in data.frame(, check.names = FALSE): arguments
has differents
counts of rows: 0, 18 for the following code.
Can you please help?
Thank you
Devarayalu
library(ggplot2)
setwd(D:\\General Check list)
library(RODBC)
conn - odbcConnectExcel (Book1.xls)
Many apologies, I missed that line in the help file. Thanks for all of the
help.
kindest regards,
Stephen Sefick
--
View this message in context:
http://r.789695.n4.nabble.com/4th-corner-analysis-ade4-what-do-the-colors-mean-tp4315476p4316205.html
Sent from the R help mailing list archive at
dear all,
I created a dll file from a fortran program. How I can recompile it in R? I
use dyn.load(F:/myprogram.dll) without any error but when I run
source(F:/myprogram.r) this error occurs:
Error in file(file, r, encoding = encoding) :
cannot open the connection
In addition: Warning
I would still be very happy for help. I read again the R-help for loess()
and found the subset argument. Might this be a solution?
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/Loess-smoothing-alpha-Parameter-tp4307000p4316266.html
Sent from the R help mailing list
On 01/21/2012 01:08 AM, baydap wrote:
Hi. I have a question about the taylor.diagram() in plotrix package. How can
I control the label correlation? In the embedded figure you can see the
label correlation is too close to the ticks. How can I move it and make it
larger?
Another problem is the
Thank you so much - now it works!
Tanks for your patience with me!
GeO
--
View this message in context:
http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4315743.html
Sent from the R help mailing list archive at Nabble.com.
__
Thanks for your responses Jason and Jim. The ternary plot is definitely the
right style with the triangle fill. However, one of the important features
(that perhaps I understated) is that X3 will have more categories than X1
and X2, therefore the triangular shape is not appropriate. If X1 has I
Dear all
I need to apply a normal, mean and quantile normalization to a data matrix.
Could you give me any suggestions?
Bests
--
View this message in context:
http://r.789695.n4.nabble.com/Normalization-in-R-tp4315911p4315911.html
Sent from the R help mailing list archive at Nabble.com.
I want to create a barplot but need to rotate the labels:
a - c(1,2,3,4) ; b - c(2,3,4,5); c - c(Loblolly Pine, Oak Hickory,
Sweetgum, Tulip Poplar)
d = rbind (a,b)
bar - barplot(d , beside=TRUE)
text(bar, par(usr)[3]-.0025,srt=45,adj=1,labels=c,xpd=TRUE)
I cannot figure out how to get
On 21.01.2012 14:07, jim_comis...@nps.gov wrote:
I want to create a barplot but need to rotate the labels:
a- c(1,2,3,4) ; b- c(2,3,4,5); c- c(Loblolly Pine, Oak Hickory,
Sweetgum, Tulip Poplar)
d = rbind (a,b)
bar- barplot(d , beside=TRUE)
text(bar,
Try something like this:
legend('bottom', leg.txt, horiz = TRUE, cex=.75)
A workable example is requested and would have been helpful.
- Original Message -
From: Kevin Burton rkevinbur...@charter.net
To: r-help@r-project.org
Cc:
Sent: Saturday, January 21, 2012 8:47:36 AM
Subject: [R]
On 21.01.2012 14:47, Kevin Burton wrote:
I can put a legend on a plot with something like:
legend('bottom', leg.txt, horiz = TRUE, fill = colors)
But what if the arrays leg.txt and colors are too big? I would still like to
provide a legend but to save space I would like to just show
Hi,
I would like to colorize certain panels in the pairs plot below with certain
colors. How can access the panel row and column in a pairs plot to achieve this?
Cheers,
Marius
## generate data
U - matrix(runif(4000), ncol=4)
## define panel function for colorizing the panels
mypanel -
You have a couple of major points of confusion that I'll address
briefly and then direct you to appropriate reference material.
I) R is not compiled. It is an interpreted language.
2) R and Fortran are not equivalent. Something that is good code in
one is not likely to be good code, or even
okay, I found something. Not very elegant, but it does the job:
## generate data
U - matrix(runif(4000), ncol=4)
## define panel function for colorizing the panels
cols - c(blue, black, black,
blue, black, black,
black, black, green,
black, black, green)
count - 0
data(AirPassengers) brings AirPassengers into the workspace. How can I
idenfity what the structure of AirPassengers is? Is it a data.frame, a table
etc. etc.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
On 21.01.2012 19:12, Ajay Askoolum wrote:
data(AirPassengers) brings AirPassengers into the workspace. How can I
idenfity what the structure of AirPassengers is? Is it a data.frame, a table
etc. etc.
1. read the help page!
?AirPassengers
2. Look at the structure by
str(AirPassengers)
str() is the most informative; class() may also be helpful.
data(AirPassengers)
class(AirPassengers)
[1] ts
str(AirPassengers)
Time-Series [1:144] from 1949 to 1961: 112 118 132 129 121 135 148
148 136 119 ...
For cases like this, with data included in R and documented,
?AirPassengers
is
Thank you.
class(AirPassengers) is what I was looking for i.e. a generic way of
identification.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
Just any plot but put say 100 items in the legend. If you include text with
each item it clearly will not fit on any plot. So one workable example would be
to add a legend with a 100 or more items to your plot of choice.
Thanks for the suggestion.
On Jan 21, 2012, at 10:14 AM, John Kane
ls() gives me the vector of objects in the workspace
class(objName) gives me the class of objName
class(ls()) just returns character as many times as there are objects.
How do I get a vector of all objects in the workspace?
[[alternative HTML version deleted]]
Here are two options:
sapply(.GlobalEnv, class)
ls.str()
Also, please follow the posting guide and post in plain text.
Cheers,
Josh
On Sat, Jan 21, 2012 at 11:44 AM, Ajay Askoolum aa2e...@yahoo.co.uk wrote:
ls() gives me the vector of objects in the workspace
class(objName) gives me the
Of course by entering 'blah' you just get a legend of one value. I guess I
would like to remove the text altogether and put the colored boxes (or circles)
right next to each other. This would form sort of a gradient. So say I needed a
legend for 100 colored values on the plot. The colors are
Hi,
I want to run t.test() for several variables among two groups, and I
would like to skip the tedious process of collecting information to
assemble a table, but I am not sure if the function I want already
exists. Any suggestion would be appreciated.
I have a working example, as required by
Dear list,
I have encountered a problem with the movie3d function in the rgl
library where the output movie (gif) or the individual frames (png)
are completely black. I have looked on the internet and found a thread
titled movie3d function in the rgl package posted to the R-help
mailing list in
Hi,
I want to display some contour labels. It works well, but the thickness of
the label is to low. I tried the labcex command
contour(x,y,z, labcex=2)
But only the size is rising and not the thickness of labels. Only if i set
the value to labcex=10 the thickness is good, but the size is to
I am trying to replace + in a string with another character
I am getting odd results using sub and gsub
X-one + two
gsub(+,plus,X)
[1] plusoplusnpluseplus plus+plus plustpluswplusoplus
sub(+,plus,X)
[1] plusone + two
X-one ~ two
it seems to work fine with other characters:
sub(~,plus,X)
I am trying to create a loop that will perform a series of analyses. I am
using geeglm from geepack, which fails if there are any null values.
Creating a subset solves this, but do not seem to be able to set the subset
dynamically based on a changing variable.
while (j = y.num) {
Two ways:
i) (If you are not using full regular expressions) Set the fixed = TRUE option.
ii) Escape it.
E.g.,
gsub(\\+, plus, X)
gsub(+, plus, X, fixed = TRUE)
Read up on ?regexp for an explanation of what's going on.
Michael
On Sat, Jan 21, 2012 at 2:46 PM, Nevil Amos nevil.a...@gmail.com
+ is a metacharacter, and must be escaped:
X - one + two
gsub(\\+, plus, X)
[1] one plus two
The help for gsub() tells you to read ?regexp - that's where
the details of regular expressions as implemented in R are
explained.
Sarah
On Sat, Jan 21, 2012 at 2:46 PM, Nevil Amos
On Fri, Jan 20, 2012 at 12:12 PM, cameron raymond...@invesco.com wrote:
Can anyone please help me with this?
I have a list of business dates. What I want is to have last day of last
month and paste them on next month.
What i have What i want
5725 2011-09-22
5726
On Sat, Jan 21, 2012 at 5:20 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Fri, Jan 20, 2012 at 12:12 PM, cameron raymond...@invesco.com wrote:
Can anyone please help me with this?
I have a list of business dates. What I want is to have last day of last
month and paste them on next
Hi dear all,
In my laptop(ubuntu 11.10 64bit), I maintained a released R (2.14) and a
developmental R, I can specify qplot(..., alpha = ) in R 2.14 , but when I
try to use transparency in developmental R, I got a warning message and the
plot is clearly not I want.
minimal example:
qplot(data =
On Jan 21, 2012, at 3:18 PM, pansophy wrote:
I am trying to create a loop that will perform a series of
analyses. I am
using geeglm from geepack, which fails if there are any null values.
Creating a subset solves this, but do not seem to be able to set the
subset
dynamically based on a
pansophy mjs2134 at columbia.edu writes:
I am trying to create a loop that will perform a series of analyses. I am
using geeglm from geepack, which fails if there are any null values.
Creating a subset solves this, but do not seem to be able to set the subset
dynamically based on a
pansophy mjs2134 at columbia.edu writes:
I am trying to create a loop that will perform a series of analyses. I am
using geeglm from geepack, which fails if there are any null values.
Creating a subset solves this, but do not seem to be able to set the subset
dynamically based on a
Hi,
I have a somewhat abstract and tricky problem (at least for me).
Perhaps someone here can help me:
I would like to convert:
x - c(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0)
into
x - c(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4)
every 1 in
Perhaps I misunderstand you, but ?cumsum.
x - c(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0)
y - c(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4)
identical(cumsum(x), y)
Michael
On Sat, Jan 21, 2012 at 6:59 PM, Martin Batholdy
batho...@googlemail.com
Try
cumsum(x)
HTH,
Jorge.-
On Sat, Jan 21, 2012 at 6:59 PM, Martin Batholdy wrote:
Hi,
I have a somewhat abstract and tricky problem (at least for me).
Perhaps someone here can help me:
I would like to convert:
x - c(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
Hi all,
As a part of work flow, I do a lot of experiments and save all my results
into rData file...
i.e. at the end of all my experiments, I do
save.image(experiment_name_with_series_number.rData)...
However, some times even with the rData files, I cannot remember the
context where these data
Create a function that you can pass the name of the R script to run
and the fileName you want applied to the output files. First copy the
R script to a file with the 'fileName.R' that as passed in, then
'source' the file to execute it. Change your script to also use the
'fileName' to create the
I don't want to save separate script files with merely parameter changes...
This is a 1-to-multiple mapping problem:
I have one script file, but varying parameters leads to multiple rData
files...
If I could save the script file content (with the correct parameter
combinations) into the same
Hi everybody,
I'm a beginner R user and I'm trying to use the package sapa to
estimate the spectral density function of several time series using
the SDF function. For each time series, I want to calculate the
density function at two temporal resolutions (daily and monthly). The
monthly values
For example:
# dataset
age-18:29
height-58:69
df.ex=data.frame(age=age,height=height)
df.ex[4,1]-NA
# dataset of columns that will be used for analysis
values-c(age, height)
df.variables=data.frame(values)
# Age column has a null (NA) value. The row must be removed for the
analysis to run
#
Sorry Ben. I haven't posted to these forums before and I didn't know what
kind of response I would get.
--
View this message in context:
http://r.789695.n4.nabble.com/Create-subset-using-variable-tp4316812p4317213.html
Sent from the R help mailing list archive at Nabble.com.
Here is another way:
date -
+
c(9/22/2011,9/23/2011,9/26/2011,9/27/2011,9/28/2011,9/29/2011,9/30/2011,10/17/2011,
+
10/18/2011,10/19/2011,10/20/2011,10/21/2011,10/24/2011,10/25/2011,10/26/2011,11/17/2011,11/18/2011,11/21/2011,11/22/2011,11/23/2011,11/25/2011,11/28/2011,11/29/2011,11/30/2011,
+
The what you can do is that the 'main' R script just setups up the
parameters and then calls functions (or sources in another R script).
What you will be doing by the process I described is saving just the
short R script that has all of your parameters. Does this solve your
problem?
As a second
On 12-01-20 10:05 AM, Alex van der Spek wrote:
First time ever that I try to call subroutines in a Win DLL using R.
Have done this before using VBA and Python.
The C code's function argument list contains only double pointers
(double *x). The function is declared void, the output value is one
On 12-01-21 1:02 PM, Manabu Sakamoto wrote:
Dear list,
I have encountered a problem with the movie3d function in the rgl
library where the output movie (gif) or the individual frames (png)
are completely black. I have looked on the internet and found a thread
titled movie3d function in the rgl
I didn't find any function for that and found easier write one. It is
not the most elegant solution, but in case anyone wants it:
ttable - function(formula, data, digits=2) {
vars = all.vars(formula)
nvars = length(vars)
nnumvars = nvars - 1
factorname = vars[nvars]
outp =
Hi all,
I have already some important variables in the current R session;
and I wanted to load some rData file which was saved during the last R
session using save.image...
But how do I avoid the newly loaded data/variables messing with my existing
data/variables?
In Matlab, I can do:
Read the help page for loadparticularly the part about environments.
E.g.,
a - 3
save(a, file = temp.RData)
a - 4
env - new.env()
load(temp.RData, env)
identical(a, 4)
identical(env$a, 3)
Michael
On Sat, Jan 21, 2012 at 9:54 PM, Michael comtech@gmail.com wrote:
Hi all,
I have
Hello,
This example seems strange to me:
if (2 3) print('Yes'); else print('No')
Error: unexpected 'else' in else
{if (2 3) print('Yes'); else print('No')}
Error: unexpected 'else' in {if (2 3) print('Yes'); else
{
+ if (2 3) print('no')
+ else print('yes')
+ }
[1] yes
Don't use the ';'
if (2 3) print('Yes'); else print('No')
Error: unexpected 'else' in else
No suitable frames for recover()
if (2 3) print('Yes') else print('No')
[1] No
'else' is part of the 'if'. The ';' implies the start of a new
statement. You do not need the ';' when writing R; you
It is well explained here
http://www.burns-stat.com/pages/Tutor/R_inferno.pdf page 67.
On Sat, Jan 21, 2012 at 9:56 PM, Ery Arias-Castro earia...@ucsd.edu wrote:
Hello,
This example seems strange to me:
if (2 3) print('Yes'); else print('No')
Error: unexpected 'else' in else
{if (2
You said:
Lets say I changed the parameters x to 0.123, y to -0.456, z to -999.99
Then I have to save the R script file as
Experiment_001_x=0.123_y=-0.456_z=-999.99.r
and the result file as Experiment_001_x=0.123_y=-0.456_z=-999.99.rData
I suggest you create instead a Experiment.r file that
thx but then how do I save a snapshot of all the variables at the end of
the function? We need the entire snapshot in case not to forget important
items...
Also when I say varying parameters, in fact certain code of the program can
vary too in addition to the parameters.
Any more thoughts?
I
I think you need to restate the problem that you are trying to solve.
You originally said it was just some parameters, but now you say
'code' is being changed. Also now you indicate that you want the
formating to be saved. This would indicate that you want to save the
entire R script, not just
On 01/21/2012 09:38 PM, Roary wrote:
Thanks for your responses Jason and Jim. The ternary plot is definitely the
right style with the triangle fill. However, one of the important features
(that perhaps I understated) is that X3 will have more categories than X1
and X2, therefore the triangular
On 01/22/2012 06:56 AM, Kevin Burton wrote:
Of course by entering 'blah' you just get a legend of one value. I guess I
would like to remove the text altogether and put the colored boxes (or circles)
right next to each other. This would form sort of a gradient. So say I needed a
legend for 100
On 21/01/2012 22:39, Tengfei Yin wrote:
Hi dear all,
In my laptop(ubuntu 11.10 64bit), I maintained a released R (2.14) and a
developmental R, I can specify qplot(..., alpha = ) in R 2.14 , but when I
try to use transparency in developmental R, I got a warning message and the
plot is clearly
69 matches
Mail list logo