Displaying 20 results from an estimated 1400 matches similar to: "How to use macro variable in a text string"
2009 Jul 24
2
How to find the min and max of two variables in a data frame
I have two variables in a data frame, I want to generate two additional
variables. For every observations (i.e. every row), I want the first new
variable 'min' to carry the minimum of the two existing variables, and I
want the second new variable 'max' to carry the maximum of the two existing
variables. I then want to sort the data frame by min and max, and delete
duplicated rows
2009 Jul 07
4
Test for X=1 fails, test for >0 works, data in text file is 1
Hi,
I am apparently not understanding some nuance about either the use
of subset or more likely my ability to test for a numerical match
using '='. Which is it? Thanks in advance.
I've read a data file, reshaped it and then created MyResults by
keeping only lines where the value column is greater than 0. So far so
good. The data in MyResults looks good to me by eye.
The
2009 Jul 21
4
list of lm() results
How can I get the results of lm() into a list so I can loop through the results?
e.g.
myResults[1] <- lm(...)
myResults[2] <- lm(...)
myResults[3] <- lm(...)
...
myResults[15] <- lm(...)
myResults[16] <- lm(...)
so far every attempt I've tried doesn't work throwing a "number of
items to replace is not a multiple of replacement length" error or
simply not
2007 Aug 29
1
Strage result with an append/strptime combination
Hi,
I keep on trying to write some small scripts in order to learn R but even
with basic scripts I have problems ...
I start with the name of a file which is in fact the time the file has been
generated (I cannot change the format). Then I convert namefile with
strptime. The problem occurs when I add another time from another file with
append. It displays some informations I don't want.
I
2012 Jul 13
1
functions of vectors : loop or vectorization
I have a read a lot about the benefits of vectorization in R. I have a
program that takes "almost forever" to run. A good way to see if I have
learned something ... My problem can be summarized like this : I have a
nonlinear function of several variables that I want to optimize over one
letting the other describe a family of curves. In short, I wan't to optimize
f(x,a,b) for several
2009 Jul 08
1
What is cast telling me?
Hi,
What is cast telling me when it says the following?
Aggregation requires fun.aggregate: length used as default
What is 'length'?
I've taken a small subset of data and wondered what EnTime vs
ExTime might look like. cast is kind enough to give me a table but I
don't understand the values in the table. They seem to sum up ro be
the same as the total dimension of the data
2011 Aug 26
17
strings issue
Hi everybody,
I ve got a problem with strings and the class File in rails
Indeed, when i try to do this:
File.new("archives/sequences/archives-2011.xml")
it works perfectly, however when i do
string = "archives/sequences/" + @filename => filename being
"archives-2011.xml"
File.new(string)
it doesn''t work!
ruby tells me it cannot find the file
does
2009 Mar 22
2
Following progress in a lapply() function
Dear all,
I am processing a very long and complicated list using lapply through a custom function and I would like to generate some sort of progress report. For instance, print a dot on the screen every time 1000 item have been process. Or even better, reporting the percent of the list that have been process every 10%. However, I can't seem to figure out a way to achieve that.
For instance,
2004 Jan 12
2
data structure problem
HI, there,
I have a data set with special structure.
It is in n*(5*p): n is the number of observations or data points
5*p is the matrix for each data point
I'd like to conduct discriminant analysis to this data set. How could I
do? And where could I find related references to solve this problem?
Thanks a lot!
Jieping Zhao
PhD student in Bioinformatics, NCSU
Lab
2012 Feb 13
2
Puzzling... puzzling... puzzling...
Hi all,
I made sure that it's "env$sRes1$nPositionsOptimizedM" that's correct...
not the "env$sRes1$nPositionsOptimized"...
But it seems both point to the same memory area...
This is very dangerous because I have used naming conventions such as:
MyLongVariableNameForA
MyLongVariableNameForB
MyLongVariableNameForC
...
...
Then if internally they are actually the
2012 Apr 12
4
How insert data to a column in existing csv file?
I was working with some excel files with a lot of data.
And by hand it is impossible to handle them.
So they are now converted to .csv.
With headers above the columns, like:
Data1, Data2, Data3
But now I needed to calculate the log2 value of Data1 and place the result
under Data2.
I can't find how to do that.
Does anyone else know?
I have the log2 values, but how do I get then
2007 Mar 07
1
Fwd: Package-RODBC-MSACCESS
I have used RODBC to get the database i can view the tables in RGUI-2.4.1
how can i query the records in R>
i tried with sqlQuery
need some help
JJ
--
Lecturer J. Joshua Thomas
KDU College Penang Campus
Research Student,
University Sains Malaysia
--
Lecturer J. Joshua Thomas
KDU College Penang Campus
Research Student,
University Sains Malaysia
[[alternative HTML version deleted]]
2003 Jul 06
1
Conditional Distribution of MVN variates
Hi Folks,
Given k RVs with MVN distribution N(mu,S) (S a kxk covariance matrix),
let (w.l.o.g.) X1 denote the first r of them, and X2 the last (k-r).
Likewise, let mu1 and mu2 denote their respective expectations.
Then, of course, the expectation of X2 given X1=x1 is
mu2 + S21*inv(S22)*(x1 - mu1)
and the covariance matrix of X2 given X1=x2 is
S22 - S21*inv(X11)*S12
where Sij is the
2007 Jul 05
1
generating lower triangular matrix
Hi,
I would like to generate below triangular matrix for some a.
0
0
0
0
0
0
1
0
0
0
0
0
a
1
0
0
0
0
a^2
a
1
0
0
0
a^3
a^2
a
1
0
0
a^4
a^3
a^2
a
1
0
What's an efficient way to do this? (this matrix being KxK, K very
large)
Thanks
Zava
--------------------------------------------------------
This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2017 Nov 24
2
Multiple sets of proportion tests
Hi all ,
I have a dataframe of 200 columns and 2 rows. The first row in each column contains the frequency of cases in group I . The second row in each column contains the frequency of cases in group II. The frequency of trails is a fixed value for group I(e.g.200) and it is also another fixed values for group II (e.g. 100). The dataset looks like this :-
> Mydata
2003 Mar 03
5
(no subject)
Dear Everyone,
I am a novel user of the R package (less than a week). I am using the
package to analyse some microarray data. I have successfully imported the
data, and manipulated it, resulting in additional columns of data. However,
I now want to extract all this new information from R for use outside the
package. Can anyone tell me of any commands that would allow me to
accomplish
2012 Nov 20
2
hiera values issue
Hi, I have a puppetmaster - agent architecture. I have a module for the
vsftpd configuracion in the agents. The configuration of the value
''max_per_ip'' in the agents may vary. This is a line of the manifest:
$max_per_ip = hiera(''max_per_ip'',10)
I want to specify different values for each agent using hiera. The problem
is I am only able to specify the
2017 Nov 24
0
Multiple sets of proportion tests
Hi anonymous,
?prop.test states that it returns a list. And one of the element is
'p.value'. str() on the output of prop.test() reveals that too. So
prop.test()$p.value or prop.test()["p.value"] should work.
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR
2013 Jul 21
2
Possible improvements to LocalDiscovery
LocalDiscovery works by sending some of the MTU probe packets to the
broadcast address (255.255.255.255). If the destination node receives
one of these packets, it will update its UDP cache and reply, thus the
two nodes will start using their local addresses to communicate.
Now, I see two problems with this approach:
- In case the two nodes are behind the same NAT and can reach other
*but*
2017 Nov 24
1
Multiple sets of proportion tests
Thank you for clarifying this point but my main question was about how to modify my code to do the analysis correctly. The code I mentioned :-
MyResults <- apply(Mydata, 2, function(x)prop.test(Mydata,c(200,100))
Results in this error : 'x' and 'n' must have the same length in the prop.test(x,n).
How can I modify "x' or "n" arguments so the analysis