Displaying 20 results from an estimated 10000 matches similar to: "Extract data from edit chart"
2005 Dec 03
2
How to catch value
Dear R users:
I have a problem about catch the value from function.
I have following two functions (part):
fbolus1 <- function()
{.........
par<-data.frame(Parameter=c("kel","Vd"),Initial=c(0))
check(par)
.....}
check<-function(par)
{
if (par[ ,2] <= 0){
cat("\nEnter again (y/n) ?\n\n")
ans<-readline()
if (ans == "n" ){
2005 Jul 27
3
how to overlook the zero in the denominator
Dear R users:
I have two set of data, as follow:
x<-c(0,0,0.28,0.55,1.2,2,1.95,1.85,
1.6,0.86,0.78,0.6,0.21,0.18)
y<-c(0,0,0,0.53,1.34,1.79,2.07,1.88,
1.52,0.92,0.71,0.55,0.32,0.19)
i<-1:length(x)
I want to sum each (x[i]-y[i])^2/x[i] together,
like:
>Sum <-sum((x[i]-y[i])^2/x[i])
>Sum
[1] NaN
Because the denominator shoud not be zero.
So I want to overlook those
2005 Dec 05
1
how to save output all together
Dear R users:
I have a problem about catch the value from function.
I have following two functions (part):
sbolus1 <- function()
{
.......
for( i in 1:Subject) {
kel<-par1
Vd<-par2
PKindex<-sbolus1.out(PKtime,kel,Vd,defun,par1,par2,Dose,i)
}
savefile(PKindex)
}
sbolus1.out<-function(PKtime,kel,Vd,defun,par1,par2,Dose,i)
{
time<-PKtime$time
2005 Jul 19
2
Michaelis-menten equation
Dear R users:
I encountered difficulties in michaelis-menten equation. I found
that when I use right model definiens, I got wrong Km vlaue,
and I got right Km value when i use wrong model definiens.
The value of Vd and Vmax are correct in these two models.
#-----right model definiens--------
PKindex<-data.frame(time=c(0,1,2,4,6,8,10,12,16,20,24),
2018 Apr 22
0
Gantt Chart Using Plotrix
Hi,
The help file for gantt.chart states that dates must be in POSIXct
format, and the example shows how to do that. There's no reason that I
can see that you can't use a data frame as input to gantt.chart, but
you need to be very careful that your data frame matches the correct
format. I bet also that your character fields were imported as
factors, because you didn't specify not to.
2018 Apr 23
0
Gantt Chart Using Plotrix
Hi,
Your attempt didn't work because you didn't do what I suggested, which
was make sure that your data frame matched the example given in the
help for gantt.chart.
Here's what you have:
> str(cdfg)
'data.frame': 3 obs. of 3 variables:
$ c1d1: Factor w/ 3 levels "task 1","task 3",..: 1 3 2
$ c2d1: POSIXct, format: "2018-04-01"
2018 Apr 22
2
Gantt Chart Using Plotrix
>From the help file for plotrix:
" ... x - a list of task labels, start/end times and task priorities as returned by get.gantt.info ..."
So I try to create an object that will contain this information.
abc <- read.csv("gntr1a.csv")
# The above csv file was generated from MS .xlsx file containing the tasks and corresponding dates
> abc
code tasks.labels
2018 Apr 22
3
Gantt Chart Using Plotrix
Hi Sarah
Thank you very much for your pointers.
Is there a way to specify the date string as POSIXct when reading in?
I have tried the following (very inelegant way) and still have no luck.
--- Begin Code ---
# 1st read in the spreadsheet with stringsAsFactors set to FALSE
> abc <- read.csv("gntr1.csv", header=TRUE, stringsAsFactors=FALSE)
> abc
code tasks.labels
2018 Apr 22
0
Gantt Chart Using Plotrix
> On Apr 22, 2018, at 11:50 AM, bbb_aaa at verizon.net wrote:
>
> Hi
>
> I am trying to generate a complex Gantt chart using the gantt.chart function in the plotrix package.
>
> Ideally I would like to use a spreadsheet to populate the activities (tasks) and start and end dates that this function expects and then export the spreadsheet file as a .CSV text file so I can read
2005 Sep 25
2
summary nls output
Dear R user:
I bulid a package, and in the package I use the function "nls"
to solve some questions. If I have two sets of data, and I want to
summary these two data's nls output, I write the command in the
package source code like:
{
..........
summary(fm1)
summary(fm2)
}
then i compiler the package and use "Install package(s) from
local zip files" to install my
2018 Apr 22
3
Gantt Chart Using Plotrix
Hi
I am trying to generate a complex Gantt chart using the gantt.chart function in the plotrix package.
Ideally I would like to use a spreadsheet to populate the activities (tasks) and start and end dates that this function expects and then export the spreadsheet file as a .CSV text file so I can read in this file to generate the gantt chart. Reading through the help file I have not been able to
2006 Nov 07
1
Gregexpr - extract results with lapply
Gregexpr - extract results with lapply
Hello,
I need to extract sequences of three upper case letters in a string. In
other words, in this string:
str <-c("ABC", "this WOUld be gOOD")
The result I'm looking for is ABC WOU OOD.
With gregexpr, I can get the position and length of the sequences
gregexpr('[A-Z]{3}',str,perl=TRUE)
[[1]]
[1] 1
2008 May 05
7
extract and assign xml values to variable
hi,
how can we assign an xml element value to some variable in
controller? e.g. if we have
<order>
<id>1</id>
<name>abc</name>
<location>xyz</location>
</order>
and if we want value of name i.e. ''abc'' to be assigned in a variable
declared in a controller, say order_controller, like this- temp = "value
of xml element
2012 Jan 20
4
extract fixed width fields from a string
Hi,
I have a data frame with one column containing string of the form "ABC...|XYZ..."
where ABC etc are fields of 6 alphanumeric characters each
and XYZ etc are fields of 8 alphanumeric characters each;
"|" is a mandatory separator;
I do not know in advance how many fields of each kind will each row contain.
I need to extract these fields from the string.
=== How do I do that?
2005 Apr 30
3
How to extract function arguments literally
Dear all,
One of my friends asked me if it is possible to extract actual R
function arguments literally (precisely, as strings). The reason is
simple. He feels sometimes awkward to attach quotation marks :-). What
he actually wants is to pass R command arguments to XLisp subroutines
(He has been an enthusiastic XLisp user for a long time and still tends
to use R as a wrapper to XLisp). Is it
2012 Jan 19
3
Not generating line chart
Hi All,
Can you please help me, why this code in not generating line chart?
library(ggplot2)
par(mfrow=c(1,3))
#qplot(TIME1, BASCHGA, data=Orange1, geom= c("point", "line"), colour= ACTTRT)
unique(Orange1$REFID) -> refid
for (i in refid)
{
Orange2 <- Orange1[i == Orange1$REFID, ]
pdf('PGA.pdf')
qplot(TIME1, BASCHGA, data=Orange2, geom= c("line"),
2013 Apr 29
2
Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame
Dear R forum
I have a data.frame as
cashflow_df = data.frame(instrument = c("ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC", "ABC", "PQR", "PQR",
2009 Sep 17
2
What is the best way to get a subset of a data.frame?
Hi,
I want to construct a data.frame 'y' by using x$x and x$y. I think
that there might be better ways to do it (because, for example, we can
use a_matrix[3:5,] to extract certain rows, where 'a_matrix' is a
matrix). Can somebody let know what the best way is?
> a=data.frame(x=1:10,y=rep("abc",10),z=rep("xyz",10))
> a
x y z
1 1 abc xyz
2 2
1999 May 11
1
model.matrix crashes (PR#189)
With 0.64.1 on Intel RH5.2,
abc <- list()
abc$abc$abc <- matrix(1:20)
mt <- terms(~(abc$abc$abc[,1]==64)|(abc$abc$abc[,1]==65)|(abc$abc$abc[,1]==75)
|(abc$abc$abc[,1]==84)|(abc$abc$abc[,1]==85))
model.matrix(mt,model.frame(mt))
crashes. With ab$ab$ab, it does not. Apparently, the bug I reported
for 0.64.0 has just been pushed back one step. Jim
2012 Jul 18
2
How to have original (name) order after melt and cast command
Dear R helpers,
I have a data.frame as given below -
dat1 = data.frame(date = as.Date(c("3/30/12","3/29/12","3/28/12","3/27/12","3/26/12",
"3/23/12","3/22/12","3/21/12","3/20/12", "3/30/12","3/29/12","3/28/12","3/27/12",