Displaying 20 results from an estimated 5000 matches similar to: "Import the files."
2009 Mar 05
1
File checking problem
Dear all,
I am a newcomer to R programming, I met the problem:
I have a lot of .txt files in my directory.
Firstly, I check whether the file satisfies the conditions:
1.empty
2.the "Rep" column of the file has no "useractivity_idle" or
"useractivity_act"
3.even The "rep" has both of them, numbers of "useractivity_idle"==numbers of
2009 Mar 17
4
Merging
Hi, All.
I have a data frame with the part as :
.....
142 2006-02-22 16:28:18 useractivity_act 8 0
143 2006-02-22 16:28:26 4 2 0
144 2006-02-22 16:28:28 3 3 0
145 2006-02-22 16:28:31 4 4 1
146 2006-02-22 16:28:35 3 159 0
147
2009 Mar 12
4
who can give me some hint?
Hi All,
> act_2
Date Dtime Hour Min Second Rep
51 2006-02-22 14:52:18 14 52 18 useractivity_act
52 2006-02-22 14:52:18 14 52 18 4
55 2006-02-22 14:52:49 14 52 49 4
57 2006-02-22 14:52:51 14 52 51 4
58 2006-02-22 14:52:52 14 52 52 3
60 2006-02-22 14:54:42 14 54
2009 Mar 12
1
Removing rows
Hi All,
> act_2
Date Dtime Hour Min Second Rep
51 2006-02-22 14:52:18 14 52 18 useractivity_act
52 2006-02-22 14:52:18 14 52 18 4
55 2006-02-22 14:52:49 14 52 49 4
57 2006-02-22 14:52:51 14 52 51 4
58 2006-02-22 14:52:52 14 52 52 3
60 2006-02-22 14:54:42 14 54
2009 Mar 12
2
Removing
Hi All,
> act_2
Date Dtime Hour Min Second Rep
51 2006-02-22 14:52:18 14 52 18 useractivity_act
52 2006-02-22 14:52:18 14 52 18 4
55 2006-02-22 14:52:49 14 52 49 4
57 2006-02-22 14:52:51 14 52 51 4
58 2006-02-22 14:52:52 14 52 52 3
60 2006-02-22 14:54:42 14 54
2009 Mar 06
1
About warnings for non-matched items
Dear All,
I have many files in my directory. I want to transfer each data into one which is readable.
They have so many possibilities, i have collected(manually and visually) all possibilities and represent them as different numbers.
Rep[grep('context_log',log1$Remain[1:length(log1$Date)]),]<-"2"
Rep[grep('gs',log1$Remain[1:length(log1$Date)]),]<-"5"
2009 Oct 02
1
Please Help me!
Hi, R-users,
I have a problem: Because there are few files which can't be readed
into R completely, so on the following subsequence programme, I use
write.table, which creates the "NA" files for those incomplete files
autimatically.
I don't want those NA files.
My programes formats looks like:
name_c<-Sys.glob("C:/Documents and Settings/lma/My
2009 Mar 05
2
File checking
Hello,
How can I check if file is empty in R, if it is, then jump out and read next file; if it isn't, then read through?
Thanks a lot for any help.
Tammy
_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
[[alternative HTML version deleted]]
2012 Aug 04
2
find errors in a directory of files
hello list,
I'm trying to write a script that will search through a directory of trace
logs for an oracle database. From what I understand new files are always
being created in the directory and it's not possible to know the exact
names of the files before they are created. The purpose of this is to
create service checks in nagios. Because you don't know the names of the
files ahead
2012 Apr 16
1
R: Help; error in optim
Hello,
When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that
Error in optim(start, fn = z, data = q, hessian = T) :?
? objective function in optim evaluates to length 25 not 1
can somebody?help me remove this error. Is my censoring approach correct.
n=25;rr=1000
p=1.5;b=1.2
for (i in 1:rr){
q<-c(t,cen)
2012 Sep 20
3
Problem with Newton_Raphson
Hello,
I have being trying to estimate the parameters of the?generalized?exponential distribution. The random number generation for the GE distribution is?x<-(-log(1-U^(1/p1))/b), where U stands for uniform dist. The data i have generated to estimate the parameters is right censored and the code is given below; The problem is that, the newton-Raphson approach isnt working and i do not know what
2012 Aug 28
1
Optim Problem
Hello,
I want to estimate the exponential parameter by using?optim?with the following input, where t contains 40% of the data and q contains 60% of the data within an interval. In implementing the code command for optim i want it to contain both the t and q data so i can obtain the correct estimate. Is there any suggestion as to how this can be done. I have tried h<-c(t,q) but it is not working
2012 Feb 05
1
R- Fisher Information
Dear All,
Can you help me, with the code below how do I obtain the fisher information from it.
Is my q<-replicate(1000,x) the right way to do simulation.
thank you.
x<-rweibull(100,0.8,1.5)
q<-replicate(1000,x)
z<-function(p){
beta<-p[1]
eta<-p[2]
log1<-(n*log(beta)-n*beta*log(eta)+(beta-1)*sum(log(x))-sum((x/eta)^beta))
return(-log1)
}
zz<-optim(c(0.5,0.5),z)
zz
Chris
2011 Sep 12
1
plot 3 lines with ggplot2
Hi,
I am trying to learn to use ggplot2 for what I had hoped would be a
fairly simple task. I have a relatively small data.frame (100 by 4).
The first column contains symbols. The 2nd, 3rd and 4th columns
represent percentage weightings for each symbol using 3 different
methodologies. For example:
sym <- make.unique(replicate(100, paste(sample(LETTERS, 3, replace =
TRUE), collapse =
2012 Dec 13
3
how to aggregate the dataset
HI,
Sorry for messing up..
I want to transform the following dataset:
product min_price max_price mean_price country price_band
11 34 50 40 VN 0-300
22 10 30 15 VN 0-300
Into:
product VN price_band
11 40 0-300
[34,50]
22 15
2009 Mar 06
0
File checking problem
HI,Barry.
Thanks a lot for your details reply. I have already rewritten the programs. Now it totally works.
Your comment: " Note the use of comments and breaking the code up into small independent, testable functions" is really Valuable! Thanks again.
Hi,David,
You are right, My previous code was really horrible. Its not good to make multiple codes at the same time, sometime I feel
2013 Jan 24
3
how to combine unequal rows and columns in R
HI,
I have the following list:
crosspries
$crosspries[[1]]
Product Year_Month prod1
A 201208 1
B 201208 2
C 201208 1
$crosspries[[2]]
Product Year_Month prod1 prod2
A 201209 1 1
B 201209 2
2007 Mar 19
1
using several wine versions from .deb packages?
Hi,
Wine documentation says that it can be installed anywhere, locate its
libraries and just run. This is certainly true for self-compiled
sources which could e.g. be run from their compiled location.
I wonder if this is also possible with pre-built Debian/Ubuntu binary
packages. Normally, Debian installs exactly one version of a package
in /usr/.
Is there some possibility to use multiple
2013 Mar 15
3
How to list the all products' information of the latest month?
Hi,
I have data frame like this:
Product Price Year_Month PE
A 100 201012 -2
A 98 201101 -3
A 97 201102 -2.5
B 110 201101 -1
B 100 201102 -2
B 90 201103 -4
How can I achieve the following result
2008 Feb 11
1
Orcad 7.2 (old) loads, but treeviews won't expand
I'm on freeBSD 7.0, wine 0.9.53.
When I run Orcad, it can load projects, but schematics never open
(unlike other users' experiences in the apps db from Orcad v9.0). You
open schematics by expanding them in the 'project' treeview window,
and under wine, the little "+" box next to the treeview just
dissapears when you click on it instead of expanding.
Steve
[steve at