Assuming you are trying to read the contents of the Excel files and not the
shortcut itself, try something link this:
#C:\users\mark\desktop\A1.xlsx.lnk is a shortcut I created on my desktop to an
xlsx document in another directory
#The windows type command, along with find gets the path to the
,"Bill",..: 1 2 3
- attr(*, "Date")= POSIXlt, format: "2013-02-21"
> str(f3(x)) # mangles column names, drops unused levels, drops Date attribute
'data.frame': 3 obs. of 3 variables:
$ No.Yes: Factor w/ 1 level "Yes": 1 1 1
$ Size
How about this?
scs2<-data.frame(lapply(scs2, factor))
From: "Lopez, Dan"
To: "R help (r-help@r-project.org)"
Sent: Wednesday, February 20, 2013 7:09 PM
Subject: [R] Having trouble converting a dataframe of character vectors to
factors
R Experts,
I have
/formatR/formatR.pdf
--Mark Lamias
From: C W
To: r-help
Sent: Wednesday, January 23, 2013 9:27 PM
Subject: [R] Recommendation for website to format R code
Hi list,
Could anyone recommend some good website for formatting R code? For
example, when you copy paste
How about
Dat1 <- lapply(subset(Dat, Dat!="P"), My_Function)
--Mark
From: Christofer Bogaso
To: r-help@r-project.org
Sent: Friday, December 14, 2012 1:58 PM
Subject: [R] A question on list and lapply
Dear all, let say I have following list:
Dat <- vecto
not clear to me what it is you are attempting to do, as you switch from a
very specific example to some general example with the vague terms "var1"
"var2", and "var3."
It sounds like you might be trying to do something similar to what would be
available in the shap
in the shape package using the melt function.
Try ?melt.data.frame.
--Mark Lamias
From: Charles Determan Jr
To: r-help@r-project.org
Sent: Tuesday, December 4, 2012 4:17 PM
Subject: [R] reformatting some data
Hello,
I am trying to reformat some data so t
Try:
matrix(unlist(a), ncol=2, byrow=T)
--Mark Lamias
From: Sam Steingold
To: r-help@r-project.org
Sent: Tuesday, December 4, 2012 3:09 PM
Subject: [R] list to matrix?
How do I convert a list to a matrix?
--8<---cut here---st
"WTFA_SA" "SEX" "AGE_P" "REGION"
"SMKNOW" "VITANY" "VITMUL" "HERBSUPP" "VIGFREQW"
[12] "MODFREQW" "STRFREQW" "DESIREWT" "MOVE1" "LIFT"
Hi, Yihui,
Attached is an HTML Diff report of the two files. The left pane contains the
R-2.15.0 file.
Thanks.
--Mark
From: Yihui Xie
To: Mark Lamias
Cc: "r-help@r-project.org"
Sent: Thursday, November 29, 2012 2:43 PM
Subject: Re: [R] k
I haven't used it yet, so I can't comment about the stability or
appropriateness of it, but R.NET looks somewhat promising for this:
http://rdotnet.codeplex.com/
Shiny is another potential way to go.
You could also take a look at David Firth's CGIwithR:
http://www2.warwick.ac.uk/fac/sci/stati
Thanks, Yihui!
Luckily I kept R-2.15.0 and left it untouched (so I can continue to use that
for now). If it helps any, I was able to go back into Lyx and change the path
to point to R-2.15.0 and I also changed the windows path environment variable
to point to the old version. After doing this
R Users,
I just upgraded my version of R from R-2.15.0 to R-2.15.2 and installed the
latest versions of LyX and MikTex running Windows 7 Ultimate, 64-bit OS. Prior
to the upgrade, I was using Lyx with knitr to generate a document with no
problems. However, after the upgrade, and using the sa
You might find the binning function in the sm package helpful here.
--Mark Lamias
From: Santosh
To: r-help
Sent: Tuesday, November 27, 2012 9:59 AM
Subject: [R] binning by frequency
Dear Rxperts,
is there way to identify intervals from continuous data
In the example below, I don't see any "$$$" separators. Are you sure this is
supposed to be the separate or just a single dollar sign? If this is the case,
you don't specify what is to happen when multiple separators appear next to
each other. From your example, it appears that two separators
You could use something like this:
#Generate 26 simulated data points
y=rnorm(26)
x=1:26
your.labels=letters
#Plot data
plot(x, y, xlim=c(min(x), max(x)+.25), ylim=c(min(y), max(y)+.25))
#Label points
text(x+.15, y+.15, your.labels)
You could also use the textxy function in the calibrate pa
I'm guessing that you have more elements in your weights vector than you have
observations? It's hard to tell without seeing your data.
See below:
#Generate fake data
y=rnorm(10)
X1=rnorm(10)
X2=rnorm(10)
X3=rnorm(10)
#Create a 10 element vector of weights
wts=abs(rnorm(10))
#weighted lm
May may also find this helpful, especially if you know LaTex:
http://yihui.name/en/2011/04/produce-authentic-math-formulas-in-r-graphics/
To: bgnumis ; "r-help@r-project.org"
Sent: Tuesday, November 20, 2012 6:22 PM
Subject: Re: [R] Greek letters on title
T
Try this:
titleline=expression(paste("Time evolution with ", alpha, "=0.2"))
plot(x, main=titleline,col="orange")
--Mark J. Lamias
From: bgnumis
To: r-help@r-project.org
Sent: Tuesday, November 20, 2012 3:47 PM
Subject: [R] Greek letters on title
Hi all,
This is how I learned everything about knitr:
http://yihui.name/knitr/
Yihui is great and his site gives you pretty much all the information you need
to get you started.
From: "Muhuri, Pradip (SAMHSA/CBHSQ)"
To: 'R. Michael Weylandt'
Cc: "r-help@r-project
What about something like this:
#Create dummy data
mydf=data.frame(matrix(rnorm(1000), ncol=100))
#Obtain summary stats
my.vars=apply(mydf, MARGIN=2, FUN=var)
my.std=sqrt(my.vars)
#Plot summary stats
plot(my.vars, col="red")
points(my.std, col="blue")
From
The Anderson-Darling Test and the Shapiro-Wilk test have considerably more
power.
I'd refer you to a non-R related discussion board for statistics related
questions. Perhaps the following might be more useful:
http://stats.stackexchange.com/questions/8184/most-powerful-gof-test-for-normality
If you are after all the possible percentages with two decimal places, why
don't you use this:
seq(from=0, to=100, by=.01)/100
I'm not really sure what you are trying to do in terms of rows and columns,
however. Can you be a bit more specific on what each row/column is?
Are you trying to gro
Here is an example you can use:
#Generate random normal variables to use as dummy data for Fisher's Alpha
alphaBCI<-rnorm(100)
#Assume you have 5 sites, each with 20 data points
sites<-rep(c("Site 1", "Site 2", "Site 3", "Site 4", "Site 5"), each=20)
#Making sites a factor will produce the str
cov(A) will compute a covariance matrix of the columns of a matrix A.
Â
cov(a, b) will compute a covariance of the vectors a and b.
Â
here are some examples:
Â
#create random vectors
a=rnorm(10)
b=rnorm(10)
Â
Â
> a
 [1] -0.3110384 -2.6201009 -1.3078118 1.3384743 2.4032381 -0.7245201
 [7]
1L, 1L, 1L, 1L, 0L,
1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L,
0L, 1L, 1L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L,
1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L,
0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L)
cbind(x, cumsum(x==0))
Â
--M
I use pgfSweave so that I can embed R code and output in LaTeX;
pgfSweave depends on the formatR package to format the code, and the highlight
package to highlight R code; graphics are based on tikzDevice, which has better
quality than R's PDF or postscript output, in my opinion.
Check out the de
df3))
sapply(X=mydfs, MARGIN=c(1,2), FUN=mean)
[,1] [,2] [,3]
V1 0.8206239 -0.51637848 -0.9025252
V2 -0.2828919 0.41837384 -0.4042646
V3 -0.8996891 -0.06284681 -0.2459261
--Mark Lamias
From: Kaiyin Zhong
To: r-help
Sent: Wednesday, Novem
The wilcoxon test in coin are meant only for "Testing the equality of the
distributions of a numeric response in *two or more* independent groups against
shift alternatives" whereas the wilcoxon test in the base pacakge "Performs
*one-* and two-sample Wilcoxon tests on vectors of data; the latt
Check out Casella and Berger's Statistical Inference. ISBN 978-81-315-0394-2
or http://en.wikipedia.org/wiki/Maximum_likelihood as an online reference.
--Mark J. Lamias
From: Ning Cheng
To: r-help@r-project.org
Sent: Sunday, February 27, 2011 3:19 PM
Subject: [R] MLE estimation
Dear List,
Th
Does an R package exist that is similar to SAS/Intrnet
(http://support.sas.com/documentation/onlinedoc/intrnet/index.html) that will
allow users to take parameters passed to it by a web request, produce results
and return them to the web-browser in HTML format? I tried looking through the
pack
}
I tried a few of the previous suggestions (and tried modifying them), but they
didn't seem to quite do the trick. Any assistance would be greatly appreciated.
Thanks a million.
--Mark Lamias
- Forwarded Message
From: jim holtman
To: Mark Lamias
Cc: r-help@r-project.org
aracter(aga2[i, "AP"])
ags[i]<-as.character(aga2[i, "AS"])
}
else
{
p1[i]<-paste(p1[i-1], aga2[i, "AP"], sep=",")
ags[i]<-paste(ags[i-1], aga2[i, "AS"], sep=",")
}
}
Thanks.
--Mark Lamias
[[alt
33 matches
Mail list logo