Francis Smart fsmart at gmail.com writes:
Is there a wildcard value for vector values in r?
For instance:
M - *wildcard
(M==1)
TRUE
(M==peanut butter)
TRUE
is.na(M)
FALSE
If grep on a vector does not help, maybe the following comes closer?
Finding all variables
you can use source() to Read R Code from a File.
2009/4/1 minben minb...@gmail.com:
Suppose I have written a R program and saved it in test.R . How can I
call the program in the command line?
__
R-help@r-project.org mailing list
Hi all,
I am working in a project which needed to load *.csv files of size more than
200MB
is it posible to load 200MB size file to r-project and do subsetting as per
requirement
i am able to load maximum of 90 mb
is there any way to increase memory limits and how much maximum memory we
can exten
I would be truly amazed if the answer were yes.
I find this the most fascinating question on R-help
for a long time, maybe ever. Can you tell us what
you have in mind and what your ultimate purpose is?
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of
Stavros Macrakis wrote:
On Tue, Mar 31, 2009 at 3:41 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Stavros Macrakis wrote:
...All that being said, programming with global variables makes certain
classes of bug much more likely
... in a language
I'd like to do a lineplot with type=b (both lines and points), opposed
to type=o (points overplotted on lines). I'd like the legend to match
the line, with the point character plotted distinctly from the line, but
I can't figure out from the manual
(
SK == Stephan Kolassa stephan.kola...@gmx.de
on Tue, 31 Mar 2009 22:20:50 +0200 writes:
SK Hi David,
SK David Winsemius schrieb:
The splinefun documentation indicates that natural is one of the types
of cubic spline options available.
SK That sounds good, didn't know
minben minbenh at gmail.com writes:
Suppose I have written a R program and saved it in test.R . How can I
call the program in the command line?
Assuming Windows (might work under linux)
rterm --vanilla --no-save myrfile.r
Dieter
__
r == ronggui ronggui.hu...@gmail.com
on Wed, 1 Apr 2009 16:00:16 +0800 writes:
r you can use source() to Read R Code from a File.
yes, but that's not in the command line.
Slightly more closely to the OP's question:
R CMD BATCH test.R
or
Rscript test.R
(orr test.R
eariasca eariasca at math.ucsd.edu writes:
Is there a way to generate EPS figures automatically out of a chunk
of code? Basically, I would like to do something like Sweave does (I
just find it a little cumbersome to create a .Rnw file and then keep
track of the figure numbering).
I
Dear Duncan Murdoch:
Thanks for your tips. By the way, I think I didn't mentioned my question
very clear. What I mean to say is that, in Excel one could decide upon the
axis interval unit. Please see the attached file. Likewise, is it possible
in R...?
Regards,
Prasanth.
-Original
Hi,
Since you insist, here is something that I think matches the
specifications :
wildcard - function( ) structure( NULL, class = wildcard )
Ops.wildcard - function (e1, e2){
if (nargs() == 1L)
return( e1 )
result - switch(.Generic,
`` = , `` = , `==` = ,
`=` = ,
Patrick Burns wrote:
I would be truly amazed if the answer were yes.
I find this the most fascinating question on R-help
for a long time, maybe ever. Can you tell us what
you have in mind and what your ultimate purpose is?
this seems a request for a 'match all' value, somewhat the inverse
V Prasanth wrote:
Dear R Users:
Greetings!
Is there any way to specify the axis interval unit for barplots in R.? Any
help is deeply appreciated.
Hi Prasanth,
If I understand your question, you might want to look at the barp
function in the plotrix package that automatically
Sure thing. I realize that it is an unusual request and not the type
of thing that I have seen used in any other language that I know of.
So right now I am using some of the statistical functions of R to get
some summary statistics and visual output from this historic data set.
I have a lot
Rolf Turner wrote:
I get to the video screen OK --- there's a large greenish sideways
triangle waiting to be clicked on. I do so; there's a message that
says it's downloading, with a little progress bar. That seems to
complete quite rapidly. Then nothing for a while. Then an error
message
Fit an ARIMA(0,2,2) model - it's the same thing and you'll get the MLE of
the smoothing parameter for free.
Use logs if you want a multiplicative model.
Gerard
Stephan Kolassa
Hi all,
Driven by the success of R, a number of local R users groups have been
formed in several places (London, NY, etc.). We are also currently
considering setting up our own local group in Spain.
We have found that setting up a web page in order to centralise the
information relevant to the
On 01-Apr-09 09:37:49, Gad Abraham wrote:
Rolf Turner wrote:
I get to the video screen OK --- there's a large greenish sideways
triangle waiting to be clicked on. I do so; there's a message that
says it's downloading, with a little progress bar. That seems to
complete quite rapidly. Then
A SAS spokesperson has confirmed to this blog that they have invested
in the R –Core project to help build next generation algorithms .
Details are sketchy but indications of some shift on cloud hosted SAS
,called SaaS are emerging.Also includes some details on Jim Davis ,SVP
SAS marketing's
Francis Smart wrote:
Sure thing. I realize that it is an unusual request and not the type
of thing that I have seen used in any other language that I know of.
So right now I am using some of the statistical functions of R to get
some summary statistics and visual output from this historic
On Tuesday 31 March 2009 21:02:23 dfermin wrote:
Hello.
I've got a new workstation running Fedora 10 linux and I use the KDE 4.2
desktop which uses some kind of new desktop environment called 'plasma'.
If I start up R and generate a plot (for example: hist(rnorm(1, mean=0,
sd=1),
Hello Thomas,
I had been using both survival design packages. I have just tested
both packages and can report that the error only appears after
loading Design. If I just run survival there is no error.
regards
Bob
At 06:08 PM 1/04/2009, Thomas Lumley wrote:
On Wed, 1 Apr 2009, Bob Green
On Tue, 2009-03-31 at 18:36 -0700, dfermin wrote:
Nope. I checked this. Both those fonts are installed.
Well it is some kind of font rendering problem. The default device is
the Cairo X11 device, which uses the Pango layout engine for font
rendering.
If you set the environment variable
A SAS spokesperson has confirmed to this blog that they have invested
in the R âCore project to help build next generation algorithms .
Details are sketchy but indications of some shift on cloud hosted SAS
,called SaaS are emerging.Also includes some details on Jim Davis ,SVP
SAS marketing's
And a happy April Fools day to you to...
On Wed, Apr 1, 2009 at 5:44 AM, Ajay ohri ohri2...@gmail.com wrote:
A SAS spokesperson has confirmed to this blog that they have invested
in the R –Core project to help build next generation algorithms .
Details are sketchy but indications of some shift
If Month is nested within Quadrat I think you want:
aov(ProportioninTreatment ~ Treatment*Month +Error(Quadrat/Month), RM)
If Treatment is also nested within Quadrat, you want:
aov(ProportioninTreatment ~ Treatment*Month
+Error(Quadrat/(Treatment*Month)), RM)
On Wed, Apr 1, 2009 at 12:42 AM,
Not in signal, indeed, but there are functions dct() and dst() in
package dtt.
Uwe Ligges
Red Roo wrote:
Looking for the DCT function, but don't see it in the signal pkg.
http://rss.acs.unt.edu/Rdoc/library/signal/html/signal.package.html
It is certainly possible since I loaded a 825 MB csv file yesterday
that had 1,5 milion lines, but the answer about how might very
system specific. Please re-read the Posting Guide and offer the
requested information and any error reports. You could try to do a bit
os self-education:
Hm, it seems I possibly used the technical term nested
inappropriately in my response. I meant:
If Month is a repeated measure within each Quadrat...
and
If Treatment is also a repeated measure within each Quadrat...
On Wed, Apr 1, 2009 at 8:21 AM, Mike Lawrence mike.lawre...@dal.ca wrote:
If
Dear friends of lme,
After so many year with lme, I feel ashamed that I cannot get this to work.
Maybe it's a syntax problem, but possibly a lack of understanding.
We have growth curves of new dental bone that can well be modeled by a
linear growth curve, for two different treatments and several
Just curious - Is R.matlab_1.2.4.tgz still the best library for loading *.mat
files?
Want to start using R to process some *.mat files.
Thanks again for any feedback and insight provided.
Jason
__
R-help@r-project.org mailing list
Dear Dieter,
With t*treat the model allows for a different slope AND a different
intercept for each treatment. If you only want different slopes and all
intercepts equal to 0, then t:treat - 1 or t + t:treat - 1 is the model
you are looking for.
HTH,
Thierry
Hi Dieter,
the following model assumes a linear relationship between the response
newbone and the
independent variable t with a common intercept equal to 0 and
treatment-dependent slopes:
grd.lme0 - lme(newbone~t:treat-1, data=grd, random=~1|subject)
summary(grd.lme0)
Christian
ONKELINX, Thierry Thierry.ONKELINX at inbo.be writes:
With t*treat the model allows for a different slope AND a different
intercept for each treatment. If you only want different slopes and all
intercepts equal to 0, then t:treat - 1 or t + t:treat - 1 is the model
you are looking for.
I have a small matrix where the columns represents a ranking and the values
are the number of times each ranking was obtained eg
1 2 3
x 1 2 0
y 0 1 2
z 2 0 1
I'd like to be able to return an average of the ranking obtained
average
x 1.67
y 2.67
z 1.67
Whats the
say 'm' is your matrix, then try
rowMeans(m * col(m))
I hope it helps.
Best,
Dimitris
bwgoudey wrote:
I have a small matrix where the columns represents a ranking and the values
are the number of times each ranking was obtained eg
1 2 3
x 1 2 0
y 0 1 2
z 2 0 1
I'd
Thanks heaps. Is there a neat way to do the same for the standard deviation?
Cheers
Ben
On Wed, Apr 1, 2009 at 11:59 PM, Dimitris Rizopoulos
d.rizopou...@erasmusmc.nl wrote:
say 'm' is your matrix, then try
rowMeans(m * col(m))
I hope it helps.
Best,
Dimitris
bwgoudey wrote:
I
Dear fellow R Users:
I am doing a Cholesky decomposition on a correlation matrix and get error
message
the matrix is not semi-definite.
Does anyone know:
1- a work around to this issue?
2- Is there any approach to try and figure out what vector might be co-linear
with another in thr Matrix?
Hello to everyone,
I am starting to work on classification procedures. I usualy do a principal
component analysis (PCA) as a previous step in order to reduce variables and
after I apply a cluster procedure. My question is if it will be better to
use raw variables instead of use principal
Hello,
A nice guy call Jun Shen was helping me out with this, but I require a bit more
help. Below is my data set or list called 'test'. I'm trying to calculate the
%RSD for each pair of index and keep it in cronological order if you can
imagine a 3rd column with 'date' beside index.
Hello,
I have a .R file which I am trying to invoke via java with command line
parameters. Basically java invokes the command as follows:
Path to R binary --slave --args Path to CSV File Direcotry path
Date Script path
I am using Rutime class of Java to execute this command.
I have written
hi
I ve a list of item x = ( x1
x2
x3)
I need to extract a new vector y = ( ,
,
)
I mean, for each item I
Dear R community
I have a question regarding the value of cost complexity parameter k used in
tree package for pruning purpose. Any help in finding the optimum value of
k is requested. Please give some suggestion in this regard. In the example
below i used k=0 but i don't know why? But if i use
calpeda wrote:
hi
I ve a list of item x = ( x1
x2
x3)
I need to extract a new vector y = ( ,
,
)
I
try this:
x - c(x1, x2, x3)
substr(x, 1, 4)
Best,
Dimitris
calpeda wrote:
hi
I ve a list of item x = ( x1
x2
x3)
I need to extract a new vector y = ( ,
Dear celpeda,
Try this:
x = c( x1, x2, x3)
substr(x,1,4)
[1]
See ?substr for more details.
HTH,
Jorge
On Wed, Apr 1, 2009 at 9:30 AM, calpeda mauro.bias...@calpeda.it wrote:
hi
I ve a list of item x = ( x1
x2
Thank you I had not considered using gradient in this fashion. Now as an add
on question. You (an others) have suggested using SANN. Does your answer change
if instead of 100 variables or bins there are 20,000? From the documentation
L-BFGS-B is designed for a large number of variables. But
Look at the nearPD() function in the package Matrix.
require(Matrix)
?nearPD
In particular, pay attention to the arguments eig.tol and posd.tol,
which you can tweak to define how much positiveness you would like to
have.
Ravi.
NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1}
which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax
(e.g. f(a=1), which is equivalent to
eval(structure(quote(f(1)),names=c('','a'))).
As far as I can tell from the documentation, assignment with = is
Hi R users,
I apologize for a seemingly trivial question, but I felt this forum would be
the best place to seek advice.
I have been an R user for a year now, but I am limited to using R and its
various contributed packages. I strongly feel that users of a free and open
source software tool must
Neil,
pls tell why do you need the correlation matrix? if you are trying to
simulate correlated variables then you can go around the cholesky by using
svd.
if you really need the correlation ( I think it is always possible to avoid
it ) then Rmetrics have a function to turn
Hi Stephen:
It's the inputs given to me by a end-user. Ultimately trying to fit a student-t
copula to a bunch of simulated price returns
while maintaining the structure of the estimated correlation matrix.
The other challenge is I use R to test and work a solution but then have also
done in
On 4/1/2009 10:38 AM, Stavros Macrakis wrote:
NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1}
which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax
(e.g. f(a=1), which is equivalent to
eval(structure(quote(f(1)),names=c('','a'))).
As far as I can tell
Hi everyone,
I intend to do a discriminant analyse for 2 measures(eye diameter and body
length) and for different areas to show differences between those areas if
there are any. The raw data (eye diameter, body length) make one cloud of
points so it seems there aren't any differences between
I'm running brglm to do binomial loguistic regression.
The perhaps multicollinearity-related feature(s) are:
(1) the k IVs are all binary categorical, coded as 0 or 1;
(2) each row of the IVs contains exactly C ( k) 1's; (I think this is the
source of the problem)
(3) there are n * k unique
R-help,
I am trying to perform a basic anlaysis of the BreastCancer data from
mlbench using the svm() function in e1071. I use the following code
library(e1071)
library(mlbench)
data(BreastCancer)
BC - subset(BreastCancer, select=-Id)
pairs(BC)
model - svm(Class ~ ., data=BC, cross=10)
##
thank you,
but I m importing data from a txt file and I have a matrix of n*1
The function str seems to work only from 1*n
Wacek Kusnierczyk wrote:
calpeda wrote:
hi
I ve a list of item x = ( x1
x2
x3)
I need
Hi,
When I type library(tcltk) under R 2.8.1 I get the error message:
Loading Tcl/Tk interface ...Error in inDL(x, as.logical(local),
as.logical(now), ...) :
unable to load shared library
'C:/PROGRA~1/R/R-28~1.1/library/tcltk/libs/tcltk.dll':
LoadLibrary failure: The specified module
Hi: I have had a similar issue so below are ways that I deal with
that.  i don't think there are manuals/ documentation for
becoming more of a developer ( someone can correct me if I'm wrong and I'd
be happy to be wrong ) but there are other ways:
1) Staying on this
Duncan Murdoch murd...@stats.uwo.ca writes:
On 4/1/2009 10:38 AM, Stavros Macrakis wrote:
NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1}
which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax
(e.g. f(a=1), which is equivalent to
On Wed, Apr 1, 2009 at 10:55 AM, Duncan Murdoch murd...@stats.uwo.cawrote:
On 4/1/2009 10:38 AM, Stavros Macrakis wrote:
As far as I can tell from the documentation, assignment with = is
precisely
equivalent to assignment with -. Yet they call different primitives:
The parser does treat
Hi
r-help-boun...@r-project.org napsal dne 01.04.2009 11:16:26:
Hello,
A nice guy call Jun Shen was helping me out with this, but I require a
bit
more help. Below is my data set or list called 'test'. I'm trying to
calculate
the %RSD for each pair of index and keep it in cronological
First of all I'd like to thank all those who answered me back teaching me
different ways to get the calledfunction modify global data rather than its
own. I fixed that.
Now I have a similar pproblem. Whenever the caller passes a matrix to the
called function I thought the called function
I'am trying to develop some code if R, which would correspond to what I did in
SAS.
The data look like:
TreatmentReplicategroup1 GSI
Control A 1 0.81301
Control B 1 1.06061
Control C 1 1.26350
Control
Dear all,
Say I have the following dataset:
DF
x y z
[1] 1 1 1
[2] 2 2 2
[3] 3 3NA
[4] 4 NA 4
[5] NA 5 5
And I want to omit all the rows which have NA, but only in columns X and Y, so
that I get:
x y z
1 1 1
2 2 2
3 3 NA
Sorry if this is the wrong ml for this question, I am new to R. I am
trying to use R to analyze the data from my thesis experiment and I am
having troubles accounting for the pseudoreplication properly from
having each participant repeat each treatment combination (combination
of fixed factors) 5
I have another question regarding ddply. In my actual data.frame, I have many
other column variables corresponding to the type of the trial. I'm wondering
if I can have ddply include those in firstfixtime as well.
I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it
to
I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it
to df[which.min(df$FixInx)] or adding new lines with the additional columns
that I want to include, but nothing seemed to work. I'll admit I only have a
mild understanding of what is going on with the function .fun. :-)
On Wed, Apr 1, 2009 at 11:00 AM, hadley wickham h.wick...@gmail.com wrote:
I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it
to df[which.min(df$FixInx)] or adding new lines with the additional columns
that I want to include, but nothing seemed to work. I'll admit I only
Dear All,
I am sure this is a one-liner, but I cannot find the R command to
generate the LaTex symbols \perp and \parallel. Consider for instance
the figure
(one can use any kind of data for the plot)
pdf(friction_linear_chain_perpendicular.pdf)
par( mar = c(4.5,5, 2, 1) + 0.1)
plot(data[ ,1],
David, thank you very much for the quick response:
The sample example helped and works fine for me. I'm sorry for not
providing an example. In order to explain my problem see following example:
test-rt(1000,df=5)
Repeat only the following code to see how the second and third plot
Feng, Jingyu wrote:
I'am trying to develop some code if R, which would correspond to what I
did in SAS.
The data look like:
TreatmentReplicategroup1 GSI
..
The SAS code is:
proc mixed data=data_name order=data method=ml; *scoring=10;
classes group1;
model
On 4/1/2009 11:39 AM, Stavros Macrakis wrote:
On Wed, Apr 1, 2009 at 10:55 AM, Duncan Murdoch murd...@stats.uwo.cawrote:
On 4/1/2009 10:38 AM, Stavros Macrakis wrote:
As far as I can tell from the documentation, assignment with = is
precisely
equivalent to assignment with -. Yet they call
Bugzilla from rmh3...@gmail.com wrote:
Responses:
CompletionTIme
VisitedTargets
Fixed-factors:
Targets (4-levels): 4, 9, 14, 19
Entropy (3-levels): Low, Medium, High
Random-factors:
Participants: 31 total participants
Replicates: 5 (this could also be viewed as a time factor I
I have a matrix of data. I need to scan the matrix and find every
sequence from maxima to maxima across a row. I can write a loop to do
this easily. Problem is, I can't figure out how to store the results.
Each result is a vector of widely varying lengths. Ideally I'd like a
vector of
On 01-Apr-09 15:49:40, Jose Iparraguirre D'Elia wrote:
Dear all,
Say I have the following dataset:
DF
x y z
[1] 1 1 1
[2] 2 2 2
[3] 3 3NA
[4] 4 NA 4
[5] NA 5 5
And I want to omit all the rows which have NA, but only in
Lorenzo Isella wrote:
I am sure this is a one-liner, but I cannot find the R command to
generate the LaTex symbols \perp and \parallel.
As often, the most helpful how-to resource is by Prof. Brian Ripley
http://markmail.org/thread/kauzftprydrhqq5m
if you manage to get around the many
First input the data frame:
Lines - x y z
+1 1 1
+2 2 2
+3 3NA
+4 NA 4
+ NA 5 5
DF - read.table(textConnection(Lines), header = TRUE)
# Now uses complete.cases to get required rows:
DF[complete.cases(DF[1:2]),]
x y z
1 1 1 1
2
The company I work for require users to request what packages they want from
the IT department (user cannot download themselves). I intend to request
installation of the latest version of R plus the 23 Cran task views. As a
statistician what are the recommended packages or packages that
Dear R list,
I've been attempting to interpret the results from a three-way ANOVA. I
think I understand contrasts and the R defaults for these (treatment
contrasts). My question is: what is the intercept in this test? As far as I
can tell, its NOT the expected value of a point that belongs to the
Dear r-help,
How can I add a strip to show group weights using lattice package? For
example, in the following code, I'd like to using wt variable in a trip
to demonstrate the relative size of groups.
(Following is just the simplest form to demonstrate the question. A
conditional variable will
I'm trying to use snow in my dual-core (hopefully later this is going to
run in a cluster). So, at this moment I create a cluster using SOCK
connection (MPI in the future). However when I try to use
clusterApplyLB I got Error in socketSelect(socklist) : not a socket
connection. Any ideas ? Do you
I really want to do this:
abline(
a=tan(-kT*pi/180),
b=kY-tan(-kT*pi/180)*kX
)
where kX,kY and kT are vectors of equal length. But I can't do that
with abline unless I use a loop, and I haven't figured out the least
unelegant way of writing the loop yet. So is there a way to do this
without a
How can I performing Bootstrap Confidence Intervals for the estimates of
nonparametric regression y=f(x) such as loess and spline smoothing
Thanks in advance
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hello,
I have a problem in feature selection I would be thankful if you can help
me.
I have a dataset with limited samples (for example 100) and a lot of
features (for example 3000) and i have to do feature selection.
if i use cross validation (for example *10 fold*) i rank the features based
on
I have data that I read in using:
data-read.table(RAVK2.obs.data,sep=\t)
'data' looks like this:
V1V2
1 2009-03-25 06:00:00 12.86
2 2009-03-25 12:00:00 12.80
3 2009-03-25 18:00:00 12.76
4 2009-03-26 00:00:00 12.68
5 2009-03-26 06:00:00 12.66
6 2009-03-26 12:00:00
Hello,
Earlier I posted a question about memory usage, and the community's input was
very helpful. However, I'm now extending my dataset (which I use when running
a regression using lm). As a result, I am continuing to run into problems with
memory usage, and I believe I need to shift to
calpeda wrote:
thank you,
but I m importing data from a txt file and I have a matrix of n*1
The function str seems to work only from 1*n
you see, it would help if you provided more details from the start. you
may still need to do it; it seems that both solutions you were given
(mine and
This whole thing is an April Fool's joke. Isn't it?
***Please***!!! (Let it be an April Fool's joke.)
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
On Wed, 2009-04-01 at 16:49 +0100, Jose Iparraguirre D'Elia wrote:
Dear all,
Say I have the following dataset:
DF
x y z
[1] 1 1 1
[2] 2 2 2
[3] 3 3NA
[4] 4 NA 4
[5] NA 5 5
And I want to omit all the rows which have NA,
Dear Allen,
On Wed, 1 Apr 2009 10:44:33 -0700 (PDT)
AllenL allen.laroc...@gmail.com wrote:
Dear R list,
I've been attempting to interpret the results from a three-way ANOVA.
I
think I understand contrasts and the R defaults for these (treatment
contrasts). My question is: what is the
Is there any syntax in R that allows a switch-type condition to be used?
switch(variable){
case CONSTANT_VALUE;
break;
default:
break;
}
Thanks,
Jason
__
R-help@r-project.org mailing list
One of the points of my.symbols is that you can define your own symbols to use
with it (hence the my).
I downloaded a graphic of the aries symbol (your original attempt in unicode I
belive) and used the following code to trace the left half of the symbol
(starting bottom center), then used
How about reading ?switch ?
Best,
Gabor
On Wed, Apr 1, 2009 at 9:37 PM, Jason Rupert jasonkrup...@yahoo.com wrote:
Is there any syntax in R that allows a switch-type condition to be used?
switch(variable){
case CONSTANT_VALUE;
break;
default:
break;
}
Thanks,
Jason
On 2/04/2009, at 8:37 AM, Jason Rupert wrote:
Is there any syntax in R that allows a switch-type condition to
be used?
switch(variable){
case CONSTANT_VALUE;
break;
default:
break;
}
?switch
##
Attention:\
Just to correct/expand/clarify the parenthetical below (how often is there a
chance to correct or clarify something posted by Bill Venables?), the ides are
the 15th of March, May, July, and October, but the 13th of the other months.
So if you want to use the ides as the date to use, you will
pmatch() facilitates a very simple solution:
#Data
IA - factor(c(1,2,2,3,3,4,3,5,5))
FixTime - c(200,350,500,600,700,850,1200,1350,1500)
#First occurrence of each level
first. - pmatch(levels(IA),IA)
#Use first occurrence to subscript a vector or data frame
FixTime[first.]
A simple way to
Stavros Macrakis wrote:
`-`
Error: object - not found
that's weird!
vQ
__
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-guide.html
and
On 2/04/2009, at 7:04 AM, Thomas Levine wrote:
I really want to do this:
abline(
a=tan(-kT*pi/180),
b=kY-tan(-kT*pi/180)*kX
)
where kX,kY and kT are vectors of equal length. But I can't do that
with abline unless I use a loop, and I haven't figured out the least
unelegant way of writing the
1 - 100 of 144 matches
Mail list logo