Dear users,
I am stucked with a programming problem: I am trying to download a squared
adjacency matrix from matlab with only 0 or 1. Doing it without a loop at
first, I get an error message that is, I think, related to the
"mat_adj<-readMat(pathnames_adj)" line. Did anybodz encouter already
ion. Or perhaps I misunderstand the
application of the confint fuuction in the MASS package. If someone
knows the explanation, I'd appreciate it.
--
Jerome L. Myers
[[alternative HTML version deleted]]
__
R-help@r-project.org mailin
Hello all,
I am quite new to R, with the goal of using it for a project in my business
course. I am attempt to run a Monte Carlo simulation of futures prices based
on a random walk whereby the given volatility (I will use historical
volatility in this case, say 12%) is Levy-distributed , equally
aste() to form the strings and assign() to save your objects?
> for(i in 1:100) assign(paste("vpn", i, sep=""),
read.table(paste("vpn", i, ".dat")))
HTH,
Jerome
[[alternative HTML version deleted]]
_
On Mon, 2011-05-16 at 17:01 -0300, Nilza BARROS wrote:
> Hi, Jerome
>
> I was trying to use RMYSQL
>
> for (i in length(Query)) {
> rs1<-dbSendQuery(con,Query[i])
> }
>
> But although the Query have several lines the command above just feed
> my database
INTO OBS
> (date,T_2M,TMAX_2M,TMIN_2M,TD_2M,PS,FF_10M,DD_10M,TOT_PRCP,CLCL' at line 1
>
>
> "INSERT INTO OBS (date,TMAX_2M,TMIN_2M,TD_2M,PS,Station_NO) VALUES
> (2011051312, NULL, 20.6,19.4,1014.8,836490)"
> "INSERT INTO OBS (date,TMAX_2M,TMIN_2M,TD_2
ot;package:foreign")(dbf.name) :
> unable to open DBF file
>
> How can I read these files at once?
What is the value of x after you get the error? x should be a file name.
Is it really a valid DBF file?
Jerome
[[alternative HTML version deleted]]
ted. For example, it will not work as expected if your
data is generated with:
y <- rexp(N)
HTH,
Jerome
__
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/
On Wed, 2011-05-04 at 22:41 +0300, johannes rara wrote:
> I have a string like this
>
> st <- "SELECT COUNT(empid), COUNT(mgrid), COUNT(empname),
> COUNT(salary), FROM Employees"
>
> How can I remove the last comma before the FROM statement?
gsub(",[^,
On Tue, 2011-05-03 at 10:36 -0600, Ryan Utz wrote:
> Hi all,
>
> I'm attempting to make a quite-specific plot where the axes cross at the
> origin and with gridlines for guidance. I've been using ablines to create
> the reference lines because I want a lot of control as to where they are
> placed
t statistics.
My understanding is that you want to have one data frame per week. I
question whether it is necessary to split these data frames. I would
design a single data frame with one column to identify the week and then
work on subsets of that data frame to calculat
his yields.
> f(3, 2, z)
function (z = "z")
3 + 2 + (3^2 - z)
> f(3, 2, z)(3)
[1] 11
I haven't figured out how to get rid of the default argument value shown
here as 'z = "z"'. That doesn't prevent it to work, but it's less
pretty. If you fin
elves?
As seen below, the shapiro.test() output is a list of four components.
> names(shapiro.test(rnorm(100, mean = 5, sd = 3)))
[1] "statistic" "p.value" "method""data.name"
You can extract just the p-value with:
> shapir
class for your object and then write a "print" method.
Example:
a <- list(a=2, b=c(2,2,2))
class(a) <- "myclass"
print.myclass <- function(x)
{
print(x[[1]])
cat("***\n")
print(x[[2]])
}
This yields:
> a
[1] 2
***
[1] 2 2 2
HTH,
.file() error and,
if there is one, handle it accordingly.
See help(try)
Regards,
Jerome
__
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
On Fri, 2011-04-22 at 10:02 -0700, derek wrote:
> Hello R,
>
> I would like to find out how to generate array full of functions. I tried it
> like this:
>
> fv=array(,dim=c(1,10))
> V=c(1:10)
> for (i in 1:10){
> fv[i]<-function(x)(V[i]-b*a*x) # b, x are constants.
> }
>
> But it returns:
> "inc
Dear all
I'm trying to install the hdf5 library into R. The HDF5 package is
installed in a special directory, distributed accross my cluster:
/share/apps/HDF5
So i put the args option to the configure command as i read in previous
post in the list:
jerome]# R CMD INSTALL --configure
rning message:
In Anova.mlm(model.lm, idata = Bdf, idesign = B, Type = "III") :
the model contains only an intercept: equivalent Type III test
substituted"
I've tried variations of the lm parameters (e.g., ~1 inserted) but it
still yields an error message. I'd appreciate s
optimization purpose? If so, how?
> Example:
> Fitted to: revenue = -700price^2 + 5200price + 780
> Subject to: price range between 10 to 50
>
> Thanks,
> Jerome
>
>
You are confused. That is not an nonlinear progr
range between 10 to 50
Thanks,
Jerome
__
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 provide commented, minimal, self-contained
20 matches
Mail list logo