djmuseR wrote:
>
> On Sun, Dec 26, 2010 at 4:18 AM, bbslover wrote:
>
>>
>> x: is a matrix 202*263, that is 202 samples, and 263 independent
>> variables
>>
>> num.compd<-nrow(x); # number of compounds
>> diss.all<-0
>> for( i in 1:num.compd)
>> for (j in 1:num.compd)
>> if (i!=j) {
>
Dear Peter,
thank you very much, *precisely* what I was looking for!
Cheers,
Marius
On 2010-12-27, at 02:27 , Peter Ehlers wrote:
> On 2010-12-26 08:26, Marius Hofert wrote:
>> Dear David,
>>
>> thank you for your answer.
>> As I wrote, I am looking for an option to control the *space* betwee
Either switch the library path to a writable directory or run it as a su or
sudo so you have the necessary permissions.
Cheers,
Josh
On Dec 26, 2010, at 20:45, eric wrote:
>
> I'm running Linux Ubuntu and tried to update my packages using the
> update.package() command. It appeared to downlo
thanks for your help. I am sorry I do not full understand your code, so i can
not correct using your code to my data. here is the attachment of my data,
and what I want to compute is the equation in the word document of the
attachment:
the code form Berend can get the answer i want to get.
http:
thanks for your help, it is great. In addition, In the beginning, the format
of x is dataframe, and i run my code, it is so slow, after your help, I
change x for matirx, it is so quick. I am very grateful your kind help, and
your code is so good!
kevin
--
View this message in context:
http://r.
You solved my problem, thank you.
As you said it's the type of the content in the matrix that caused the
problem.
I needed to put variable x along with other variables to the list, somehow
it turned out that x must be used in form of character in the statement:
dat <- list("x","otherVariables")
I'm running Linux Ubuntu and tried to update my packages using the
update.package() command. It appeared to download the updates ok but I got
the following message:
The downloaded packages are in ‘/tmp/RtmpFM82Ry/downloaded_packages’
Warning in install.packages(update[instlib == l, "Package"], l
John -
You can use a syntax similar to what you've tried with
the select= argument of the subset function:
subset(dfxyz,select=-y)
x z
1 1 0
2 2 0
. . .
subset(dfxyz,select=-z)
x y
1 1 11
2 2 12
. . .
- Phil Spector
Hi:
On Sun, Dec 26, 2010 at 4:18 AM, bbslover wrote:
>
> Dear all,
>
> My double for loop as follows, but it is little efficient, I hope all
> friends can give me a "vectorized" program to replace my code. thanks
>
> x: is a matrix 202*263, that is 202 samples, and 263 independent
> variables
Hi all.
How does one change user agent strings in http requests made in R? And
how do I figure out what my current user agent string looks like?
Thanks in advance,
Soumendra
--
Don't worry about people stealing your ideas. If your ideas are any
good, you'll have to ram them down people's throat
Mike Marchywka's post mentioned a CRAN package, "rpubchem",
missed by my search for "chemical formula". A further search for
"chemical" and "chemistry" still missed it. "compound" found it.
Adding "compounds" and combining them with "union" produced a list of
564 links in 219 packages;
On Sun, Dec 26, 2010 at 7:26 PM, Gabor Grothendieck
wrote:
> On Sun, Dec 26, 2010 at 6:29 PM, Bryan Hanson wrote:
>> Hello R Folks...
>>
>> I've been looking around the 'net and I see many complex solutions in
>> various languages to this question, but I have a pretty simple need (and I'm
>> not
Hi David & others...
I did find the function you recommended, plus, it's even easier (but a
little hidden in the doc): >element(form, "mass"). But, this uses the
atomic masses from the periodic table, which are weighted averages of
the isotopes of each element. What I'm doing actually inv
Hi,
I am trying to set the color scale in filled.contour based on a specific
value instead of a relative position.
Specifically, I want the values below 0 to be in a gradient of green, and
those above 0 to be red. 0 would be white.
I tried:
posZero = abs(min(z)) / (abs(min(z)) + max(z));
filed.
On Dec 26, 2010, at 8:28 PM, Bryan Hanson wrote:
Thanks Spencer, I'll definitely have a look at this package and it's
vignettes. I believe I have looked at it before, but didn't catch
it on this particular search. Bryan
Using the thermo list that the makeup function accesses to get its
I think the OP had a very limited need but there is something
more sophisticated that may be of larger insterest called "SMILES"
which attempts to capture some structural information about a molecule
in a text sting. Reducing pictures to tractable text is an important step
in many analysis efforts
assign NULL to the column:
> dfxyz <- data.frame(x=1:10,y=11:20,z=factor(c(rep(0,5),rep(1,5
> dfxyz
x y z
1 1 11 0
2 2 12 0
3 3 13 0
4 4 14 0
5 5 15 0
6 6 16 1
7 7 17 1
8 8 18 1
9 9 19 1
10 10 20 1
> dfxyz$y <- NULL
> dfxyz
x z
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
Thanks Spencer, I'll definitely have a look at this package and it's
vignettes. I believe I have looked at it before, but didn't catch it
on this particular search. Bryan
On Dec 26, 2010, at 8:16 PM, Spencer Graves wrote:
p.s. help(pac=CHNOSZ) reveals that this package has 3 vignettes. I
On 2010-12-26 08:26, Marius Hofert wrote:
Dear David,
thank you for your answer.
As I wrote, I am looking for an option to control the *space* between the tick
marks and the corresponding labels. I am happy with the *number* of tick marks
and their default values. As far as I know, pscales can
I am trying to drop a column of a data frame. The code below attempts to drop a
numeric column (which does not work but gives no error or warning) and a factor
column (which does not work but gives an error).
I would appreciate someone telling me why my code does not work, and suggesting
code th
p.s. help(pac=CHNOSZ) reveals that this package has 3 vignettes. I
have not looked at these vignettes, but most vignettes provide excellent
introductions (though rarely with complete coverage) of important
capabilities of the package. (The 'sos' package includes a vignette,
which exposes mor
Have you considered the 'CHNOSZ' package?
> makeup("C5H11BrO" )
count
C 5
H 11
Br 1
O 1
I found this using the 'sos' package as follows:
library(sos)
cf <- ???'chemical formula'
found 21 matches; retrieving 2 pages
cf
The print method for "cf" opened
Well let me just say thanks and WOW! Four great ideas, each worthy of
study and I'll learn several things from each. Interestingly, these
solutions seem more general and more compact than the solutions I
found on the 'net using python and perl. More evidence for the power
of R! A big th
On Dec 26, 2010, at 6:29 PM, Bryan Hanson wrote:
Hello R Folks...
I've been looking around the 'net and I see many complex solutions
in various languages to this question, but I have a pretty simple
need (and I'm not much good at regex). I want to use a chemical
formula as a function ar
I have a problem with 'read.data' also in that I don't see that as a
function in the 'base'; I assume you meant read.table.
Also you did not indicate is all the lines were the same length. Here
is a solution to return a list is each character broken out
separately.
> x <- readLines(textConnectio
On Sun, Dec 26, 2010 at 6:29 PM, Bryan Hanson wrote:
> Hello R Folks...
>
> I've been looking around the 'net and I see many complex solutions in
> various languages to this question, but I have a pretty simple need (and I'm
> not much good at regex). I want to use a chemical formula as a functio
There might be something simpler, but this is what I came up with:
form = "C5H11BrO"
ups = c(gregexpr("[[:upper:]]", form)[[1]], nchar(form) + 1)
seperated = sapply(1:(length(ups)-1), function(x) substr(form, ups[x],
ups[x+1] - 1))
elements = gsub("[[:digit:]]", "", seperated)
nums = gsub("[[:al
try this:
> f.extract <- function(formula)
+ {
+ # pattern to match the initial chemical
+ # assumes chemical starts with an upper case and optional lower
case followed
+ # by zero or more digits.
+ first <- "^([[:upper:]][[:lower:]]?)([0-9]*).*"
+ # inverse of above to
I am using the gls function to fit a two-stage least squares model with
first order autoregressive error terms. Since there is no automated
adjustment for the use of two-stage least squares in this package, I am
trying to manually replicate standard errors of the coefficient estimates in
order to a
Thanks for your advice, but my data is not decimals, so I don't need to round
the values. Instead, what I need to really do is "group" the values into
larger "blocks".
My data looks sort of like this:
xy z
00687
0164
0271
0355
0452
05
Hello R Folks...
I've been looking around the 'net and I see many complex solutions in
various languages to this question, but I have a pretty simple need
(and I'm not much good at regex). I want to use a chemical formula as
a function argument. The formula would be in "Hill order" which
On 12/27/2010 12:43 AM, leyla khodakarim wrote:
Dear All
It is very kind of you to guide me.
When I want to run this line, I see this error
stat.obs<- apply(GS, 2, function(z) Hott2(t(DATA[which(z==1),]), cl))
Error in colSums(w * x) : 'x' must be an array of at least two dimensions
cl<- as.
Hello,
I have a problem with read.data. For example I have a file
# comment
1?0001010101
101010??1010
with comment on first line and data layout without separator. How I could
read data that each character\sign was in another column. It is trivial
probably, but I have no idea for it.
Thank's,
Hi!
I have some questions about MARS model's coefficient of determination.
I use the MARS method in my master's thesis and I have noticed some
problems with
the MARS model's R^2.
You can see the following example that the MARS model's R^2 is too big
when i have used mars() -function for M
Maithula:
On Sun, Dec 26, 2010 at 11:09 AM, Maithula Chandrashekhar
wrote:
> I am not a pure Statistics background and therefore please forgive me if
> this question (which is not R related either) is too trivial.
>
> In many Statistics literature I find following statement: "restrictions in
> di
On Dec 26, 2010, at 17:50 , Oliver Kullmann wrote:
> Hello,
>
> we re-distribute R with our open-source platform
> http://www.ok-sat-library.org/
> where we use R mainly for evaluation of computational experiments.
> Due to the various platforms, we build everything from source, and that works
Dror,
Please look at the
demo(MMC.apple)
in the HH package
install.packages("HH") ## if you don't already have it.
library(HH)
demo(MMC.apple)
Please reply to the list if there are further queries.
Rich
On Sun, Dec 26, 2010 at 7:42 AM, Dror D Lev wrote:
> Dear r helpers,
>
> I would like to
I am not a pure Statistics background and therefore please forgive me if
this question (which is not R related either) is too trivial.
In many Statistics literature I find following statement: "restrictions in
different coefficients matrices have to be imposed to ensure uniqueness of
the parametri
On Dec 25, 2010, at 2:25 PM, Dimitri Shvorob wrote:
df = structure(list(t = structure(c(1033963406.044, 1033974144.847,
+ 1033988418.836), class = c("POSIXt", "POSIXct"))), .Names = "t",
row.names
= c(NA,
+ 3L), class = "data.frame")
df$min = trunc(df$t,units="mins")
does not work,
??? s
Dimitri Shvorob wrote:
.. One issue with the solution proposed by Jeff is that the transformed
column does not have the original's type:
x = structure(list(time = structure(c(1020232904.818, 1020232904.818
), class = c("POSIXt", "POSIXct"), tzone = ""), price = c(321,
323.5), minute = c(102023
Dimitri Shvorob wrote:
df = structure(list(t = structure(c(1033963406.044, 1033974144.847,
+ 1033988418.836), class = c("POSIXt", "POSIXct"))), .Names = "t", row.names
= c(NA,
+ 3L), class = "data.frame")
df$min = trunc(df$t,units="mins")
does not work, Jeff; you will see that my original p
Hi Kohleth,
Suppose this is my list of transactions:
set.seed(200)
tran=random.transactions(100,3)
inspect(tran)
itemstransactionID
1 {item80}trans1
2 {item8,
item20}trans2
3 {item28}trans3
I want to get the 'transpose' of the data, i.e.
transactionID
Hello,
we re-distribute R with our open-source platform http://www.ok-sat-library.org/
where we use R mainly for evaluation of computational experiments.
Due to the various platforms, we build everything from source, and that works
fine.
Until now, that is: there are circumstances (for example in
Dear David,
thank you for your answer.
As I wrote, I am looking for an option to control the *space* between the tick
marks and the corresponding labels. I am happy with the *number* of tick marks
and their default values. As far as I know, pscales can't control the space, so
it is *not* what I
On Dec 26, 2010, at 9:55 AM, Dror D Lev wrote:
Thank you David, for the reference to Dalgaard's paper in
Rnews_2007-2.
Unfortunately I don't seem to have the mathematical-statistical
sophistication required to adapt the example in Dalgaard's paper for
my case.
I hope someone can sugges
Thank you David, for the reference to Dalgaard's paper in Rnews_2007-2.
Unfortunately I don't seem to have the mathematical-statistical
sophistication required to adapt the example in Dalgaard's paper for my
case.
I hope someone can suggest a less-mathematical direction for solution.
Thanks agai
> From: marchy...@hotmail.com
> To: tal.gal...@gmail.com; r-help@r-project.org
> Subject: RE: [R] Performing basic Multiple Sequence Alignment in R?
> Date: Tue, 21 Dec 2010 17:03:17 -0500
> > From: tal.gal...@gmail.com
> > Date: Tue, 21 Dec 2010 20:17:18 +0200
> > Subject: Re: [R] Performing b
The correct answer to "How to lag..?" is almost certainly, "Don't."
The functionality of numerous time series packages and functions take
care of this automatically for you (using suitable data structures,
probably). Rather than trying to reinvent wheels, it might be wiser to
consult the Time Seri
Hi Folks,
I've got a question concerning the calculation of the Schwarz-Criterion
(BIC) done by summary.regsubsets() of the leaps-package:
Using regsubsets() to perform subset-selection I receive an regsubsets
object that can be summarized by summary.regsubsets(). After this
operation the re
bbslover wrote:
>
> x: is a matrix 202*263, that is 202 samples, and 263 independent
> variables
>
> num.compd<-nrow(x); # number of compounds
> diss.all<-0
> for( i in 1:num.compd)
>for (j in 1:num.compd)
> if (i!=j) {
> S1<-sum(x[i,]*x[j,])
> S2<-sum(x[i,]^2)
>
On Dec 26, 2010, at 7:42 AM, Dror D Lev wrote:
Dear r helpers,
I would like to look at the interaction between two two-level
factors, one
between and one within participants, after accounting for any
variance due
to practice (31 trials in each of two blocks) in the task.
It seems to requi
Dear All
It is very kind of you to guide me.
When I want to run this line, I see this error
stat.obs <- apply(GS, 2, function(z) Hott2(t(DATA[which(z==1),]), cl))
Error in colSums(w * x) : 'x' must be an array of at least two dimensions
cl <- as.factor(y)
GS: a matrix with 0 or 1
GS: gene se
On Dec 26, 2010, at 5:41 AM, Marius Hofert wrote:
Dear expeRts,
how can I decrease the space between the tick marks and the
corresponding labels in an splom?
See here:
library(lattice)
U <- matrix(runif(4000), ncol = 8)
splom(U, axis.text.cex = 0.2) # => space between the [small] tick
la
Consider storing the dataframes in a list so that you do not have to
create unique names and it will also give you better control by
keeping all the data together in one object.
On Sun, Dec 26, 2010 at 4:04 AM, Jim Bouldin wrote:
> I realize this is probably pretty basic but I can't figure it out
On Dec 26, 2010, at 4:04 AM, Jim Bouldin wrote:
I realize this is probably pretty basic but I can't figure it out.
I'm looping through an array, doing various calculations and
producing a resulting data frame in each loop iteration. I need to
give each data frame a different name. Althou
On Dec 26, 2010, at 12:44 AM, unsown wrote:
For some purpose, I need to transfer a NAs array to WinBugs through
R2WinBugs, But I constantly got an error message:"'type' must be
"real" for
this format". Here is my data to transfer:
x = matrix(data=NA,nrow=3,ncol=3)
str(x)
It is of mode "
Dear all,
My double for loop as follows, but it is little efficient, I hope all
friends can give me a "vectorized" program to replace my code. thanks
x: is a matrix 202*263, that is 202 samples, and 263 independent variables
num.compd<-nrow(x); # number of compounds
diss.all<-0
for( i in 1:nu
Dear r helpers,
I would like to look at the interaction between two two-level factors, one
between and one within participants, after accounting for any variance due
to practice (31 trials in each of two blocks) in the task.
It seems to require treating practice as a covariate.
All the examples I
Dear expeRts,
how can I decrease the space between the tick marks and the corresponding
labels in an splom?
See here:
library(lattice)
U <- matrix(runif(4000), ncol = 8)
splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and
tick marks is/seems to be too large
I checked ?
Dear R users
Does anyone happen to know a function to fit a Gaussian mixture using
*non-linear* constraints between the parameters? (An EM the allows
that will do the job obviously).
Thank you in advance
--
Jonathan Rosenblatt
www.john-ros.com
__
R-he
For some purpose, I need to transfer a NAs array to WinBugs through
R2WinBugs, But I constantly got an error message:"'type' must be "real" for
this format". Here is my data to transfer:
x = matrix(data=NA,nrow=3,ncol=3)
x = as.array(x)
data <- list ("x")
if I add a line to above setting, then
Hi, I have done another simple test, I test the two syntext against a
CSV file with only one column, both success,
> fdf <- read.csv.ffdf(file="D:/rtemp/fftest2.csv",asffdf_args = list( col_args
> = list(filename=c("F:/a.f"
> fdf
ffdf (all open) dim=c(2,1), dimorder=c(1,2) row.names=NULL
ffd
First off, there are data manipulation
techniques that will beat doing it in
a spreadsheet. For example:
head(x, -1)
is lagged 1 relative to
tail(x, -1)
But I think you are really looking for
'Lag' in the 'quantmod' package.
On 26/12/2010 07:49, Christian Schoder wrote:
Dear R-users,
I've
I realize this is probably pretty basic but I can't figure it out.
I'm looping through an array, doing various calculations and producing a
resulting data frame in each loop iteration. I need to give each data
frame a different name. Although I can easily create a new character
string for wr
On Sun, Dec 26, 2010 at 8:49 AM, Christian Schoder
wrote:
> Dear R-users,
>
> I've been using R for a while and I am very satisfied! Unfortunately, I
> still have not figured out an efficient and general way to construct and
> use lags of time series, especially when I need to work with different
65 matches
Mail list logo