Displaying 20 results from an estimated 100 matches similar to: "Loop swith String replacement"
2009 Sep 15
2
Viewing Function Code
Hi All,
I'd like to see the function code behind the barplots2() function in the
gplots package, however i come across a bit of a stumbling block of a hidden
function, can anyone help?
> library(gplots)
> methods(barplot2)
[1] barplot2.default*
Non-visible functions are asterisked
> barplot2
function (height, ...)
UseMethod("barplot2")
<environment:
2009 Aug 25
1
Help with nls and error messages singular gradient
Hi All,
I'm trying to run nls on the data from the study by Marske (Biochemical
Oxygen Demand Interpretation Using Sum of Squares Surface. M.S. thesis,
University of Wisconsin, Madison, 1967) and was reported in Bates and Watts
(1988).
Data is as follows, (stored as mydata)
time bod
1 1 0.47
2 2 0.74
3 3 1.17
4 4 1.42
5 5 1.60
6 7 1.84
7 9 2.19
8 11 2.17
I then
2008 Oct 02
1
Time conversion
I'm trying to convert a variable that is imported from CSV into a datetime,I'm
trying to use the strptime function but with no joy, can anyone offer any
advise?
i have a vector
timestamp
07-07-2008-21:03:55
07-07-2008-19:52:55
07-07-2008-19:54:14
07-07-2008-15:24:01
07-07-2008-13:39:17
07-07-2008-13:39:55
timestamp<-strptime(timestamp,"%d-%m-%y-%H:%M:%S")
## then filter on
2005 Nov 22
1
cant swith to text mode consoles
After installing xfce I switched to runlevel 5 to have a graphic login.
But The login box (and xfce) doesnt let me switch to text consoles with
ctrl+alt+F key. Also, xfce is the desktop for root, but for normal user
still is an ugly windows manager.
--
Roger D. Vargas
http://dsgp.blogspot.com | Linux, programaci?n, juegos
______________________________________________
Renovamos el
2008 Jun 06
2
Merging two dataframes
Hi All,
Newbie question for you all but i have been looking at the archieves and the
help dtuff to get a rough idea of what i want to do
I would like to merge two dataframes together based on a keyed variable in
one dataframe linking to the other dataframe. Only some of the cases will
match but i would like to keep the others as well.
My dataframes have 67 and 28 cases respectively and i would
2008 Jun 20
2
Problems with basic loop
I'm having trouble creating a looping variable and i can't see wher ethe
problem arises from any hep gratfully appreciated
First create a table
x<-table(SURVEY$n_0,exposed)
> x
exposed
False True
Under 16 24 1
16-19 68 9
20-24 190 37
25-34 555 204
35-44 330 87
45-54 198 65
55-64 67 35
65+
2010 Jul 02
1
metafor and meta-analysis at arm-level
Hi,
I have been looking for an R package which allowed to do meta-analysis
(both pairwise and network/mixed-treatment) at arm-level rather than at
trial-level, the latter being the common way in which meta-analysis is
done.
By arm-level meta-analysis I mean one that accounts for data provided at
the level of the individual arms of each trial and that does not simply
derive the difference between
2008 Jun 17
2
Calling functions
Another newbie question.
I've written a function and saved the file as Xtabs.R, in a central place on
a network so others will be able ot use the function,
My question is how do i call this function?
I've tried to chance the working directory, and tried to load it via;
> library(Xtabs, lib.loc="//filer/common/technical/surveys/R_test")
but neither seem to work? the function
2009 Jan 28
2
t.test in a loop
Hi All,
I've been having a little trouble with creating a loop that will run a a
series of t.tests for inspection,
Below is the code i've tried, and some checks i've looked at.
I've used the get(paste()) idea as i was told previously that the use of the
eval should try and be avoided.
I've run a single syntax to check that my systax is correct and works
without any problems
2008 Dec 31
3
Paste in a FOR loop
Hi All,
I've been having a little trouble using R2HTML and a loop, but can't figure
out where the problem lies, any hints gratefully received.
My code at the minute, (Which does work) is in the following:
library(R2HTML)
HTMLStart(outdir =
file.path("C://Example_work","R_projects","Dynamic_creative"),filename =
"RMDC_mockup",Title="Mock up for
2008 Aug 05
2
Selecting Variables
Hi All,
i have a dataset that i want to dynamically inspect for the number of
variables that start with "Exposure_" and then for these count the entries
across each case i.e
ID Exposure_1 Exposure_2 Exposure_3
1 y y y
2 y y -
3 y - -
So the corresponding new variables
2008 Oct 13
2
Timestamps and manipulations
Hi All,
I've a couple of questions i've been struggling with using the time
features, can anyone help? sample data
Timestamp user_id
27/05/08 22:57 763830873067 27/05/08 23:00 763830873067 27/05/08 23:01
763830873067 27/05/08 23:01 763830873067 05/06/08 11:34 763830873067
29/05/08
23:08 765253440317 29/05/08 23:06 765253440317 29/05/08 22:52
765253440317
2013 Jul 29
2
howto avoid Samba
Dear All,
I'm replacing an older OpenSuse server with a new Centos6.4 server.
So far that goes ok, except that the OpenSuse server is also a samba
server with ldap connection.
Since I replaced all but 2 machines in the building from Windows to
Linux, I was hoping not to install Samba on the new server. ( And also
because I can't get it to work on Centos. )
I saw a post on the
2008 Oct 15
1
comparing with lead function
Hi All,
I've been trying to compare if the previous value in a variable is equal to
a binary value..(i.e i want to check if the last event was a yes or no)
i've been trying to write some code for this, but it seems overly elaborate,
can anyone suggest a better / shorter / neater way?
The below doesn't quite work but shows my idea of splitting by the factor
id, then creating a new
2009 Mar 11
1
Forecasting with dlm
Hi All,
I have a problem trying to forecast using the dlm package, can anyone offer
any advise?
I setup my problem as follows, (following the manual as much as possible)
data for example to run code
CostUSD <- c(27.24031,32.97051, 38.72474, 22.78394, 28.58938, 49.85973,
42.93949, 35.92468)
library(dlm)
buildFun <- function(x) {
dlmModPoly(1, dV = exp(x[1]), dW = exp(x[2]))
}
fit <-
2008 Jun 09
1
Missing Data and applying
Hi All,
Newbie question that i'm sure is easy, but i can't seem to apply properly
I read in a datafram from a CSV file and i want to tell R that from coloum
"n_0" to "n_32" the value "-1" is missing data
i was looking at the
is.na(xx) <- c(..,...,) idea but i can't seem to apply it properly, can
anyone offer advice?
On a side issue while i'm
2010 Jan 22
1
Title splitting function
Hi All,
I'm trying to write a function to automatically split long strings so they
will appear nicely in a chart i'm trying to create,
Say i have a string
title <- "some variety of words that are descriptive"
In this instance i want to place carriage return where there is a space just
prior to a specified number of characters (in this case 15)
title.length <-
2007 Apr 18
0
[Bridge] swithing trunk (tagged 802.1q traffic) with brctl
Hello,
My name is Ferm?n Gal?n and I work as Research Engineer at CTTC, Spain. I'm
trying to configure a bridge with brctl to switch VLAN tagged traffic
(802.1q), but I'm getting some problems.
In particular, I've a physical interface (eth2) connected to a Cisco trunk
port (so, the traffic to/from eth2 is tagged). I've added eth2 to a bridge
('brctl addif somebrige
2007 Jan 01
1
Freeze when swithing vt
Hello. I am running 0.3.6 compiz under Fedora Core 6 and nvidia 1.0-9631
binary driver. I have noticed that switching to console with ctrl-alt-f1
and then back to x with ctrl-alt-f7 locks up the system with a black
screen more or less (sometimes the lockup is complete, sometimes the
cursor moves and it is possible to switch back to console), A user on
nvnews forums suggest that disabling sync to
2008 Sep 23
2
Contional
Hi All,
I'm having trouble selecting rows to delete, that i can't seem to overcome.
Below is some sample data, i am trying to dedup the data based on each user,
and simultaneously the timestamp (at the side i have highlighted expected
row to be removed)
I've looked at the lag function but can't seem to make it work?
My logic ran along the lines of an ifelse statement and then