Displaying 20 results from an estimated 10000 matches similar to: "static analysis tools for R code?"
2005 Apr 12
8
removing characters from a string
Is there a simple way in R to remove all characters
from a string other than those in a specified set? For
example, I want to keep only the digits 0-9 in a
string.
In general, I have found the string handling abilities
of R a bit limited. (Of course it's great for stats in
general). Is there a good reference on this? Or should
R programmers dump their output to a text file and use
something
2005 Apr 13
3
terminate R program when trying to access out-of-bounds array element?
I want R to stop running a script (after printing an
error message) when an array subscript larger than the
length of the array is used, for example
x = c(1)
print(x[2])
rather than printing NA, since trying to access such
an element may indicate an error in my program. Is
there a way to get this behavior in R? Explicit
testing with the is.na() function everywhere does not
seem like a good
2007 Apr 11
3
Fortran coding standards
I have some comments on the Fortran code in the
fseries package in file 4A-GarchModelling.f ,
especially the subroutine GARCHFIT and function
DSNORM.
I appended the code to the end of an earlier message,
but it was rejected by some rule. Let me first say
that I am grateful that packages for financial
econometrics exist in R.
Fortran 77 had PARAMETERs, and PARAMETERs equal to
99999 and 200 should
2005 Apr 13
1
Why is 1 a double?
Based on examples in R books and the syntax of other
programming languages, I expected that
n <- 10
assigns the integer 10 to n, but typeof(n) is actually
a double. The subscripting expression x[1] is valid,
but sprintf("\n %d",1) is not, giving the error
Error in sprintf("\n %d", 1) : use format %f, %e or %g
for numeric objects
One must use instead sprintf("\n
2006 Feb 13
2
R-help, specifying the places to decimal
Hello - R-experts,
Is there any way with which we can specify the number after
decimal point to take. Like I have a situation where
the values are comming 0.160325923 but I only want
4 place to decimal say 0.1603. Is there any way for that.
I am no expert in R- and this may sound simple to many.sorry
Thanks for any help.
With Regards
Subhabrata
2005 Mar 03
3
3d plot of regression squared error
Hi. I'm trying to create a 3d plot for a teaching example of finding a
least-squares estimate of the parameters to fit a line to some data. I
was hoping to get a nice plot with a clear, single minima where the
derivative of the surface is zero. No matter how much I tinker, I can't
seem to get a simple straightforward plot. Am I doing something wrong?
Thanks in anticipation,
Ross-c
x
2006 Jun 18
1
about the analysis of strings, thanks
Dear R-helpers:
thank your for your attention.
i am a newer to R and i am doing some protein category classification based on
the amino acid sequence.while i have some question urgent.
1. any packages for analysis amino acid sequence
2. given two sequences "AAA" and "BBB",how can i combine them into "AAABBB"
3. based on "AAABBB",how can i get some
2008 Feb 15
1
Latent class analysis
Which package(s) contain something on latent class analysis?
Tom
--
+----------------------------------------------------------------+
| Tom Backer Johnsen, Psychometrics Unit, Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen, NORWAY |
| Tel : +47-5558-9185 Fax : +47-5558-9879 |
| Email : backer at psych.uib.no URL :
2008 Jan 12
2
Factor Analysis
Good Morning,
Is it possible to use the R program for a CFA with dichotomous data?
Thank you,
Kathleen
Kathleen Kemp, M.A.
Doctoral Clinical Psychology Student,
Concentration: Forensic Psychology
Drexel University
Philadelphia, PA 19104
kk354@drexel.edu
[[alternative HTML version deleted]]
2005 Apr 08
1
restrict namespace inside functions?
Is there a way to exclude from the namespace all
variables other than function arguments and local
variables? For example, I would like the following
code
a = 2.0
mult <- function(x)
{
pi = 3.14
return(pi*a*x)
}
print(mult(10.0))
to say "a not found" rather than using a = 2.0 inside
function mult. Thanks.
Vivek Rao
2005 Jul 16
2
topical guide to R packages
I would like to see R packages arranged by topic. CRAN
Task Views are at
http://lib.stat.cmu.edu/R/CRAN/src/contrib/Views/ ,
but I'd like something more detailed. For example, the
IMSL Fortran library, version 4 is easy to navigate
and has procedures arranged according to following
topics:
Basic Statistics
Regression
Correlation
Analysis of Variance
Categorical and Discrete
2007 Feb 05
3
Confidence intervals of quantiles
Can anyone please tell me if there is a function to calculate confidence
intervals for the results of the quantile function.
Some of my data is normally distributed but some is also a squewed
distribution or a capped normal distribution. Some of the data sets contain
about 700 values whereas others are smaller with about 100-150 values, so I
would like to see how the confidence intervals change
2005 Aug 10
2
Treatment-response analysis along time
Dear R people,
I wonder if you could give me a hand with some of my data. I have a very
typical analysis in biology, however it is difficult for me to find the
right way to analyse. I had a group of animals, I gave them a treatment, and
I measure a variable along time -one??s per day- along 5 days,for
example(fake data):
Animals Time1 Time2 Time3 Time4
1 1 5 3
2008 Apr 09
4
apply lm() for all the columns of a matrix
Hi all,
My question is not really urgent. I can write a loop and solve the
problem. But I know that I'll be in a similar situation many more times so
it would be useful to find out the answer
Is there a fast way to perform linear fit to all the columns of a matrix?
(or in the one dimension of a multi-dimensional array.) I'm talking about
many single linear fits, not about a multiple fit.
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to
do this weekend to understand every bit but your code will prove very
useful.
Cheers,
Aziz
-----Original Message-----
From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be]
Sent: May 12, 2006 4:35 PM
To: Chaouch, Aziz
Subject: RE: [R] Maximum likelihood estimate of bivariate
2016 Jul 13
2
How to get analysis in a class which is not a LLVM pass?
Hello,
I want to use ProfileSummaryInfo in a class which is not a LLVM pass like
TargetFrameLowering class (lib/CodeGen/TargetFrameLoweringImpl.cpp)
one way I know to get ProfileSummaryInfo is
getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(M);
but I can't use this.
Is this really possible?
Sincerely,
Vivek
-------------- next part --------------
An HTML attachment was
2005 May 19
2
plot question
hi all:
xlim and ylim are used to define the interval limits of a plot. I'm interested in the scale of values between this limits.
suppose xlim=c(0,10)
we can have e.g.
0 5 10
0 2 4 6 8 10
0 1 2 3 4 5 6 7 8 9 10
which is the parameter that allows me to modify this?
thanks in advance
alexandre
2006 Jun 16
3
Vector Manipulation
I have a vector that has 1,974 elements and each element is one of the
following (B, F, N, Y). How do I recreate that vector accept in the
place of N put 0 and in the place of B, F or Y put a 1?
Thanks,
Jacob
[[alternative HTML version deleted]]
2005 Sep 25
2
getting variable length numerical gradient
Hi all.
I have a numerical function f(x), with x being a vector of generic
size (say k=4), and I wanna take the numerically computed gradient,
using deriv or numericDeriv (or something else).
My difficulties here are that in deriv and numericDeric the function
is passed as an expression, and one have to pass the list of variables
involved as a char vector... So, it's a pure R programming
2007 May 20
2
Number of NA's in every second column
Hi R-users,
How do I calculate a number of NA's in a row of every second column in my
data frame?
As a starting point:
dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE)))
dfr[dfr==0] <- NA
So, I would like to count the number of NA in row one, two, three etc. of
columns X1, X3, X5 etc.
Thanks in advance
Lauri
[[alternative HTML version deleted]]